Commit Graph

217 Commits

Author SHA1 Message Date
Michael Natterer 3c565a1736 app: unref context, dialog_factory and ui_manager in GObject::dispose()
The were not unrefed at all before
2010-06-24 18:38:16 +02:00
Michael Natterer 6429c3de1b app: #undef GSEAL_ENABLE to build against the gtk-2-22 branch
GDK structs and objects have been sealed in gtk-2-22, but we can't
use the newly introduced accessors yet.
2010-05-30 17:19:47 +02:00
Michael Natterer 46ea197171 app: avoid the deprecated and sealed GTK_OBJECT_FLAGS() 2010-05-10 17:54:49 +02:00
Michael Natterer 7c042df739 app: use a GtkToolPalette for the grid of tools in the toolbox 2010-05-10 17:30:17 +02:00
Martin Nordholts 520da707c1 app: Only show active dockables in dock window titles
Refactor stuff a bit so that the dock window description can be both
short and long. The short version only have the active dockables, and
the long version have all the dockables in the description string. We
use the short version for the window title and the long version for
the Recently Closed Docks menu items.
2010-03-13 20:02:55 +01:00
Martin Nordholts a915132ee6 app: Don't call the dock title a title, but "description"
Don't call the dock title a title, but "description". Title is an old
name from when a GimpDock was a GtkWindow.
2010-03-13 17:18:47 +01:00
Martin Nordholts 3352b0485c app: Fix dockable separator translations
Continued fix of bug 554927. Also translate the " - " string in the
toolbox and add a "dock" translation context.
2010-03-13 12:17:46 +01:00
Martin Nordholts 0279daed28 app: Make Toolbox dock title complete
Make the Toolbox dock title complete, i.e. if the toolbox dock
contains Tool Options, the title will be "Toolbox - Tool Options".
2010-03-05 21:31:07 +01:00
Martin Nordholts c094736f83 app: Remove accidentally commited g_printerr() 2010-01-22 21:00:17 +01:00
Martin Nordholts ba37aaa532 app: Support multi-column DnD in toolbox window
Add a drag handler to the toolbox so it's possible to create
multi-column docks in the toolbox dock window.
2010-01-22 20:48:34 +01:00
Martin Nordholts 56a8cb68a8 app: Have dialog factory entries for the dock windows
Let dock windows have proper GimpDialogFactory entries. This allows us
to get rid of a lot of ugly mostly duplicated code. This also makes us
ready the merge the dock window and toolbox factories which will soon
be done. A few things should be noted:

 * We adjust the wrap box aspect ratio in the toolbox to avoid having
   the toolbox dock window explode

 * We make sure that we still can handle sessionrc files from GIMP 2.6
   and older
2010-01-19 22:24:17 +01:00
Michael Natterer 7175f3e883 Some more changes to build with GSEAL_ENABLE
- use more GTK+ accessors instead of struct members
- remove quite some #undef GSEAL_ENABLE from completely ported files
2010-01-15 15:35:03 +01:00
Martin Nordholts 1bf84999e4 Move the Image Selection Menu to GimpDockWindow
Move the Image Selection Menu from GimpMenuDock to
GimpDockWindow. That is, if a dock window contains many docks then
they will share the same Image Selection Menu.

To do this we need to move around quite a bit of code. Move the
"context", "dialog-factory" and "ui-manager" properties from GimpDock
to GimpToolbox, GimpMenuDock doesn't need it any longer. Turn the
GimpDock getters for these properties into wrappers that go to the
GimpDockWindow properties. In some places, most notably GimpToolbox
construction, we use the GimpToolbox values of these properties, but
most of the time it works fine to just use the GimpDockWindow
properties. GimpDock::setup() and set/get_aux_info() have also been
moved to GimpDockWindow since the only aux info for docks was for the
image selection menu.

Also, we don't bother porting gimp_menu_dock_destroy() to
GimpDockWindow, but we leave the code around. If this is a problem, it
will show.
2009-12-05 21:21:24 +01:00
Martin Nordholts 4ccb650435 Exterminate GimpDockSeparator
Remove all GimpDockSeparator-related code. Seems pointless to keep
even the stuff in gtkrc.
2009-12-02 20:40:39 +01:00
Martin Nordholts 7b85cf4de8 app: Use a GdkWindow instead of GimpDockSeparators for dockable DND
Make drag-and-drop rearrangement of dockables happen directly in the
existing widget hierarchy so we don't have to use special, ugly
widgets (read GimpDockSeparator:s) for that.

