Commit graph

4132 commits

Author SHA1 Message Date
Michael Natterer ab607a0adc app: add gimp_imagegile_get_gicon() which uses async API and can't block
and use it in gimp_view_renderer_imagefile_get_icon().
2011-06-19 23:06:33 +02:00
Michael Natterer 276ceddec9 app: GimpViewRendererImagefile: don't call g_file_query_info ("standard::icon")
This is a quick fix because the call can block and needs to be ported
to the async API. I simply disabled the entire block that gets the
icon from GIO.
2011-06-19 22:20:50 +02:00
Martin Nordholts e74d220930 app: Restore docks in an idle handler
In single-window mode, gimp_session_managed_set_aux_info() will set
the size of the dock areas at the sides. If we don't wait for those
areas to get their size-allocation, we can't properly restore the
docks inside them, so do that in an idle callback.

Also add a required call to gimp_test_run_mainloop_until_idle()
because of this in the 'automatic_tab_style' test.
2011-06-14 23:34:12 +02:00
Martin Nordholts 00d6f8e655 Move gimp_session_info_clear_info() into gimp_session_info_restore()
All callers of gimp_session_info_restore() call
gimp_session_info_clear_info() afterwards, so move that into the
function instead.
2011-06-14 23:34:12 +02:00
Michael Natterer 86e09e03d6 app: make sure GimpToolPresetEditor is in a sane state initially
even if an object got set on it at construction time.
2011-06-06 22:38:51 +02:00
Alexia Death 6b3c398f09 app: prevent segfault on startup when in swm and preset editor is active 2011-06-05 15:12:57 +03:00
Michael Natterer ea27c7bc83 app: add the MIN4() and MAX4() macros to gimp-utils.h
instead of having them in 5 .c files.
2011-06-04 17:16:21 +02:00
Michael Natterer 1bff2c8df2 app: sprinkle const qualifiers in the tool event callback functions 2011-05-31 23:18:11 +02:00
Martin Nordholts bed298be13 app: Remember column width in multi-column dock windows 2011-05-31 23:15:39 +02:00
Martin Nordholts b4ed281f9a app: Call gimp_session_info_aux_set_list() generically
gimp_session_info_aux_set_list() is not a per-GimpDialogRestoreFunc
thing.
2011-05-31 23:15:38 +02:00
Martin Nordholts 6fc587c643 app: Add GimpSessionManaged
Add a GimpSessionManaged interface to generalize
gimp_session_info_aux_get_list() and gimp_session_info_aux_set_list().
2011-05-31 23:15:14 +02:00
Michael Natterer edad544e73 app: don't redundantly check for (foo && GIMP_IS_FOO (foo)) in GimpSessionInfo 2011-05-30 23:39:39 +02:00
Martin Nordholts 10aa3921a0 app: Rememeber if image windows are opened
Rememeber if image windows are opened because we want the
gimp_session_info_restore() code to run for the single-image window
once that code is in place.
2011-05-28 16:18:34 +02:00
Martin Nordholts 93fd257c52 app: Give configure event info to gimp_session_info_read_geometry()
When we get to gimp_dialog_factory_dialog_configure() and do
gimp_session_info_read_geometry(), the window geometry has not yet
been updated, i.e. gimp_session_info_read_geometry() gives the session
info the size of the *previous* configure event.

Solve this by giving gimp_session_info_read_geometry() the configure
event so it can use that size when availble.

If we don't do this change, then we get bogus values of the size of
image window when repeatedly switching between single- and
multi-window mode.
2011-05-27 22:33:55 +02:00
Martin Nordholts 396d5fd5e8 app: Add a 'restore_func' to GimpDialogFactoryEntry
In gimp_session_info_restore() there is code to create a dialog from a
session info. GimpSessionInfo lives in the widgets module. Thus we
can't add restoration code that depends on a higher level module. In
particular, we can't add code to restore docks in an GimpImageWindow
since GimpImageWindow lives in the display module. And we need such
code to be able to restore a single-window mode session.

Since dialogs are defined in the dialogs module, it makes sense to
also have the code that restores a dialog in that module.

