Commit Graph

4182 Commits

Author SHA1 Message Date
Michael Natterer f72806bbcd app: fix GimpContainerTreeView name editing so it always works the same
no matter how editing was started (double click, keyboard activate, F2).

Connect to "editing-started" of the name cell and set the object's
real name directly on the GtkCellEditable, instead of trying to hack
around in the tree store before the actual editing starts.
2012-02-06 19:28:37 +01:00
Michael Natterer 947ea55a07 app: chain up last in gimp_container_tree_view_set_context()
so all the view renderers already have the right context when the
parent interface code selects the right item, which in turn requires
the context to be already set on the renderers. Fixes warnings when
dragging dockables around.
2012-02-06 01:33:01 +01:00
Alexia Death c585737f3a app: Add import type as third preference on Export 2012-02-02 21:17:35 +02:00
Michael Natterer 17f1f2a2fa app: use G_N_ELEMENTS() and remove GIMP_N_TAB_STYLE_CANDIDATES define 2012-02-01 20:38:10 +01:00
Michael Natterer d11f9d7dbf Bug 664885 - Open 'Document History' --> always a additional history tab appears
Really find a *widget* in gimp_dialog_factory_find_widget(), don't
just return the first found session info's widget. It's perfectly fine
for a session info to have a NULL widget, if that dialog is not
currently open.
2012-01-31 22:00:17 +01:00
Michael Natterer cac442c2df app: port dockable showing in widgets/ to GimpWindowStrategy 2012-01-30 23:52:59 +01:00
Michael Natterer 0a68527edc app: move the GimpWindowStrategy interface from display/ to widgets/ 2012-01-30 23:33:21 +01:00
Michael Natterer 92693f40b6 app: allow to pass an identifier list to gimp_dialog_factory_find_widget()
Which is right for all external users, GimpDialogFactory itself splits
the identifier list itself if needed before finding a specific dialog.
2012-01-30 22:51:51 +01:00
Michael Natterer 569b262e2d app: various tool options and tool preset fixes
- move the code that sets the tool options' "defined" and "serialize"
  properties from GimpToolInto to GimpToolOptions so they are always
  set correctly.
- make GimpToolOptions fix broken serialized NULL tools automatically.
- make sure a GimpToolPreset's tool options always has a tool set. If all
  fails, set a NULL tool explicitly and let the logic in GimpToolOptions
  find the right tool.
- set GimpToolPreset's "use" booleans to FALSE for context properties
  that have no effect on the tool.
- set GimpToolPresetEditor's toggle insensitive for these properties.
2012-01-23 22:40:49 +01:00
Michael Natterer 313430b738 app: move all GimpToolPresetEditor members to a private struct 2012-01-23 00:56:21 +01:00
Michael Natterer f593175924 app: GimpCurveView: clean up code and better axis label positioning 2012-01-15 22:54:57 +01:00
Michael Natterer c00457382e app: GimpColorFrame: no need to cairo_fill() after pango_cairo_show_layout() 2012-01-15 22:48:55 +01:00
Alexia Death 8d0016023b app: fix get/set mixup in curve view 2012-01-15 21:37:30 +02:00
Alexia Death 3f7ee00469 app: Add axis lables to dynamics curves and curveview 2012-01-15 02:56:35 +02:00
Martin Nordholts 4ac7bcc624 app: Add 'create_containers' to gimp_dialog_factory_dialog_new_internal()
Because to fix bug 664885 we will want to pass context = NULL while
still not having any containers created for us.
2012-01-10 21:13:08 +01:00
Martin Nordholts 40d98b79cb app: A '|' in identifiers is not a special case 2012-01-10 20:51:08 +01:00
Martin Nordholts 64d2dc122a app: Add and use gimp_dialog_factory_find_widget() 2012-01-10 19:47:52 +01:00
Michael Natterer 056e09a6cb Remove the makefile.msc build system, it is unmaintained since 2008 2011-12-16 15:53:56 +01:00
Michael Natterer 42a5f8f834 Bug 666065 - "you can drop dockable dialog" of the toolbox
Set the height request of the "You can drop dockable dialogs here"
label to 0, so the toolbox can be properly resized to its minimum
again.
2011-12-16 09:40:54 +01:00
Michael Natterer a25bfabc43 app: properly memory manage GimpColorSelectorPalette's context
so we don't access garbage pointers when the widget is moved between
docks, like when toggling SWM.
2011-12-11 02:44:14 +01:00
Michael Natterer 180cb656ae Remove more gdk_pointer_grab() where they are not strictly needed
and replace them by gtk_grab_add()/remove().
2011-12-10 21:51:05 +01:00
Michael Natterer 01f92a3b48 app: get rid of server grabs for almost all canvas interaction
Because it's generally the right thing to do, and server grabs broke
badly with input devices / client side windows.