More specifically, make edges of dockables and dockbooks have the same
semantics as the GimpDockSeparators had. We put a highlight colored
GdkWindow on top of the widget in question to highlight these special
drop areas. This GdkWindow is not taken into consideration in the GTK+
drag-and-drop code, so it does not interupt the DND interaction.

To achive this, there is a problem we must solve: Drag events in GTK+
are propagated inwards and out, but we sometimes want ancenstor
widgets to take care of drop events. We solve this by introducing the
concept of "drag handlers". A drag handler is asked if it will handle
a given drag event, and if it will, a client will let the drag event
be propagated upwards in the widget hierarchy. Right now, the
GimpPanedBox is the only "drag handler". The code could be generalized
more but it doesn't feel worth it at this point.

The size of the special drop area is 5px, the same size as the default
GtkPaned handles. This is because the plan is to later use these
handles as drop areas too.

Other changes of interest are:
 * We need to take care of "drag-motion", "drag-drop" and widget
   highlightning ourselves. We can not use the GtkDestDefaults
   conveniences with gtk_drag_dest_set() any longer since we need more
   control.
 * Make the drop callback pass the insert index directly instead of a
   GimpDockSeparator
 * Add some GIMP_LOG() debug output for DND
 * Disable the GimpDockSeparator code in GimpToolbox
2009-11-29 18:22:12 +01:00
Michael Natterer 1a23b9ecf2 Build with GSEAL_ENABLE and #undef it where accessors are missing 2009-10-17 20:20:39 +02:00
Martin Nordholts eb6bef33e4 Use gtk_widget_set_visible()
In places where the pattern

  if (show)
    gtk_widget_show (widget);
  else
    gtk_widget_hide (widget);

is used, change to

  gtk_widget_set_visible (widget, show);

Also do some other minor cleanups.
2009-10-17 15:07:34 +02:00
Martin Nordholts 2914af893b app: Allow 1-tool wide toolbox in single-window mode 2009-10-09 23:22:51 +02:00
Martin Nordholts 94e8c90a5f app: Change toolbox aspect ratio to 2.0 / 15.0
Change toolbox subcomponent aspect ratios to 2.0 / 15.0 so we can have
a two tool wide toolbox dock in the image window.
2009-10-04 17:26:48 +02:00
Martin Nordholts 35b228144a app: Make GimpToolbox members private 2009-10-04 15:43:53 +02:00
Sven Neumann bc9602c410 remove pointless delete-event handler 2009-09-29 23:38:16 +02:00
Martin Nordholts f3f19ac35f app: Make tool selection work again
The toolbox toplevel is no longer the dock, do some minor adjustments
to compensate for this, namely sending the toolbox (which is a dock)
as data to callbacks.
2009-09-27 13:54:45 +02:00
Martin Nordholts 4f7693acf0 app: Make GimpDock a GtkVBox
Make GimpDock be a GtkVBox instead of a GimpDockWindow. This means we
can now put a GimpDock anywhere, including inside an image window.

In order to do this we need to:

 * Separate dock and dock window creation in the dialog factory and
   add a couple of new dock window constructors

 * Change gimp_dialog_factory_dock_new() to not only create a dock,
   but also create a dock window and then combine those two

 * Change the dock constructor to take a GimpUIManager since they
   depend on that during their construction. We get the ui manager
   from the dock window, but we can't create the dock *inside* the
   dock window, we have to add the dock later. So we create the dock
   window first and then pass its ui manager to the dock constructors

 * Make some other minor adaptions, mostly with
   gimp_dock_window_from_dock() and gimp_dock_window_get_dock()