So, add a 'restore_func' member to GimpRestoreDialogFunc of type
GimpRestoreDialogFunc and move the code there.
2011-05-27 21:55:41 +02:00
Massimo Valentini 71bedb0ccd app: clear current path from the context after copying it
otherwise the first time it is drawn twice.
2011-05-26 20:17:21 +02:00
Martin Nordholts 2d5ffd4f2e app: Add the concept of 'side' of a dock
Add GimpDockContainer::get_dock_side() and write that info in the
sessionrc file. In single-window mode, a dock can be either on the
left or right side of the image window. In a dock window however, the
side concept doesn't apply ('side' has nothing to do with what column
a dock is in in a GimpDockColumns)
2011-05-19 20:57:40 +02:00
Michael Natterer ab0b88b5db app: replace the last GtkObject members by GtkAdjustment
Also get rid of some unneeded GTK_ADJUSTMENT() casts and replace some
local GtkObject veriables by GtkAdjustment.
2011-05-15 17:00:41 +02:00
Martin Nordholts cf4a4bf5a6 app: Make gimp_session_info_dock_restore() take a GimpDockContainer 2011-05-13 21:25:39 +02:00
Martin Nordholts 7edf717bae app: Add image_window boolean to GimpDialogFactoryEntry
Add image_window boolean to GimpDialogFactoryEntry and rename
FOREIGN_NOT_HIDEABLE() to IMAGE_WINDOW(). We need to treat image
windows a bit special when we restore a single-window mode session.
2011-05-13 21:25:39 +02:00
Martin Nordholts 0f19471e22 app: Make GimpDockContainer::get_docks() return a new list
Make GimpDockContainer::get_docks() return a new list and not just a
pointer to a list so that GimpImageWindow can implement it (who needs
to merge its two GimpDockColumns lists).
2011-05-13 21:04:23 +02:00
Martin Nordholts 00c2d15a3a app: Add GimpDockContainer::add_dock()
Add GimpDockContainer::add_dock() and use it in
gimp_session_info_dock_restore().
2011-05-13 21:04:23 +02:00
Martin Nordholts ab1b50ad4a app: Add GimpDockContainer::get_ui_manager()
Add GimpDockContainer::get_ui_manager() and make GimpDockWindow
implement it. Primary client is session restoration code.
2011-05-13 18:56:41 +02:00
Michael Natterer 896e29c5f1 app: gimp_session_info_dock_restore(): remove empty dockbooks after restoring
so we don't end up with empty windows if restoring all dockables in
the dock failed.
2011-05-12 21:23:07 +02:00
Michael Natterer 6bf7f7e429 app: ref the session info in gimp_dialog_factory_add_session_info()
and unref it in the callers after adding it. That's the proper way of
doing it and fixes another warning when restoring a dock fails.
2011-05-12 21:23:07 +02:00
Michael Natterer 9e60dd547d app: keep a ref to the session info in gimp_session_info_restore()
because failing to restore a dock can destroy the newly created dock
and implicitly unref the session info.
2011-05-12 21:23:06 +02:00
Michael Natterer 68a56a861e app: gimp_session_info_book_restore(): don't set a non-existing current page
Don't set the first page of the restored dockbook active if there are
less than two pages. Also add a comment that explains why we return
the dockbook even though we know that all its dockables failed to
restore.
2011-05-12 21:23:06 +02:00
Michael Natterer 80cf95319e app: gimp_session_info_dockable_restore(): don't return existing singletons
Instead, return NULL. The singleton dockable can't be restored in this
dock because it's already open in another dock.
2011-05-12 21:23:06 +02:00
Martin Nordholts c70dc8f86d app: Add NULL check in gimp_dock_container_get_docks() 2011-05-12 06:51:40 +02:00
Michael Natterer 3184c0f339 app: use g_object_bind_property() to set sensitivity here too 2011-05-11 11:43:19 +02:00
Martin Nordholts 6d421f9d4d app: Add and use gimp_session_info_get_info_with_widget()
Add and use helper function
gimp_session_info_get_info_with_widget(). Might need it for
GimpImageWindow later...
2011-05-09 19:55:51 +02:00
Martin Nordholts 4b9243fc60 app: Make GimpDockWindow implement GimpDockContainer
Make GimpDockWindow implement the GimpDockContainer interface. The
plan is to make GimpImageWindow also implement the GimpDockContainer
interface when we start to session manage docks in single-window mode.
2011-05-09 19:55:51 +02:00
Martin Nordholts 2287b6e008 app: Add a GimpDockContainer interface
We now have to classes that contain docks, GimpDockWindow and
GimpImageWindow (in single-window mode). Introduce a GimpDockContainer
interface so we can cope with these in an abstract way.
2011-05-09 19:43:28 +02:00
Martin Nordholts 1d12dc8e86 app: Sort widgets/widgets-types.h 2011-05-09 18:37:40 +02:00
Michael Natterer 85c0fd1166 app: replace gimp_dock_get_dock_columns() by gtk_widget_get_ancestor() 2011-05-04 22:41:40 +02:00
Michael Natterer 909e7833a3 app: remove some more -Wunused-but-set-variable 2011-05-02 13:53:58 +02:00
Michael Natterer c35ff719a7 app/libgimp*: remove stuff found by -Wunused-but-set-variable 2011-05-01 23:23:19 +02:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 2af539020b app: don't include individual files from libgimp* 2011-04-28 14:23:33 +02:00
Martin Nordholts 4988a97257 app: Add gimp_dock_set_id() 2011-04-21 19:57:14 +02:00
Martin Nordholts c84d26667b app: Add missing gimp_dock_get_id() implementation 2011-04-21 18:59:12 +02:00
Martin Nordholts f75f61779c app: GimpSessionInfoDock::identifier -> dock_type
Rename GimpSessionInfoDock::identifier to dock_type, because it isn't
really an identifier; there might be several instance with dock_type
being "gimp-dock". This is a preparation for adding an actual
'identifier' member.
2011-04-21 18:59:12 +02:00
Michael Natterer 4a8fa1ab2a app: make GimpSpinScale RTL aware 2011-04-20 20:12:21 +02:00
Alexandre Prokoudine ae2ab1ff3b Fixed a typo
The brush editor used to say "Spahe" instead of "Shape".
2011-04-20 13:20:42 +04:00
Michael Natterer 3edf0cb531 app: GimpSpinScale: don't create two cairo_t in expose() 2011-04-20 00:43:30 +02:00
Michael Natterer 3bf15d32e6 app: use GimpSpinScales in GimpBrushEditor 2011-04-18 22:27:43 +02:00
Michael Natterer 6dd463fb02 app: gimp_spin_scale_change_value(): remove "+ lower" from step calculation
It was never noticed because lower is 0.0 or 1.0 in all use cases.
2011-04-18 21:21:45 +02:00
Michael Natterer bfcecd2ef0 app: GimpBrushFactoryView: use a GimpSpinScale for spacing
and use the new scale_limits API to restrict the scale to 1..200 while
the actual range is 1..5000.
2011-04-18 21:04:05 +02:00
Michael Natterer d300ec6556 app: add a "scale_limit" API to GimpSpinScale
which allows to restrict the scale to a range that is smaller than
that of the model GtkAdjustment. This way we can enter large values in
the entry or by dragging beyond the end of the scale, but keep a
reasonably usable scale range for "normal" values.
2011-04-18 21:01:48 +02:00
Michael Natterer bc56060148 app: GimpLayerTreeView: use a GimpSpinScale for opacity 2011-04-18 20:41:02 +02:00
Michael Natterer 26d50b533b app: gimp_item_tree_view_add_options(): allow NULL labels
and pack the options widget into the vbox directly.
2011-04-18 20:40:10 +02:00
Mikael Magnusson 854dd5b6ad app: correct cast for spinbutton 2011-04-16 11:52:49 +02:00
Michael Natterer 924d647284 app: set GimpSpinScale to numeric-only input
It's the right thing to do, but also works around focus issues in SWM,
at least while the widget has the focus.
2011-04-16 02:09:37 +02:00
Michael Natterer 7e6c026790 Globally use GDK_KEY_foo, remove the compat defines from widgets-enums.h 2011-04-11 23:43:03 +02:00
Martin Nordholts 27ac2a3c38 app: Make GimpEditor instance members private 2011-04-10 12:12:01 +02:00
Michael Natterer d52157b565 Bug 647235 - app/widgets/gimpcairo-wilber.c parses path data every time
Applied patch from Juan Pablo Ugarte which keeps Wilber's cairo_path_t
around instead of parsing the SVG data each time.
2011-04-09 08:30:23 +02:00
Michael Natterer 5562f840b6 Bug 646718 - gimp_curve_set_curve: assertion `y >= 0 && y <= 1.0' failed
CLAMP(value, 0.0, 1.0) in one more place. The calculation does
look correct, but we are probably running into floating point
inaccuracies.
2011-04-08 20:53:17 +02:00
Michael Natterer fcbc5eebeb app: add an edit button the the tool options' brush etc. selectors
which makes getting to the editor dialogs much easier.
2011-04-07 23:48:08 +02:00
Mikael Magnusson b00cb3be79 Remove stray semicolon 2011-04-06 23:40:56 +02:00
Mikael Magnusson ac403ce11d Add a controller for binding mouse buttons 2011-04-06 23:35:14 +02:00
Michael Natterer 24ee3370b8 Depend on GTK+ >= 2.24.3, cairo >= 1.20.1, gdk-pixbuf >= 2.22.1
and completely separate configure and sanity checks for gdk-pixbuf
from GTK+, because it's now distributed as a separate package. Remove
all sorts of conditional compiling based on GDK_CHECK_VERSION() and
CAIRO_VERSION.
2011-04-06 19:58:24 +02:00
Michael Natterer 054957a1ee app: s/nbrushes/n_brushes/ in GimpBrushPipe 2011-04-05 15:16:06 +02:00
Michael Natterer 39fa147c17 app: unset GimpSpinScale's context sensitive cursor when the pointer leaves 2011-04-04 01:10:44 +02:00
Michael Natterer 61025c6023 Bug 624824 - use gtk-image-menu-item-set-always-show-image on some menu items
Always show icons for:

- Fill FG/BG/Pattern
- Rotate
- Recently opened
- Open images
2011-04-02 15:38:55 +02:00
Michael Natterer d92b22c567 app: #include "widgets-types.h" so the GDK_KEY_foo defines are there 2011-03-29 22:39:34 +02:00
Michael Natterer 1cdaa2846f app: some forgotten s/GDK_foo/GDK_KEY_foo/ 2011-03-29 18:53:02 +02:00
Michael Natterer 7c60bb5181 app: use more of the new GDK_KEY_foo key names
and move the compat defines from display-enums.h to widgets-enums.h
2011-03-29 17:24:08 +02:00
Michael Natterer 6c524ea1db app: GimpSessionInfo: use brute force to position dialogs
Window managers are such a crap. So on top of all friendly hinting and
geometry setting, simply use gtk_window_move() whenever a session
managed GtkDialog is shown. It should be very hard to ignore that, but
of course the WM has the last word no matter how hard we try.

Note: this code should be more complex and the signal connection
should happen in GimpDialogFactory. Left it in GimpSessionInfo for now
until it got a bit of testing.
2011-03-26 19:47:44 +01:00
Michael Natterer c629cbeb89 app: some formatting cleanup in GimpDialogFactory 2011-03-26 19:32:59 +01:00
Michael Natterer bc8d5f84d6 app: remove the "offset" API from TileManager
It made the transform code hard to read and never belonged into the
tile manager anyway. It's a simple pixel buffer that should not know
about any position in an image. Instead, pass around the offsets of
tile managers explicitly, so everything is less obscure for the price
of having more parameters. This will also help replacing TileManagers
with GeglBuffers.
2011-03-26 08:30:15 +01:00
Michael Natterer aec66d0c26 app: make GimpTaggedContainer properly memory manage the filter list
instead of leaking it. Also make the fact that tags in the list can
validly be NULL obvious by adding utility functions
gimp_tag_or_null_ref/unref().
2011-03-24 12:28:45 +01:00
Michael Natterer 7eda388fec app: fix possible GimpTagEntry crash by keeping the query idle ID around
Remove it in gimp_tag_query_dispose().
2011-03-24 09:55:32 +01:00
Michael Natterer 014a333d27 app: fix GimpTaggedContainer's base class
And make it use the sort_func from the src_container which must
now be a GimpList (which is likely temporary).
2011-03-23 21:51:56 +01:00
Michael Natterer 91195e8593 app: remove the old tool presets system
Instead, keep around a GimpFilteredContainer in GimpToolInfo that
maintains a per-tool list of presets from the global preset factory.
Turn the tool options dialog's preset Save/Restore/Edit/Delete menus
and buttons into shortcuts for managing the active tool's presets.
2011-03-23 09:27:29 +01:00
Michael Natterer 051ef0ebcb app: add GimpTaggedContainer
which is a copy of GimpFilteredContainer with s/Filtered/Tagged/ and
no other change. #if 0 GimpFilteredContainer for now and use
GimpTaggedContainer instead all over the place.
2011-03-22 23:11:46 +01:00
Michael Natterer 7cf14bd390 app: allow to change GimpToolPreset's icon
Also add an image and label that show what tool the preset is for.
This clearly needs more work...
2011-03-22 22:09:03 +01:00
Michael Natterer fa9453eea1 app: add gimp_prop_icon_picker_new()
and use it in GimpTemplateEditor instead of handling the icon picker
manually.
2011-03-22 15:20:03 +01:00
Michael Natterer a90961ef4a app: make GimpTextStyleEditor look a bit nicer
Add some spacing and move the color button to the bottom.
2011-03-21 01:00:37 +01:00
Michael Natterer 1f5e180334 app: move GimpToolDialog from app/widgets/ to app/display/
Zero logic changes yet, just a rename.
2011-03-20 13:34:03 +01:00
Michael Natterer c469dbb206 libgimpwidgets: turn GimpDialog's "parent" into a property
and remove the parent peoperty from GimpViewableDialog.
2011-03-20 12:44:03 +01:00
Michael Natterer 6d97fd3887 app: use a size entry instead of a spinbutton in GimpTextStyleEditor
so it's finally clear what unit the text size has.
2011-03-20 12:37:01 +01:00
Michael Natterer 0789ee2669 app: add a 1px FG border around overlay frames
so they work on any background. Also remove disabled bling code.
2011-03-18 22:57:13 +01:00
Michael Natterer 140c9aae91 Bug 625273 - Insert Font and font-size into the Texteditor's Menubar
If the cursor position (or the current selection), doesn't contain any
font, font-size or color tags, display the default values from the
GimpText object instead of "nothing". Still display nothing if the
selection contains different fonts, sizes or colors.
2011-03-18 22:13:34 +01:00
Michael Natterer ecbfb4a9e8 app: add a GimpText property and construct param to GimpTextStyleEditor
which will be used to get default values from.
2011-03-18 21:16:53 +01:00
Michael Natterer 61aa1854fd app: make GimpSpinScale's slow part change the value 10x slower than the fast part 2011-03-18 15:42:50 +01:00
Michael Natterer f1d1bb610d app: experimentally add fine-tuning to GimpSpinScale
by making the lower part change things in small steps.
2011-03-18 15:07:44 +01:00
Michael Natterer df731912a5 app: add a GimpTextStyleEditor to the text tool's editor dialog
so it's an alternative to on-screen editing for esoteric use cases
that can do everything on-screen editing is capable of.
2011-03-18 12:58:32 +01:00
Michael Natterer d7c66c66d0 Bug 142697 - Dock separators move between sessions
Removing my old and evil "fix" for the issue from 2004-06-01 seems
to make things work as they should.
2011-03-17 21:03:20 +01:00
Michael Natterer 075c7d4a4d app: avoid the deprecated gdk_drawable_get_size() on GTK+ >= 2.24
Use gdk_window_get_width/height() instead.
2011-03-17 15:10:17 +01:00
Michael Natterer fdde231869 app: use gtk_widget_get_allocation() instead of gdk_drawable_get_size() 2011-03-17 15:09:19 +01:00
Michael Natterer 42b2498a06 app: add a cast when comparing GdkCursorType with GimpCursorType 2011-03-17 14:42:44 +01:00
Michael Natterer 90058cded7 app: add missing tooltips in the text style overlay widget 2011-03-14 13:05:30 +01:00
Michael Natterer 8184296b3c app: add gimp_container_get_neighbor_of() to GimpContainer
instead of gimp_container_get_neighbor_of_active() in gimp-utils.c.
Move the additional GimpContext logic of the old function into the
callers, but use the new function in more places.
2011-03-13 02:14:44 +01:00
Michael Natterer b1d6f1b0fd app: lose "default" from protected GimpViewRenderer rendering API
and rename render_surface() to render_temp_buf().
2011-03-08 17:12:39 +01:00
Michael Natterer a2d27983d6 app: remove widget parameter from gimp_view_renderer_default_render_surface() 2011-03-08 17:03:30 +01:00
Michael Natterer e69ecba237 app: move all GimpSettingsBox members to private 2011-03-08 11:32:49 +01:00
Michael Natterer b8d148283b app: move all GimpSettingsEditor members to private 2011-03-08 02:32:14 +01:00
Michael Natterer fcfb7cf160 Use the new g_[s]list_free_full() instead of foreach() and free() 2011-03-07 17:11:28 +01:00
Michael Natterer fc7bd98d92 app: move all GimpStrokeOptions members to private 2011-03-05 21:00:28 +01:00
Michael Natterer c550eae5e1 app: move all GimpImagefile members to private 2011-03-02 12:26:04 +01:00
Michael Natterer 5b09e61c46 app: move all GimpTemplate members to private 2011-03-02 10:16:43 +01:00
Michael Natterer 0bb5a76405 app: fix wilber dawing offset on widgets that don't have a window 2011-03-01 17:11:22 +01:00
Michael Natterer 30e847c921 app: forgot to implement dragging from GimpContainerIconView 2011-03-01 15:32:08 +01:00
Michael Natterer f45e171f09 app: place the gimpview-popup at the button event's root coordinates
instead of fiddling with the widget's and its window's positions.
2011-03-01 14:53:54 +01:00
Michael Natterer f82daa557a app: pack stuff in boxes instead of tables in GimpDeviceStatus
Makes the widget work correctly in all allocation situations.
2011-03-01 13:28:58 +01:00
Michael Natterer 30100cf613 app: add new widget GimpIconPicker, ripped out of GimpTemplateEditor 2011-03-01 12:31:17 +01:00
Michael Natterer f0f94ba6a1 app: move all GimpTemplateEditor members to private 2011-03-01 11:50:16 +01:00
Michael Natterer d3a83c9940 app: fix export and delete sensitivity in GimpSettingsEditor
and make sure "select-item" is emitted also when NULL is selected,
so the sensitivity is set correctly.
2011-03-01 01:29:35 +01:00
Michael Natterer 9cac8e7b42 app: GimpDeviceStatus: don't call gdk_display_get_name() on a NULL display 2011-02-28 17:36:53 +01:00
Michael Natterer 3a767c0c15 app: get rid of the arrow in GimpDeviceStatus
Instead, use an event box and set its state to SELECTED when the
device is active. Also cleaned up spacings and general appearance a
bit. Still a mess.
2011-02-28 16:43:21 +01:00
Michael Natterer a1712a0ec7 app: emit "changed" when GimpDeviceInfo's device gets (un)set 2011-02-28 16:08:12 +01:00
Michael Natterer b21f5be73f app: use GimpDeviceInfo's accessors 2011-02-28 15:55:02 +01:00
Michael Natterer c49a7113e5 app: set the device manager's sort_func via g_object_new()
Setting it in init() had it overwritten by NULL because it's a
construct property.
2011-02-28 15:48:13 +01:00
Michael Natterer ee844c6395 app: GimpDeviceManager refactoring part two
- change gimp_devices_get_list() to gimp_devices_get_manager()
- remove gimp_devices_get_current()
- let GimpDeviceStatus connect to the manager's "notify::current-device"
  directly and remove device status updating code from gui.c
- cleanup in gimpdevices.c
2011-02-28 14:37:00 +01:00
Michael Natterer 21a0e55005 app: device manager refactoring part one
Add a GimpDeviceManager object and take over most code from
gimpdevices.c, but leave all functions in gimpdevices.c there as
wrappers in order to make rebasing in gtk3-port simpler.
2011-02-28 12:57:15 +01:00
Michael Natterer c11b0d2a79 app: move tool event debug output to a utility function
to reduce clutter in gimp_display_shell_canvas_tool_events().
2011-02-24 12:34:57 +01:00
Michael Natterer ac9ffde880 app: formatting and other minor cleanups 2011-02-22 16:27:18 +01:00
Michael Natterer 7a8600e6bd app: use gdk_flush() in gimp_widget_flush_expose()
instead of a completely bogus event processing loop which had no
effect but flushing the event queue implicitly.
2011-02-22 15:07:17 +01:00
Michael Natterer 8333dfde7b Add some #if GTK_CHECK_VERSION (2, 24, 0) for creating foreign window
so we don't use deprecated API and make the gtk3 port simpler.
2011-02-16 22:51:02 +01:00
Michael Natterer 31b4d3801e libgimpwidgets: add properties GimpColorButton:area-width and :area-height 2011-02-15 20:55:32 +01:00
Michael Natterer 95f14f5de8 app: add an "edit-name" binding signal and default to F2 2011-02-14 20:01:08 +01:00
Mikael Magnusson 8e49a5fafb app: fix a typo 2011-02-12 18:16:05 +01:00
Michael Natterer ec196a8ac4 app: allow to set a color for GimpCurveView's primary curve
and redo how the curves tool sets its curves in order to support this
without code duplication. Also change the color of the yellow curve in
the dynamics output editor to orange because yellow is hardly visible.
2011-02-10 20:05:50 +01:00
Michael Natterer 3ba0554628 app: use proper vivid colors for the background curves
instead of dull ones. The curve view already displays them with 0.5
opacity, so there is no reason to make them even harder to distinguish.
2011-02-09 09:26:06 +01:00
Michael Natterer aaee95d545 app: experimentally color the background curves 2011-02-09 01:07:48 +01:00
Michael Natterer 6c252921af app: handle the inputs generically in GimpDynamicsOutputEditor
instead of having explicit code for each input in all functions.
2011-02-09 00:27:25 +01:00
Michael Natterer 5a28791cfb app: connect to the background curves' "dirty" signal in GimpCurveView
and make sure curves are not added twice to the background list.
Also warn when trying to remove a non-existent background curve.
2011-02-09 00:24:43 +01:00
Michael Natterer 2ed861fb8d Bug 638795 - Brush Dynamics Curve editor stutters
Update the toggles in the treeview only if a boolean property of the
output changes, and not on *each* output change which includes each
tiny curve editing.

Also fix formatting in the whole file.
2011-02-08 22:09:52 +01:00
Michael Natterer e3b5c55ca2 Bug 597117 - impossible to drop a group as a sibling inside a group
Properly distinguish between dropping after a group and into it, by
having three drop areas on a collapsed row. Still handle expanded rows
as before, but indicate dropping into visually just as on a collapsed
row.
2011-02-08 09:35:38 +01:00
Michael Natterer 92f130fbc3 app: also run device history coords through the axis mapping curve function 2011-02-06 13:26:25 +01:00
Michael Natterer f4af9b549e Globally switch to saying "window_id" instead of just "window"
when dealing with native window handles. Also get rid of using
GdkNativeWindow and simply consistently use guint32 all over the
place. This is more obvious and consistent and keeps the diff to the
gtk3-port branch smaller.
2011-02-06 12:07:55 +01:00
Michael Natterer 012eb1dd93 app: zero the reallocated keys and axes arrays in GimpDeviceInfo 2011-02-06 11:20:07 +01:00
Michael Natterer e309d3cdf8 app: check that the model is not NULL before using it in GimpContainerComboBox
to be safe against GimpContainerView API being called during widget
destruction.
2011-02-06 11:20:07 +01:00
Michael Natterer 11ac0296b9 app: ref/unref the context in gimp_image_editor_set_context() 2011-02-06 11:20:07 +01:00
Martin Nordholts 366cddc856 app: gimp_image_get/set_imported/exported/save_a_copy_uri()
Add more proper core API for GimpImage URI management.
2011-02-02 22:28:46 +01:00
Martin Nordholts d449317501 app: Add and use gimp_image_get_string_untitled() 2011-02-02 22:28:46 +01:00
Alexia Death 60a77f6db2 app: Fix and enable duplicate for dynamics 2011-02-02 21:48:10 +02:00
Martin Nordholts 480d6e0cf2 app: Add and use gimp_image_get_uri() 2011-01-26 08:19:39 +01:00
Martin Nordholts ac773489e4 app: gimp_image_get_uri() -> gimp_image_get_uri_or_untitled() 2011-01-26 07:55:14 +01:00
Michael Natterer 27179d6219 app: don't duplicate code when setting GimpSpinScale's cursor 2011-01-22 23:23:02 +01:00
Michael Natterer e27b5f6da2 app: remove unused variable in gimp_channel_tree_view_constructed() 2011-01-20 20:26:35 +01:00
Michael Natterer 4186d0114f app: add comment to improve readability 2011-01-20 20:26:34 +01:00
Michael Natterer 550669962b 622863 - Input Devices list is not resizeable
Derive from GtkPaned instead of GtkBox, and change the handle size to
12px via gtkrc so spacing rules are followed.
2011-01-20 20:26:34 +01:00
Michael Natterer 202124c438 app: implement GObject::constructed() instead of ::constructor() 2011-01-14 09:38:46 +01:00
Michael Natterer 229007106e app: don't pass the GtkStyle to gimp_curve_view_draw_grid()
Instead, set the cairo color in expose() before calling
draw_grid(). Also move a few lines of code around to make
the GTK3 port simpler.
2011-01-11 15:38:23 +01:00
Michael Natterer 0f0da4c712 app: various gradient editor changes and fixes
- return TRUE from event handlers if we handled the event
- remove the "instant update" toggle and feature
- move the color area left of the labels now that the toggle is gone
2011-01-07 15:09:17 +01:00
Michael Natterer 5caee48645 app: run all input axes through gimp_device_info_map_axis()
and let that function alone worry about whether there actually is a
curve for that axis.
2010-12-20 20:00:47 +01:00
Michael Natterer 62b0e96609 app: add gimp_devices_add_widget()
which is supposed to set up a widget for tablet events and make sure
the context changes on device changes. "supposed" because everything
is currently horribly broken on GTK+ 2.x. Use the function for all
affected widgets except for the canvas.
2010-12-19 21:23:54 +01:00
Michael Natterer 1e013e774c app: some cleanup in gimp_paned_box_position_drop_indicator() 2010-12-18 23:28:20 +01:00
Michael Natterer 4609bab1dd app: use gtk_entry_set_width_chars() to override GtkEntry's default width 2010-12-09 23:45:00 +01:00
Michael Natterer bb91ba9d01 app: update the device name's style when devices get added/removed
This can't happen on GTK+ 2.x but why should I keep this generic code
on a branch.
2010-12-09 22:56:58 +01:00
Michael Natterer 9c98b0b804 app: sort present devices to the beginning of the device list
and make sure the core pointer is always first in the list.
2010-12-09 22:02:24 +01:00
Michael Natterer 6e2d56a9b8 app: don't reverse the device list after loading, it's sorted by name 2010-12-09 21:46:01 +01:00
Michael Natterer 8bc0e569ec app: use gimp_object_name_collate() when sorting device names 2010-12-09 21:45:04 +01:00
Michael Natterer d91a1d5b6c app: don't call g_object_set_data() on a NULL object 2010-12-09 20:55:53 +01:00
Mikael Magnusson 60242667be app: don't use -1 for geometry hints where not allowed 2010-12-08 10:18:09 +01:00
Michael Natterer 0ba0b637f2 app: add gimp_devices_check_callback() with the signature of an event callback
and use it in the toolbox. Will soon be used in more places.
2010-12-06 10:23:15 +01:00
Michael Natterer e50f6aaf0f app: make gimp_devices_select_device() private 2010-12-06 10:18:32 +01:00
Michael Natterer d6f28f2274 Bug 550662 - DND prefers text/plain over text/svg+xml, should be other way around
Move the call to gimp_dnd_uri_list_dest_add() to the end of the DND
setup code because it adds text/plain for legacy URI DND support,
which is way too generic to be handled first.
2010-11-29 22:04:56 +01:00
Michael Natterer 4b729086a9 app: cast GtkTargetEntry.target to gchar* when freeing it
because it was made const in GTK+.
2010-11-29 15:41:38 +01:00
Michael Natterer c4ec18790c Bug 598253 - Bug when copying path from a document to another document
Don't scale the SVG to image size when pasting or importing. SVGs have
a size just as pixel images, and there is no reason not to use that
size as-is.
2010-11-27 22:28:34 +01:00
Michael Natterer b1106845d4 app: the tool-list and tool-grid views are gone, don't try to open them 2010-11-26 10:44:46 +01:00
Michael Natterer 88f2af98aa app: clean up the dynamics editor
Also fix its sensitivity when a read-only data is set. Fixes bug
curves).
2010-11-24 23:01:50 +01:00
Michael Natterer ef87b83ff0 app: change toolbox geometry hints to something that's closer to the docs
Feels more correct now when resizing, but not really.
2010-11-20 20:44:16 +01:00
Michael Natterer a598b2d1be app: I don't know what I was thinking when changing these function names... 2010-11-20 20:37:15 +01:00
Michael Natterer 74a09704ba app: some toolbox cleanup
Add precondition checks and assertions for needed members and remove
unused API.
2010-11-20 15:19:48 +01:00
Michael Natterer e4a96c738e app: factor out duplicated code to gimp_tool_palette_get_button_size()
and use that function in GimpToolPalette and GimpToolbox.
2010-11-20 10:20:52 +01:00
Michael Natterer 281969b45d app: add GimpToolPalette which derives from GtkToolPalette
and move all of GimpToolbox' tool button code there.
2010-11-19 23:52:09 +01:00
Michael Natterer 6960dda6f2 app: draw GimpSpinScale's label with style->text, not style->fg 2010-11-19 14:08:37 +01:00
Michael Natterer dc564954d5 app: namespace the ink blob
Blob -> GimpBlob, blob_foo() -> gimp_blob_foo() etc.
2010-11-14 16:43:21 +01:00
Michael Natterer c4cd420ef8 app: rename GIMP_INK_BLOB_TYPE_ELLIPSE to GIMP_INK_BLOB_TYPE_CIRCLE
- TYPE_SQUARE is also named SQUARE and not RECTANGLE
- serialization doesn't suffer from the changed name because it's the
  default value that never gets serialized
- a lot of messy code in the ink options can be replaced by a one-liner
  because the enum names now match their resp. stock items
2010-11-14 16:29:42 +01:00
Michael Natterer 1741d39d8b app: gimp_widget_flush_expose() return if the widget is not drawable 2010-11-10 00:13:07 +01:00
Michael Natterer cacf8b550f app: add gimp_widget_flush_expose() utility function
which flushes all pending exposes for a widget without running the
main loop. Useful for updating progress bars without returning to the
main loop.
2010-11-09 19:33:15 +01:00
Michael Natterer 71de3d7bdf app: use "pixels/unit" as label for the resolution menu
instead of "pixels/abbreviated unit". This is soon going to be
supported generically by GimpUnitComboBox just as with the old unit
menu.
2010-11-05 16:24:37 +01:00
Alexia Death dfd5470a2e Merge remote branch 'origin/master' into soc-2010-cage-2 2010-11-04 20:00:36 +02:00
Alexia Death 27c77e6a5e Merge branch 'master' into soc-2010-cage-2 2010-11-04 00:41:45 +02:00
Mikael Magnusson 90e525ca09 app: use a spin scale for the brush size (have to limit size to 1000 temporarily) 2010-11-02 14:41:21 +01:00
Michael Natterer 8f991c5950 app: make the brush, pattern etc selecing boxes more compact
by integrating their label instead of requiring one externally. This
way we get rid of some more labels in the tool options. Also clean up
tool options further (add more spin scales, and some general
reordering and spacing cleanup).
2010-11-02 14:05:47 +01:00
Michael Natterer 37038ab77f app: add an opacity prop scale 2010-11-01 22:07:39 +01:00
Michael Natterer 8bf497294e app: enable adjustment based prop widgets for all numeric param types 2010-11-01 21:48:19 +01:00
Michael Natterer e84a0eebf9 app: fix gimp_prop_spin_scale_new() by setting the pspec on the right object 2010-11-01 20:54:43 +01:00
Michael Natterer 864e6bdfc0 app: don't show a text cursor when not over the editable text 2010-11-01 20:51:13 +01:00
Michael Natterer 01f4bad1f6 app: add gimp_prop_spin_scale_new() 2010-11-01 20:04:35 +01:00
Michael Natterer ae3afca697 app: add new widget GimpSpinScale which is a combined spinbutton and scale 2010-11-01 20:03:39 +01:00
Martin Nordholts 48690d60e1 app: Add gimp_tools_get/set_tool_options_gui()
Add gimp_tools_get_tool_options_gui() and
gimp_tools_set_tool_options_gui() widgets utility functions.
2010-10-31 13:05:15 +01:00
Michael Natterer b9a7c121a4 app: don't inherit from GtkHBox or GtkVBox
Instead, inherit from GtkBox directly and set the orientation in
init().  Replace more gtk_container_add() by gtk_box_pack_start() in
the reparented classes.
2010-10-30 15:44:46 +02:00
Michael Natterer 060a08da5a app: +1 2010-10-30 15:43:56 +02:00
Michael Natterer 56dee7245a app: and one more 2010-10-30 15:43:17 +02:00
Michael Natterer ebc92dc5b4 app: more gtk_container_add -> gtk_box_pack_start 2010-10-30 15:42:25 +02:00
Michael Natterer 0829e5b028 app: simplify how the colormap editor sets FG/BG colors
Set the FG/BG on the widget's own context and remove the "selected"
signal and its callback in dialogs-constructors.c
2010-10-28 03:09:53 +02:00
Michael Natterer 112ca01064 app: bye bye deprecated GtkPreview
Use a GimpPaletteView for the colormap editor.
2010-10-28 02:16:52 +02:00
Michael Natterer 32d5d1681b app: don't crash if the palette is NULL 2010-10-28 02:16:52 +02:00
Michael Natterer 9dee789cfd app: emit "update" when the viewable goes away via the weak notify 2010-10-28 02:16:51 +02:00
Alexia Death e8df164366 app: Add dynamics selector to the tool options 2010-10-27 21:49:24 +03:00
Michael Natterer d1307a84a4 app: return TRUE from button_press() so the event doesn't get to the notebook 2010-10-27 15:39:52 +02:00
Michael Natterer f46122b862 app: add lots of accessors to GimpPalette
and use them all over the place instead of directly accessing the struct.
2010-10-27 14:36:44 +02:00
Michael Natterer 6fc4c42298 Bug 348183 - palette editor doesn't show all palette colors
Remove a crack eventbox and a double crack alignment and suddenly the
widget behaves properly. I have no idea what "important" feature I
killed with that removal, but the whole palette editing code needs
some serious chopping soon.
2010-10-25 22:54:55 +02:00
Michael Natterer 71ab7f4291 app: cairo_translate() by allocation.x,y 2010-10-22 18:46:57 +02:00
Michael Natterer 8f8ea74d1f app: return TRUE from button and motion callbacks because we handled the events 2010-10-21 13:19:51 +02:00
Michael Natterer 199804bce5 app: fix alphabetic order 2010-10-21 12:02:49 +02:00