gimpdisplayshell-grab.c: change logic to only server-grab if an event
is passed to the pointer grab/ungrab functions, but always use
gtk_grab_add/remove() which is sufficient in most cases.

gimpdisplayshell-tool-events.c: have the grab functions grab the
server only for space-bar scrolling and do all tool interaction,
including ruler clicks, with gtk_grab_add/remove(). Refactor things
a bit to also use the grab API for button-2 scrolling.

gimpdeviceinfo-coords.c: transform the event's coords to the canvas'
coordinate system, they might come from a ruler now.

This fixes the following bugs:

Bug 645315 - gimp_display_shell_pointer_grab: gdk_pointer_grab failed...
Bug 644351 - Gimp misses some strokes especially when drawing fast
Bug 645747 - Gimp is now unusable on xfce4
2011-12-09 20:20:02 +01:00
Michael Natterer dcf84f3910 app: set the correct resolution on the text style overlay's size entry 2011-12-03 23:56:51 +01:00
Michael Natterer af0570372d app: GimpTagEntry formatting cleanup, no logic changes 2011-12-01 20:24:37 +01:00
Michael Natterer 1d9ca9cdca app: remove gtk_check_version(2,24,7) code from GimpActionGroup 2011-12-01 12:07:43 +01:00
Michael Natterer 9781aa65ea Bug 658467 - Replace g_format_size_for_display() by g_format_size()
Use g_format_size() instead of g_format_size_for_display() because
the latter is deprecated.
2011-11-30 23:37:55 +01:00
Michael Natterer 9cd3e005aa app: fix the PDB GimpBrushSelect dialog
It was warning like crazy and not showing opacity and paint mode
widgets.
2011-11-25 13:57:28 +01:00
Massimo Valentini c34348a2cd app: silence a harmless Gimp-Core-CRITICAL
Dragging a channel preview (not RGBA) over a layer preview
GIMP used to print:

Gimp-Core-CRITICAL **: gimp_container_get_child_index: ...
           assertion `GIMP_IS_CONTAINER (container)' failed
2011-11-18 18:36:20 +01:00
Michael Natterer ca17c91d9e app: don't unparent the menu_button in gimp_dockbook_dispose()
because we don't own it. GTK+ failing to destroy it is no reason, this
needs to be fixed in GtkNotebook.
2011-11-17 00:17:46 +01:00
Michael Natterer a547cc0940 app: don't leak GimpViewRendererImagefile's GtkIconInfo 2011-11-04 01:32:50 +01:00
Michael Natterer c166e494ce Bug 662948 - Wilber is squeezed
Separate Wilber sizing from GimpDock::set_host_geometry_hints()
because that method is never called in single-window mode.
2011-11-02 00:31:23 +01:00
Michael Natterer 16aae588b9 app: no need to move that assignment
and no need to initialize the entire struct explicitly.
2011-10-13 11:30:02 +02:00
Mukund Sivaraman d047b1ca41 app (widgets): Init child_allocation, or garbage is added to action_allocation.y 2011-10-13 10:32:12 +05:30
Michael Natterer 846392b66c app: move the "exclusive visible" logic to the core
but don't fix it for item trees yet (refactoring only). Kill the
"exclusive liked" function which only existed because it was so easy
to have, but was always utterly useless. Prove me wrong and I will
revive it.
2011-10-12 16:05:57 +02:00
Michael Natterer fffd1920e2 app: don't hardcode MOD2 in GimpContainerTreeView either
Add new utility function gimp_get_all_modifiers_mask() which returns
all modifiers used for "useful" things on the current platform, like
in the commit below.
2011-10-10 00:17:20 +02:00
Michael Natterer 6c660e7ad5 app: add property GimpDataFactoryView:action-group
and remove the public gimp_data_factory_view_construct().
2011-10-09 22:12:32 +02:00
Michael Natterer b3db7e6c4e app: rename all tool-preset dialog related things to "tool presets"
not just "tool preset". It's also "brushes", "patterns" etc. and not
just "brush" or "pattern".
2011-10-09 21:55:58 +02:00
Michael Natterer 04e8ae8435 app: add menu-related properties to GimpContainerEditor
and remove the public gimp_container_editor_construct(), so this class
behaves like a proper object now.
2011-10-09 21:45:02 +02:00
Michael Natterer 4ba905052b app: remove most code from the public gimp_container_editor_construct()
and move it to GObject::constructed().
2011-10-09 21:19:14 +02:00
Michael Natterer 5f3b3dafb9 app: add view-size and view-border-width props to GimpContainerEditor
and remove them from the various public construct() functions.
2011-10-09 21:04:49 +02:00
Michael Natterer bef55fbb66 app: add view-type, container and context props to GimpContainerEditor
and remove them from the various public construct() functions. Had to
change construction in GimpDataFactoryView slightly because of GObject
construct property constraints.
2011-10-09 20:40:56 +02:00
Michael Natterer 3bf3b55536 app: add property GimpDataFactoryView:data-factors
and remove it from the evil public construct() function.
2011-10-09 19:08:31 +02:00
Michael Natterer 11239c4b17 app: don't use g_list_length() to check if a list is empty 2011-10-09 00:27:53 +02:00
Michael Natterer d310dacbb1 app: remove "foo && " from "foo && GTK_IS_FOO (foo)" 2011-10-09 00:18:56 +02:00
Michael Natterer 374f4e5628 app: let GimpContainerTreeView's parent class handle MOD2-click 2011-10-07 01:02:54 +02:00
Michael Natterer e5edb1188d app: more s/GDK_CONTROL_MASK/gimp_get_toggle_behavior_mask()/ 2011-10-07 01:02:54 +02:00
Michael Natterer e2feb0c16f app: use gtk_widget_get_modifier_mask() in GimpWindow
to figure the primary accel modifier, so this code is now generic.
2011-10-07 01:02:54 +02:00
Michael Natterer efd9906e85 app: remove gimp_get_mod_separator(), it's unused now 2011-10-07 00:34:43 +02:00
Michael Natterer a38faefba7 app: use toggle_behavior_mask not CONTROL to trigger zoom-on-scroll 2011-10-07 00:00:42 +02:00
Michael Natterer 1bff8224ad app: use the toggle_behavior_mask instead of CONTROL to pick BG
And don't use gimp_get_mod_separator().
2011-10-07 00:00:42 +02:00
Michael Natterer 2ee5dbb98c app: use toggle_behavior_mask instead of CONTROL in GimpThumbBox
Also, don't use gimp_get_mod_separator() but a translatable "-"
because the separator is empty on OSX.
2011-10-07 00:00:42 +02:00
Michael Natterer c7d9988a7f app: make gimp_suggest_modifiers() work on OSX
by checking for gimp_get_toggle_behavior_mask() instead of
GDK_CONTROL_MASK. This is a total hack but happens to simply
do the right thing on all platforms.
2011-10-06 22:56:05 +02:00
Michael Natterer 6d1b5c4241 app: pull virtual modifier replacement into gimp_get_mod_string()
and remove it from all other places. We only want to have the virtual
modifiers when displaying a modifier string (and in some other cases,
but these are all handled internally by GTK+).
2011-10-06 22:56:05 +02:00
Michael Natterer f4141d6942 app: add a utility function that returns the "constrain" modifier 2011-10-06 16:42:42 +02:00
Michael Natterer c0610697cb app: remove widget parameter from gimp_modifiers_to_channel_op()
and simply use the default keymap.
2011-10-06 16:33:05 +02:00
Michael Natterer 10a9c660f8 app: add utility functions which return modifier masks
Simply get the masks from the default display's keymap, since
the widget makes absolutely no difference here.
2011-10-06 16:33:05 +02:00
Michael Natterer 4b3d3fe431 app: port the channels and paths dialog to portable selection modifiers
instead of hardcoding SHIFT and CONTROL.
2011-10-05 19:26:54 +02:00
Michael Natterer f22d6b9d3b app: use the portable EXTEND_SELECTION modifier instead of SHIFT 2011-10-05 19:26:54 +02:00
Michael Natterer 16d4d6fa94 app: replace virtual modifiers before displaying them as GimpEditor tooltip 2011-10-05 19:26:53 +02:00
Michael Natterer 9e44a199e5 app: use gimp_modifiers_to_channel_op()
instead of replicating its logic in a non-portable way.
2011-10-05 19:26:53 +02:00
Michael Natterer fdf103ce08 app: add more modifier utility functions to gimpwidgets-utils.[ch]
- gimp_modifiers_to_channel_op() translates a modifier state to REPLACE,
  ADD, SUBTRACT or INTERSECT.

- gimp_replace_virtual_modifiers() uses gdk_keymap_add_virtual_modifiers()
  to replace the physical bits in a modifier state to their virtual
  counterparts (and not just adds the virtual ones like the GDK
  function).
2011-10-05 19:26:53 +02:00
Michael Natterer f45cccbc82 app: make gimp_get_mod_string() a bit nicer 2011-10-05 18:47:37 +02:00
Michael Natterer 3982ddc39b app: implement gimp_get_mod_string() using gtk_accelerator_get_label()
so it can handle all modifiers (also Mac ones).
Remove gimp_get_mod_name_shift,control,alt().
2011-10-05 01:30:59 +02:00
Michael Natterer 1459f5bb61 app: unparent GimpDockBook's menu button in dispose() not finalize()
because unparenting requires a fully functional object that can
be used as signal parameter. I have no clue why this doesn't
trigger criticals on X11.
2011-10-04 23:54:42 +02:00
Michael Natterer f1d4dde36a libgimpwidgets: add gdk_event_triggers_context_menu() to gimp3migration.[ch]
and remove gimp_button_event_triggers_context_menu() again. Update
all callers to use the new function.
2011-10-02 16:23:59 +02:00
Michael Natterer 2c175b068d libgimpwidgets: add gtk_paned_new() to gimp3migration.[ch]
and use it all over the place.
2011-10-02 14:36:42 +02:00
Michael Natterer 16817c666f libgimpwidgets: add gtk_scrollbar_new() to gimp3migration.[ch]
and use it all over the place.
2011-10-02 14:36:41 +02:00
Michael Natterer f342b50483 libgimpwidgets: add gtk_button_box_new() to gimp3migration.[ch]
and use it all over the place.
2011-09-30 15:44:33 +02:00
Michael Natterer 3e336199b9 app: use gtk_box_new() 2011-09-30 11:29:11 +02:00
Alexia Death cd2a1a92fc app: Add configurable path for tool presets in preferences 2011-09-29 20:29:49 +03:00
Massimo Valentini 0f03ed9e05 Bug 616416: hidden layer groups appear again after an image change
Introduced two virtual functions to a GimpViewable

'set_expanded' and 'get_expanded'

and a PROP_GROUP_ITEM_FLAGS to load/save the expanded state
of layer_groups and use them.
2011-09-25 21:57:20 +02:00
Massimo Valentini a67bb11cf5 Revert "Bug 616416: hidden layer groups appear again after an image change"
This reverts commit 359c9c22d9.
2011-09-25 21:49:36 +02:00
Massimo Valentini 359c9c22d9 Bug 616416: hidden layer groups appear again after an image change 2011-09-25 21:38:50 +02:00
Michael Natterer c3c40fd45f Bug 545910 - crash when selecting a font after a search
Add an explicit search entry, so the treeview's automatic search
popup doesn't break our grab and closes the dialog in the middle
of setting up the serach popup.
2011-09-24 10:58:48 +02:00
Michael Natterer 69f55d0fb0 Bug 152259 - Revert button in GimpDataEditor is not implemented
Hide the button instead of only setting it insensitive.
2011-09-24 00:55:37 +02:00
Mikael Magnusson fdb69d20d5 Revert accidental usage of gtk_box 2011-09-24 00:44:14 +02:00
Michael Natterer 4e3c308931 Bug 658902 - Show different icon for visible layer group members of...
Set the "eye" renderer to inconsistent state if the item is visible,
but not effectively viewable because one of its parents is invisible.
2011-09-23 23:45:10 +02:00
Michael Natterer 0e1d07d129 Bug 659446 - Missing plural handling for...
Use ngettext() instead of simply _().
2011-09-23 23:09:26 +02:00
Michael Natterer d92cd2f6c8 Add gimp_button_event_triggers_context_menu() and use it
instead of checking for event->button == 3, so context menus
work correctly on the Mac. Didn't change the image menu yet
because thet requires some more refactoring.
2011-09-19 00:47:23 +02:00
Michael Natterer f8a2644b13 app: sanitize event->button checking in GimpNavigationView
Use if() instead of switch() with one case:, and ignore
double and triple clicks.
2011-09-18 19:49:05 +02:00
Michael Natterer 7656e2bda1 app: make gimp_window_key_press_event() do the right thing on a Mac
which is look at the right modifier when checking if a key event
can invoke an accelerator. Also get the mnemonic modifier from
GTK instead of hardcoding it, and don't check for it if mnemonics
are disabled, which is the right thing to do on all platforms.
2011-09-17 23:26:58 +02:00
Michael Natterer 3066a8228a app: use <primary> instead of <control> in accelerator strings
but generically change it back to <control> for GTK+ < 2.24.7.
This enables using the Command modifier on OSX,
2011-09-16 22:59:58 +02:00
Mukund Sivaraman 6080c11161 Revert "Bug #658816 - Add a spellchecker to the comment editor"
This reverts commit 978c96bbc6, which is
probably not such a great idea.
2011-09-13 00:33:33 +05:30
Mukund Sivaraman 978c96bbc6 Bug #658816 - Add a spellchecker to the comment editor
This is an initial version and can be improved. Something is better
than nothing.  :)
2011-09-12 19:36:35 +05:30
Massimo Valentini 779756bc51 app: draw Wilber as in gimp-2.6
Apparently wilber_get_extents is called the first time
with a cairo_t with device_offset different than the other
times, since the path is copied the first time, afterwards
it appears offset.
2011-09-02 18:07:34 +02:00
Michael Natterer 4c9a2f1729 app: remove trailing whitespace in GimpToolPalette 2011-08-21 17:43:39 +02:00
Martin Nordholts c0208e70c0 app: Resurrect "You can drop dockable dialogs here"
Resurrect the help string "You can drop dockable dialogs here" inside
GimpPanedBox. It got killed when we removed GimpDockSeparator.
2011-08-16 22:33:39 +02:00
Martin Nordholts a5ef51137d Revert "app: #include "gimptoolpalette.h" in gimptoolpalette.c"
This reverts commit c19560b08c.
It was already included, don't know how I could miss that.
2011-08-09 19:52:35 +02:00
Martin Nordholts 2fd159ae06 app: Only initialize tools once 2011-08-07 20:49:49 +02:00
Martin Nordholts 1a8a806d43 app: Make GimpToolbox use parent UI manager
Make GimpToolbox and GimpToolPalette use the GimpUIManager and
GimpDialogFactory of the top container instead of holding references
on their own. If they hold references on their own, we need to update
these when we move e.g. GimpToolbox between different top level
containers such as GimpDockWindow and GimpImageWindow. Failure to do
this cased problems talked about in bug 646794 (case 2).
2011-08-07 20:00:28 +02:00
Martin Nordholts 77ac7ffa90 app: Add gimp_tool_palette_initialize_tools() 2011-08-07 20:00:05 +02:00
Martin Nordholts c19560b08c app: #include "gimptoolpalette.h" in gimptoolpalette.c
It's just weird not to.
2011-08-07 20:00:05 +02:00
Martin Nordholts a5029b8c4c app: Remove dead GimpToolPalette code 2011-08-07 18:02:55 +02:00
Martin Nordholts f8e840d85b app: Document GimpUIManager a bit 2011-08-07 17:04:36 +02:00
Martin Nordholts 537dae8de7 app: Remove more gimp-remote stuff
It's enough to setup gimp_toolbox_drop_uri_list() on the vbox.
2011-08-04 21:09:50 +02:00
Michael Natterer 97c5a2817d app: s/GTK_IS_VBOX/GTK_IS_BOX/ to simplify the gtk3-port branch 2011-07-27 20:21:58 +02:00
Alexander Hämmerle 421ca4114e Bug 641187 - GIMP needs a left-handed cursor option
Add a cursor-handedness setting and flip the cursor when it's set to
left-handed.
2011-07-24 22:09:21 +02:00
Martin Nordholts 682eabfd5b app: Add gimp_dock_columns_create_dock_and_dockbook() 2011-07-03 21:20:34 +02:00
Martin Nordholts 91b7043aef app: Add gimp_dockbook_add_from_dialog_factory() 2011-07-03 21:20:20 +02:00
Alexia Death e7ade3f8ec app: add an assert and dirty fix a segfault when starting with SWM
Somebody smarter than me needs to take  look why for some reason tool is
changed to null during SWM init.
2011-06-29 23:51:27 +03:00
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