2009-09-26 16:21:10 +02:00
Martin Nordholts e87ed66ba7 app: Don't cast GimpDock to GimpDockWindow
In preparation for making GimpDock inherit from a non-window, stop
casting GimpDocks to GimpDockWindows. Instead look up the toplevel
widget for a dock and get the dock window that way.
2009-09-15 07:58:14 +02:00
Martin Nordholts 67128d6034 app: Add GimpDock::set_host_geometry_hints()
In order to allow the toolbox dock to set geometry hints on the
GtkWindow it is in, introduce host geometry hint setting through a new
virtual function GimpDock::set_host_geometry_hints() and a new
"geometry-invalidated" signal.

Docks that needs to setup geometry hints on the window they are in
call gimp_dock_invalidate_geometry(). The GimpDockWindow will listen
to this and give the dock a chance to set geometry hints (or any setup
really) on the GimpDockWindow.
2009-09-13 14:14:08 +02:00
Martin Nordholts a23a220d60 app: Add and use GimpDockWindow window title infrastructure
Add a "title-invalidated" signal to GimpDock and a virtual function
GimpDock::get_title(). When GimpDocks have a state change that their
title depends on they call gimp_dock_invalidate_title(). The
GimpDockWindow listens to this signal and update its window title
using GimpDock::get_title() in an idle handler.
2009-09-13 13:14:18 +02:00
Martin Nordholts 88e6fe1e62 app: Add GimpDialogFactory property to GimpDockWindow
Add a GimpDialogFactory property to GimpDockWindow so that it can get
rid of its GimpDock dependency. We need to call the property
"gimp-dialog-factory" instead of "dialog-factory" though as long as
GimpDock subclasses GimpDockWindow.
2009-09-13 09:49:56 +02:00
Martin Nordholts 0fc1a32ad0 app: Kill GimpImageDock
Get rid of GimpImageDock and make its subclasses inherit directly from
GimpDock instead.
2009-09-13 09:31:21 +02:00
Martin Nordholts 3532acbec6 app: Move UI manager from GimpImageDock to GimpDockWindow
Move the GimpUIManager from GimpImageDock to GimpDockWindow. This
includes making the ui_manager_name class-member of GimpImageDock a
normal instance member of GimpDockWindow since the UI manager name no
longer can be configured at the class level.
2009-09-13 09:22:59 +02:00
Martin Nordholts f5d1c1ba4d app: Add and use gimp_image_dock_get_ui_manager() 2009-09-12 22:23:10 +02:00
Martin Nordholts 45a8d1f487 app: Pass dock roles as construction parameters
In order to keep window specific settings as local as possible, also
move the role setting to dock construction instead of having it in
init.
2009-09-10 22:25:00 +02:00
Martin Nordholts 26fbeebf02 app: Set the dock-window-hint centrally in GimpDockWindow
Set the dock-window-hint centrally in GimpDockWindow instead of both
in GimpToolbox and GimpMenuDock.
2009-09-10 22:03:39 +02:00
Martin Nordholts 81d961423a app: Add GimpContext property to GimpDockWindow
The GimpDockWindow will need to have a GimpContext so add such a
property but call it "gimp-context" for now to avoid clashing with
"context" of GimpDock.
2009-09-10 22:03:30 +02:00
Martin Nordholts e1faf82e7d Get rid of toolbox-window-hint, use dock-window-hint instead
Since the toolbox no longer is the main window with a menu, use the
same hint for the toolbox (which actually is a dock) as for the other
docks.
2009-09-09 23:37:38 +02:00
Michael Natterer a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Martin Nordholts f026c52478 Bug 568445 – Closing the Toolbox causes the program to close
Instead of invoking the file-quit action when closing the toolbox, use
gimp_dialog_factory_hide_dialog().
2009-08-02 14:57:46 +02:00
Martin Nordholts b2b2b41e62 Get rid of artificial compiler warnings
Get rid of artificial compiler warnings generated with the #warning
directive. They pollute the build output and don't work as incentives
for fixing stuff.
2009-07-20 12:47:59 +02:00
Michael Natterer d9448730f9 Bug 555025 – Action GEGL box widgets weirdness
2009-03-28  Michael Natterer  <mitch@gimp.org>

	Bug 555025 – Action GEGL box widgets weirdness

	Must not set GDK_HINT_MIN_SIZE if we don't actually set a minimum
	size, or the window will be shrinkable to zero and it won't
	expand automatically when its contents' requisition grows.

	* app/widgets/gimpdialogfactory.[ch]: add hackish API
	gimp_dialog_factory_set,get_has_min_size() because GTK+ itself
	has no API for querying a window's GdkWindowHints.

	(gimp_dialog_factory_set_user_pos): set GDK_HINT_MIN_SIZE only if
	the window was being marked as having a minimum size using above
	new API.

	* app/widgets/gimptoolbox.c (gimp_toolbox_set_geometry)
	* app/display/gimpdisplayshell.c (gimp_display_shell_style_set):
	call gimp_dialog_factory_set_has_min_size (window, TRUE).


svn path=/trunk/; revision=28224
2009-03-28 13:19:53 +00:00
Michael Natterer d85fb156b5 app/widgets/gimpblobeditor.c app/widgets/gimpbrushselect.c
2009-03-22  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpblobeditor.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpcolorbar.c
	* app/widgets/gimpcolordialog.c
	* app/widgets/gimpcolorframe.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpcontrollereditor.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcursor.c
	* app/widgets/gimpcurveview.c
	* app/widgets/gimpdasheditor.c
	* app/widgets/gimpdialogfactory.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimpfgbgeditor.c
	* app/widgets/gimpfgbgview.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphandlebar.c
	* app/widgets/gimphistogrambox.c
	* app/widgets/gimphistogramview.c
	* app/widgets/gimpmessagedialog.c
	* app/widgets/gimpnavigationview.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppaletteview.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimpprogressbox.c
	* app/widgets/gimpprogressdialog.c
	* app/widgets/gimpscalebutton.c
	* app/widgets/gimpselectiondata.c
	* app/widgets/gimpsessioninfo.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpstrokeeditor.c
	* app/widgets/gimptexteditor.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimpuimanager.c
	* app/widgets/gimpview-popup.c
	* app/widgets/gimpview.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpwidgets-utils.c: use accessors for various
	members of GTK+ structures that don't exist any longer when
	GSEAL_ENABLE is defined.


svn path=/trunk/; revision=28193
2009-03-22 16:35:53 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Martin Nordholts 7c96452329 Make instance members private.
* app/widgets/gimpdock.[ch]: Make instance members private.

(gimp_dock_get_context)
(gimp_dock_get_dialog_factory)
(gimp_dock_get_dockbooks)
(gimp_dock_get_main_vbox)
(gimp_dock_get_vbox)
(gimp_dock_get_id): New getters.

* app/actions/actions.c
* app/actions/dockable-actions.c
* app/actions/dockable-commands.c
* app/actions/windows-actions.c
* app/menus/windows-menu.c
* app/widgets/gimpdialogfactory.c
* app/widgets/gimpdock.c
* app/widgets/gimpdock.h
* app/widgets/gimpdockable.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpdockseparator.c
* app/widgets/gimpimagedock.c
* app/widgets/gimpmenudock.c
* app/widgets/gimpsessioninfo-book.c
* app/widgets/gimpsessioninfo-dock.c
* app/widgets/gimpsessioninfo-dockable.c
* app/widgets/gimptoolbox-color-area.c
* app/widgets/gimptoolbox-dnd.c
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptoolbox.c: Use new getters.

svn path=/trunk/; revision=27881
2009-01-04 10:28:31 +00:00
Michael Natterer a748e3f58e add new functions gimp_get_image_iter(), display_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp.[ch]: add new functions gimp_get_image_iter(),
	display_iter() and tool_info_iter().

	* app/tools/gimp-tools.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/dialogs/quit-dialog.c
	* app/gui/gui.c
	* app/menus/windows-menu.c
	* app/actions/images-commands.c
	* app/actions/tools-actions.c
	* app/actions/windows-actions.c
	* app/actions/tool-options-commands.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplay-foreach.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/image.pdb: use them here.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27526
2008-11-02 21:34:14 +00:00
Sven Neumann 176fb24579 allow to disable the Wilber image shown at the top of the toolbox.
2008-08-28  Sven Neumann  <sven@gimp.org>

        * app/config/gimpguiconfig.[ch]: allow to disable the Wilber 
image
        shown at the top of the toolbox.

        * app/widgets/gimptoolbox.c: honor the new gimprc option.

        * app/config/gimprc-blurbs.h: document the old and new toolbox
        preferences.


svn path=/trunk/; revision=26800
2008-08-28 14:30:47 +00:00
Sven Neumann bf89d956a4 removed the "Use GEGL" check-box from the toolbox.
2008-08-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimptoolbox.c: removed the "Use GEGL" check-box
	from the toolbox.

	* app/config/gimpcoreconfig.c: changed the default for 
"use-gegl"
	to FALSE (in preparation of the 2.6 release).

	* app/actions/debug-commands.[ch]
	* app/actions/debug-actions.c
	* menus/image-menu.xml.in: added a "Use GEGL" check-box to the
	Debug menu. Temporary solution until a final decision is made.


svn path=/trunk/; revision=26711
2008-08-22 15:33:02 +00:00
Michael Natterer f53ed53cdb app/widgets/gimpactionview.c app/widgets/gimpblobeditor.c
2008-06-28  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpactionview.c
	* app/widgets/gimpblobeditor.c
	* app/widgets/gimpbrushfactoryview.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpcellrendererdashes.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimpcolorbar.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcolorframe.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpcurveview.c
	* app/widgets/gimpdasheditor.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimpdock.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpdockseparator.c
	* app/widgets/gimpfgbgeditor.c
	* app/widgets/gimpfgbgview.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimphandlebar.c
	* app/widgets/gimphistogrambox.c
	* app/widgets/gimphistogramview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimpmenudock.c
	* app/widgets/gimpmessagebox.c
	* app/widgets/gimppaletteview.c
	* app/widgets/gimpscalebutton.c
	* app/widgets/gimpsessioninfo-book.c
	* app/widgets/gimpsessioninfo-dock.c
	* app/widgets/gimpsettingseditor.c
	* app/widgets/gimpstrokeeditor.c
	* app/widgets/gimptemplateeditor.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimpthumbbox.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimptoolview.c
	* app/widgets/gimpuimanager.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpviewrenderervectors.c
	* app/widgets/gimpwidgets-utils.c: use accessors instead of
	accessing members of GTK+ widgets directly.


svn path=/trunk/; revision=26008
2008-06-28 15:50:27 +00:00
Sven Neumann 97861975b1 do not any longer accept middle-mouse-button paste on the toolbox buttons
2008-04-25  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimptoolbox.c: do not any longer accept
	middle-mouse-button paste on the toolbox buttons but use the
	toolbox drop area for that.


svn path=/trunk/; revision=25521
2008-04-25 07:05:48 +00:00
Michael Natterer 8088b64c72 app/display/gimpcanvas.c app/widgets/gimpcoloreditor.c
2008-03-30  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcolorframe.c
	* app/widgets/gimpcursorview.c
	* app/widgets/gimpcurveview.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdock.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpdockbook.c
	* app/widgets/gimpdockseparator.c
	* app/widgets/gimpeditor.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpmenudock.c
	* app/widgets/gimpsamplepointeditor.c
	* app/widgets/gimptoolbox.c: chain up unconditionally in
	GtkWidget::style_set() because there is has a default
	implementation.


svn path=/trunk/; revision=25307
2008-03-29 23:43:39 +00:00
Michael Natterer ed7268c043 make the wilber area a bit smaller.
2008-03-26  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimptoolbox.c: make the wilber area a bit smaller.


svn path=/trunk/; revision=25251
2008-03-26 21:04:20 +00:00
Michael Natterer e842dbe625 store the toolbox area's vbox in the widget struct.
2008-03-26  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimptoolbox.[ch]: store the toolbox area's vbox in
	the widget struct.

	* app/widgets/gimptoolbox-dnd.c (gimp_toolbox_dnd_init): use it as
	DND target instead of the wbox with the tool buttons.


svn path=/trunk/; revision=25250
2008-03-26 20:47:45 +00:00
Michael Natterer e00d4e423f big wilber is watching you from the toolbox! Removed forgotten menubar
2008-03-26  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimptoolbox.[ch]: big wilber is watching you from
	the toolbox! Removed forgotten menubar cruft.


svn path=/trunk/; revision=25249
2008-03-26 20:27:44 +00:00