Commit Graph

46 Commits

Author SHA1 Message Date
Martin Nordholts 6812d5bdce Bug 346881 - Remove redundant title of tab and move menu button up
Remove the dockable drag handle and move the menu button it hosts up
to the GimpDockbook, with the gtk_notebook_set_action_widget() API.

This frees up quite a lot of screen estate which can be used for the
content of dockables instead.
2010-06-12 01:24:39 +02:00
Martin Nordholts 9b86acd16b Add 'Automatic' Tab Style support
Add support for a new type of Tab Style called 'Automatic'. This tab
style makes the GimpDockbook use the biggest actual tab style it can
for its auto tab style dockables, based on its widget allocation.

The tab style candidates for auto tab style are "Status + Blurb",
"Status + Text" and "Status". A docked widget can also say that it
wants to use "Icon" instead of "Status" for its auto tab style. The
'Tool Options' dockable does this. This is to be as backwards
compatible with the old tab style setup, we make 'automatic' the
default everywhere.

We have quite a bit of dependency to internal layout code in
GtkNotebook, but the current code should be pixel perfect and rather
complete.

Also add a basic regression test.
2010-06-12 01:23:42 +02:00
Martin Nordholts e3b0bda962 app: Use 'create' not 'new' in dockable instance creation methods
Use 'create' not 'new' in GimpDockable instance creation methods to be
consistent with the rest of the code base.
2010-05-15 20:21:55 +02:00
Martin Nordholts 39349e0658 app: Remove _for_style in gimp_dockable_new_tab_widget_for_style()
It became reduntant when 'get' was changed to 'new'.
2010-04-18 18:01:14 +02:00
Martin Nordholts d35f4d5db4 app: Clarify GimpDockable tab widget interface
The function gimp_dockable_get_tab_widget() and
gimp_dockable_get_drag_widget are not getters, they create new
widgets. Furthermore, gimp_dockable_get_tab_widget() doesn't use the
instance tab style but takes a tab style paramter. Rename the
functions to gimp_dockable_new_tab_widget_for_style() and
gimp_dockable_new_drag_widget() to reflect this.
2010-04-18 17:42:26 +02:00
Martin Nordholts be653a7110 app: Seal GimpDockable and add necessary getters and setters 2010-01-05 00:32:35 +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
Martin Nordholts 677b977776 app: Make class documentation be picked up by gtk-doc 2009-10-10 22:01:06 +02:00
Martin Nordholts 04ef83c795 app: Add some comments on classes used for the dock system 2009-09-05 23:52:32 +02: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
Michael Natterer 598da617b0 Stop including single headers from gtk+ to be prepared for the upcoming
2008-05-23  Michael Natterer  <mitch@gimp.org>

	Stop including single headers from gtk+ to be prepared
	for the upcoming GTK_DISABLE_SINGLE_INCLUDES:

	* configure.in: add -DGTK_DISABLE_SINGLE_INCLUDES to CPPFLAGS.

	* app/display/gimpcanvas.h
	* app/display/gimpscalecombobox.h
	* app/display/gimpstatusbar.h
	* app/widgets/*.h
	* libgimp/gimpprogressbar.h
	* libgimp/gimpselectbutton.h
	* libgimpwidgets/*.h
	* libgimpwidgets/gimpstock.c
	* plug-ins/uri/gimpmountoperation.h: remove inclusion of parent
	classes and single files from gtk+.

	* app/widgets/gtkwrapbox.h
	* libgimp/gimpbrushmenu.c
	* libgimp/gimpfontmenu.c
	* libgimp/gimpgradientmenu.c
	* libgimp/gimppalettemenu.c
	* libgimp/gimppatternmenu.c
	* libgimp/gimpselectbutton.c: #include <gtk/gtk.h>

	* plug-ins/common/poppler.c: undef GTK_DISABLE_SINGLE_INCLUDES
	when including <poppler.h>.


svn path=/trunk/; revision=25781
2008-05-23 20:38:52 +00:00
Sven Neumann 33b5a890cc app/widgets/gimpdockable.[ch] added a "locked" propery to GimpDockable. A
2008-05-19  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdockbook.[ch]: added a "locked" propery to
	GimpDockable. A locked dockable cannot be moved by drag-n-drop.
	Allows users to protect their dockables from accidental changes,
	mainly when working with a tablet.

	* app/widgets/gimpsessioninfo-dockable.[ch]: store the "locked"
	property in the session info.

	* app/actions/dockable-actions.c
	* app/actions/dockable-commands.[ch]: added an action for 
toggling
	the "locked" state.

	* app/widgets/gimphelp-ids.h: new help-id "gimp-dock-tab-lock".

	* menus/dockable-menu.xml.in: show the new menu item.

	* app/actions/plug-in-actions.c: formatting.


svn path=/trunk/; revision=25715
2008-05-19 21:11:03 +00:00
Sven Neumann c317f937e1 app/widgets/gimpdockable.[ch] moved code for the drag widget to
2008-03-10  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdockbook.c: moved code for the drag widget to
	GimpDockable. Use semi-bold text for the drag widget also.

svn path=/trunk/; revision=25082
2008-03-10 16:01:48 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer a52ad9d3c4 #define GIMP_DOCKABLE_DRAG_OFFSET publically.
2005-12-30  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.[ch]: #define GIMP_DOCKABLE_DRAG_OFFSET
	publically.

	* app/widgets/gimpdockbook.c (gimp_dockbook_tab_drag_end): use the
	define to reset the dockable's drag offsets.
2005-12-30 01:37:35 +00:00
Sven Neumann 850e7af79e only set the horizontal offset from the button press location 2005-12-29 04:45:41 +00:00
Sven Neumann 2723c2e790 store coordinates of last button press event.
2005-12-29  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdockable.[ch]: store coordinates of last button
	press event.

	* app/widgets/gimpdockbook.c (gimp_dockbook_tab_drag_begin): set
	the drag hotspot to the mouse position that started the drag.
2005-12-29 03:12:26 +00:00
Michael Natterer 153748330a added new public function gimp_dockable_blink_cancel() which stops title
2005-07-13  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.[ch]: added new public function
	gimp_dockable_blink_cancel() which stops title blinking.

	* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_picked):
	cancel blinking when updating a picked color so the dockable
	doesn't flicker for each cursor movement.
2005-07-13 17:03:44 +00:00
Sven Neumann e37143c28b removed Close button from dockables as suggested in bug #301348.
2005-04-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdockable.[ch]: removed Close button from
	dockables as suggested in bug #301348.
2005-04-21 23:30:38 +00:00
Michael Natterer 9f527b8255 added new function gimp_dockable_blink() which lets the dockable's
2005-01-18  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.[ch]: added new function
	gimp_dockable_blink() which lets the dockable's title_area blink.

	* app/widgets/gimpdialogfactory.c
	(gimp_dialog_factory_dialog_new_internal): let wilber blink at the
	user :) Fixes bug #164156.
2005-01-18 15:18:35 +00:00
Michael Natterer f826916828 added a horrible hack that sets the paned's position after the first
2004-06-01  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpsessioninfo.c (gimp_session_info_restore): added
	a horrible hack that sets the paned's position after the first
	"size-allocate" after "map". Makes position remembering work for
	the toolbox and fixes bug #142697.

	* app/widgets/gimpdockable.[ch]: added new function
	gimp_dockable_set_tab_style()

	* app/actions/dockable-commands.c (dockable_tab_style_cmd_callback)
	* app/widgets/gimpsessioninfo.c (gimp_session_info_restore):
	use gimp_dockable_set_tab_style().
2004-06-01 12:31:44 +00:00
Michael Natterer 4654280114 Switch from GtkItemFactory to GtkUIManager. The migration is almost
2004-04-29  Michael Natterer  <mitch@gimp.org>

	Switch from GtkItemFactory to GtkUIManager. The migration is
	almost complete, still stuff missing/incomplete, definitely added
	a bunch of new bugs...

	* app/actions/*-commands.[ch]: converted all callback from
	GtkItemFactory callbacks to GtkAction callbacks.

	* app/actions/debug-actions.c
	* app/actions/gradient-editor-actions.c
	* app/actions/help-actions.c
	* app/actions/plug-in-actions.c
	* app/actions/qmask-actions.c
	* app/actions/tool-options-actions.c: various fixes.

	* app/display/gimpdisplay.[ch]
	* app/display/gimpdisplayshell-appearance.[ch]
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell.[ch]: move everything from
	GtkItemFactory to GtkUIManager.

	* app/gui/dialogs.[ch]: added new function dialogs_get_toolbox().
	Needed because the action callbacks don't have a widget parameter
	and sometimes we need a parent window for showing dialogs.

	* app/gui/Makefile.am
	* app/gui/brushes-menu.[ch]
	* app/gui/buffers-menu.[ch]
	* app/gui/channels-menu.[ch]
	* app/gui/colormap-editor-menu.[ch]
	* app/gui/dialogs-menu.[ch]
	* app/gui/documents-menu.[ch]
	* app/gui/error-console-menu.[ch]
	* app/gui/fonts-menu.[ch]
	* app/gui/gradient-editor-menu.[ch]
	* app/gui/gradients-menu.[ch]
	* app/gui/images-menu.[ch]
	* app/gui/layers-menu.[ch]
	* app/gui/palette-editor-menu.[ch]
	* app/gui/palettes-menu.[ch]
	* app/gui/patterns-menu.[ch]
	* app/gui/qmask-menu.[ch]
	* app/gui/templates-menu.[ch]
	* app/gui/vectors-menu.[ch]: removed these files.

	* app/gui/gui.c: create a global UI manager for the image popup
	menu and the toolbox menubar.

	* app/gui/menus.[ch]: removed all GtkItemFactory code.

	* app/gui/image-menu.[ch]
	* app/gui/toolbox-menu.[ch]: removed everything except the trivial
	setup_funcs.

	* app/gui/file-open-menu.c
	* app/gui/file-save-menu.c
	* app/gui/tool-options-menu.c: don't use the macros from menus.h
	any more, they are gone.

	* app/gui/gui-vtable.c
	* app/gui/plug-in-menus.[ch]: create/destroy the dynamic plug-in
	menu entries.

	* app/tools/gimpimagemaptool.c: s/gimp_item_factory_update/
	gimp_ui_manager_update/g

	* app/widgets/gimpuimanager.[ch]: added API to get an action
	group by name.

	* app/widgets/gimpmenufactory.c: don't choke on the item_factory
	entries being NULL.

	* app/widgets/gimpactiongroup.c: make sure booleans set using
	g_object_set() only have TRUE or FALSE values.

	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdocked.[ch]
	* app/widgets/gimpeditor.[ch]
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimptooloptionseditor.c: removed all GtkItemFactory
	code and enable the #if 0'ed UI manager stuff.

	* menus/gradient-editor-menu.xml: fixed typos.

	* menus/image-menu.xml: duplicate everything so we have both
	an image menubar and an image popup menu. Badly cries for an
	XSL processor.

	* menus/toolbox-menu.xml: added an "Extensions" placeholder.
2004-04-29 12:52:29 +00:00
Michael Natterer 1071842535 remember and ref the created widgets. Added gimp_ui_manager_ui_popup()
2004-04-22  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpuimanager.[ch]: remember and ref the created
	widgets.  Added gimp_ui_manager_ui_popup() which pops up a GtkMenu
	with a custom GimpMenuPositionFunc and a GtkDestroyNotify which is
	called on popdown.

	* app/widgets/gimpmenufactory.c (gimp_menu_factory_finalize):
	don't forget to free the list of managed UIs.

	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdockbook.[ch]
	* app/widgets/gimpdocked.[ch]
	* app/widgets/gimpeditor.[ch]: added GimpUIManager stuff parallel
	to the to-be-removed GtkItemFactory stuff.

	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimptooloptionseditor.c: changed accordingly and added
	#if 0'ed code which actually uses all the UI managers.

	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell.c
	* app/gui/gui-vtable.c: disabled some gimp_ui_manager_update()
	calls because they were invoking toggle and radio callbacks
	which still have the wrong signature.
2004-04-22 17:14:22 +00:00
Michael Natterer 99746e1d6c app/widgets/Makefile.am app/widgets/widgets-types.h new files implementing
2003-10-10  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpdocked.[ch]: new files implementing
	GimpDockedInterface, a GTypeInterface which must be implemented by
	all widgets which want to be packed into a GimpDockable. Has
	virtual functions similar to the ones GimpDockable had.

	* app/widgets/gimpdockable.[ch]: removed all virtual functions and
	all function pointers from the instance struct (also the ones just
	added in the commit below). Make sure only widgets implementing
	the GimpDockedIface are added and simply call the child's
	GimpDocked functions where we used to call our own virtual
	functions and function pointers.

	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainerview.c
	* app/widgets/gimpeditor.c
	* app/widgets/gimpimageeditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimpsessioninfo.c
	* app/widgets/gimptooloptionseditor.c
	* app/display/gimpnavigationview.c: implement GimpDockedIface.

	* app/gui/dialogs-constructors.c: removed all that get_preview_func(),
	set_context_func() etc. cruft since that's done by GimpDockedIface.
	It's really a file of constructors now.

	* app/gui/dialogs-menu.c: changed accordingly.

	* app/widgets/gimpimagedock.c: forgotten in the commit below.
2003-10-10 21:24:12 +00:00
Michael Natterer 87480880c3 Cleaned up session management and changed the format of sessionrc in a way
2003-10-10  Michael Natterer  <mitch@gimp.org>

	Cleaned up session management and changed the format of sessionrc
	in a way that allows extensions without changing the format during
	the 2.0 cycle:

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpsessioninfo.[ch]: new files implementing the whole
	GimpSessionInfo stuff (parsing, saving, restoring, utility functions).
	Save / parse the position of GimpDock's panes (bug #122964).

	* app/widgets/gimpdialogfactory.[ch]: removed saving, restoring
	and session related utility functions and use the ones from
	the new files above.

	* app/gui/session.c: removed parsing and use the new stuff.

	* app/widgets/gimpdock.[ch]: added new virtual functions
	GimpDock::set_aux_info() and GimpDock::get_aux_info():

	* app/widgets/gimpimagedock.c: implement them and handle the
	"auto_follow_active" and "show_image_menu" properties.

	* app/widgets/gimpdockable.[ch]: added the same virtual functions
	to the GimpDockable class. Enables forward-compatible per-dockable
	session management (bug #122964).

	* app/gui/dialogs-commands.c
	* app/gui/gui.c: changed accordingly.

	* etc/sessionrc: ditto. Look at this file and update your own
	sessionrc manually if you don't want to lose it.
2003-10-10 15:59:12 +00:00
Michael Natterer f65a7acbab new function. Need to include ugly stuff for proper GimpImageDock setup.
2003-10-07  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.[ch] (gimp_dockable_detach): new
	function.  Need to include ugly stuff for proper GimpImageDock
	setup.

	* app/widgets/gimpdockbook.c (gimp_dockbook_menu_end): use
	gimp_dockable_detach() and removed the evil includes.

	* app/gui/dialogs-commands.c (dialogs_detach_tab_cmd_callback):
	implement it using gimp_dockable_detach().
2003-10-07 12:24:01 +00:00
Sven Neumann 914a29efd8 app/widgets/gimpdockbook.[ch] hide the GimpDockbook tabs when it holds
2003-10-05  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdockbook.[ch]
	* app/widgets/gimpdockable.[ch]: hide the GimpDockbook tabs when
	it holds only a single dockable. Made the title area a drag source
	and let the whole GimpDockable accept drops of dockables.
2003-10-05 17:26:21 +00:00
Sven Neumann a52de434be added the title pango layout to the GimpDockable struct. Made
2003-09-23  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdockable.[ch]: added the title pango layout to
	the GimpDockable struct. Made gimp_dockable_menu_position() handle
	RTL layout correctly.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_origin_menu_position): handle RTL layout.
2003-09-23 18:11:09 +00:00
Michael Natterer c5fd48f2fb added a "menu_title" which is registered with each menu.
2003-09-23  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpmenufactory.[ch]: added a "menu_title" which is
	registered with each menu.

	* app/widgets/gimpitemfactory.[ch]: added the title to the
	constructor and to the GimpItemFactory struct.

	* app/gui/menus.c: register titles with all menus.

	* app/widgets/gimpdockable.[ch]: show the tab menu, not the
	contained dialog's menu when clicking on the menu button.
	Embed the dialog's menu as submenu. Use the item_factory's
	title and the dockable's stock_id for the submenu entry.

	* app/widgets/gimpeditor.c: removed GtkWidget:popup_menu()
	implementation since that's done by GimpDockable now.

	* app/widgets/gimpdockbook.c: set the new menu item invisible
	when showing the menu as tab menu.

	* app/widgets/gimphelp-ids.h: added GIMP_HELP_DOCK_TAB_DETACH
	and renamed _TAB_REMOVE to _TAB_CLOSE.

	* app/gui/dialogs-menu.c: added the new menu entry for showing the
	dialog's sub-menu. Added a "Detach" menu item, renamed "Remove" to
	"Close". Accept both a GimpDockbook and a GimpDockable pointer as
	"data" in dialogs_menu_update().

	* app/gui/dialogs-commands.[ch]: changed accordingly. Never use
	gtk_item_factory_popup_data_from_widget() but always the "data"
	passed to the callbacks. Take care to not set the already active
	preview_size, tab_style and list/grid type in the resp. callbacks
	to avoid being called from dialogs_menu_update().

	* app/gui/dialogs-constructors.c: removed separate
	set_context_funcs and get_menu_funcs for GimpContainerView and
	GimpContainerEditor widgets and simply use
	gimp_container_view_get_by_dockable() to find the right widget.
2003-09-23 16:17:25 +00:00
Michael Natterer 47b1e3eef8 added a title bar showing the dockable's name, a "close" and a "menu"
2003-09-21  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.[ch]: added a title bar showing the
	dockable's name, a "close" and a "menu" button. Not quite
	finished, but almost...

	* app/gui/dialogs-constructors.c: changed accordingly.

	* themes/Default/images/Makefile.am
	* themes/Default/images/stock-close-12.png
	* themes/Default/images/stock-menu-12.png: new icons for the above.

	* libgimpwidgets/gimpstock.[ch]: register them.

	* themes/Default/gtkrc: remove any focus spacing from the
	dockables' new buttons since they can't get the focus anyway.
2003-09-21 19:35:54 +00:00
Michael Natterer 8c8274e27d added "gchar *help_id" member to the GimpDockable struct and "const gchar
2003-08-25  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.[ch]: added "gchar *help_id" member to
	the GimpDockable struct and "const gchar *help_id" parameter to
	gimp_dockable_new().

	* app/widgets/gimphelp-ids.h: added help IDs for the tool list/grid
	and the palette editor.

	* app/widgets/gimpdockbook.c
	* app/gui/dialogs-constructors.c
	* app/gui/dialogs-menu.c: changed accordingly.
2003-08-25 14:18:33 +00:00
Michael Natterer 375d479dad extended GimpTabStyle enum so we are able to distinguish icon and preview
2003-08-15  Michael Natterer  <mitch@gimp.org>

	* app/widgets/widgets-enums.[ch]: extended GimpTabStyle enum so we
	are able to distinguish icon and preview tabs.

	* app/widgets/gimpdockable.[ch]: renamed GimpDockableGetIconFunc
	to GimpDockableGetPreviewFunc. Always create stock icons for
	"icon" tab styles and use the get_preview_func only for "preview"
	tab styles.

	* app/gui/dialogs-constructors.c: changed accordingly.

	* app/gui/dialogs-menu.c: Added "Current Status" options to the
	"Tab Style" menu and grey them out if the dockable has no
	get_preview_func.
2003-08-15 15:03:03 +00:00
Michael Natterer 6fabca2e17 Added configurable styles for dockable tabs (fixes bug #87376):
2003-07-08  Michael Natterer  <mitch@gimp.org>

	Added configurable styles for dockable tabs (fixes bug #87376):

	* app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle
	which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }.

	* app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to
	the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON.
	Renamed "short_name" to "name" and "name" to "blurb". Renamed
	GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all
	tab styles in gimp_dockable_real_get_tab_widget() and use the
	"get_icon_func" only for creating the tab's icon, not the entire
	tab widget.

	* app/widgets/gimpdockbook.[ch]: changed accordingly. Create the
	menu widgets and the DND icon using gimp_dockable_get_tab_widget()
	with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating
	tons of code. Made gimp_dockbook_get_tab_widget() public because
	it's needed for exchanging tabs on-the-fly.

	* app/widgets/gimpimagedock.c: changed accordingly.

	* app/widgets/gimpdialogfactory.c: remember the dockables' tab
	style in sessionrc.

	* app/gui/dialogs-menu.c: added a submenu to select the tab style
	for each dockable.

	* app/gui/dialogs-commands.[ch]: new callback
	dialogs_tab_style_cmd_callback().

	* app/gui/dialogs-constructors.[ch]: added stock_ids to all
	dockables, swapped the "name" and "blurb" parameters, reordered
	functions, cleanup.

	* app/gui/dialogs-menu.c
	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the
	color editor dockable and renamed it to "FG/BG Color".
2003-07-08 15:07:56 +00:00
Michael Natterer fde9575781 derive it from GtkBin, not from GtkVBox. Removed "content_spacing" style
2003-04-11  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.[ch]: derive it from GtkBin, not from
	GtkVBox. Removed "content_spacing" style property.

	* app/widgets/gimpcontainerview-utils.c
	* etc/gtkrc_user
	* themes/Default/gtkrc: changed accordingly.
2003-04-11 16:51:49 +00:00
Michael Natterer e9d617b5f2 Added "gpointer get_tab_data" to GimpDockableGetTabFunc and to
2003-04-08  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.[ch]: Added "gpointer get_tab_data" to
	GimpDockableGetTabFunc and to gimp_dockable_new().

	* app/gui/dialogs-constructors.c: changed accordingly. Replaced
	dialogs_[brush,pattern,gradient,palette,font]_tab_func() by
	dialogs_viewable_tab_func() which gets passed the GType as
	get_tab_data.
2003-04-08 19:54:22 +00:00
Michael Natterer b521746d29 We can always create GimpPreviews for any GtkIconSize, but not vice versa.
2002-05-10  Michael Natterer  <mitch@gimp.org>

	We can always create GimpPreviews for any GtkIconSize, but
	not vice versa. therefore:

	* app/widgets/gimpdockable.[ch]: changed the "gint size" parameter
	used for tab sizes to "GtkIconSize size" all over the place. Added
	"stock_id" in addition to "name" and "short_name".

	* app/widgets/gimpdockbook.c
	* app/widgets/gimpimagedock.c: use GtkIconSize instead of integer
	preview sizes for all widget style properties. Renamed them from
	"blah_height" to "blah_size" because "height" is an implementation
	detail.

	* app/gui/dialogs-constructors.c: changed calls to
	gimp_dockable_new() and all *_tab_func()s accordingly. Removed
	the hack for the navigation tab and added a general tab_func
	which returns a hbox with an icon & label.

	* app/gui/menus.c: made the dialog menus found under <Toolbox>,
	<Image> and <Dialogs> more consistent and added more stock icons.

	* etc/gtkrc_user
	* themes/Default/gtkrc: changed accordingly.
2002-05-10 14:50:27 +00:00
Sven Neumann 757017a8e2 bumped version number to 1.3.1. Require Glib/GTK+-1.3.11 and Pango-0.22.
2001-11-23  Sven Neumann  <sven@gimp.org>

	* configure.in: bumped version number to 1.3.1.
	Require Glib/GTK+-1.3.11 and Pango-0.22. Removed GDK_DISABLE_COMPAT_H
	and GTK_DISABLE_COMPAT_H from our default CFLAGS since they don't
	exist any longer.

	* RELEASE-TO-CVS.patch: removed since the glib/gtk+ API is supposed to
	be frozen now.

	* HACKING: removed reference to RELEASE-TO-CVS.patch

	* app/gui/menus.c
	* app/tools/gimptexttool.c: applied RELEASE-TO-CVS.patch to conform
	to the new GTK+/Pango API.

	* app/core/Makefile.am: generate marshallers with gimp_marshal prefix.

	* app/core/gimpmarshal.list: added all marshallers we use.

	* app/core/gimpmarshal.[ch]: regenerated.

	* app/[lots of .c files]: use gimp_marshal_* for all marshallers.

	* data/images/
	* app/app_procs.c
	* app/gui/splash.c:

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimputils.[ch]: removed since they are no longer needed.

	* app/gimprc.c
	* plug-ins/common/ps.c
	* plug-ins/gdyntext/gdyntext.c
	* plug-ins/gdyntext/gdyntextcompat.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gflare/gflare.c
	* plug-ins/script-fu/script-fu-scripts.c: use glib functions instead
	of gimp_strescape() and gimpstrcompress().

	* cleaned up all header files: use G_BEGIN_DECLS/G_END_DECLS, declared
	all _get_type function as G_GNUC_CONST.

	* tools/pdbgen/enumcode.pl
	* tools/pdbgen/lib.pl: make them generate header files using
	G_BEGIN_DECLS/G_END_DECLS.

	* pixmaps/Makefile.am
	* pixmaps/wilber3.xpm: removed ...
	* data/images/tips_wilber.png: ... and added here as PNG

	* app/gui/tips-dialog.c: load the Wilber on demand using GdkPixbuf.

	* data/images/gimp_splash.ppm: removed ...
	* data/images/gimp_splash.png: ... and added as PNG

	* app/app_procs.c
	* app/gui/splash.[ch]: load the splash image using GdkPixbuf.

	* app/gui/about-dialog.c: sink the GtkPreview.
2001-11-22 23:46:13 +00:00
Michael Natterer 6670bca26b added a handler for GimpImage's "alpha_changed" signal (does nothing yet).
2001-10-17  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpchannellistview.c: added a handler for GimpImage's
	"alpha_changed" signal (does nothing yet).

	* app/widgets/[lots of files]: somehow my last perl torturing
	removed my email address from the copyright notice. Another perl
	hack brought it back now :)
2001-10-17 16:11:28 +00:00
Michael Natterer 18dd072836 app/gimpprogress.[ch] s/GDisplay/GimpDisplay/
2001-10-16  Michael Natterer  <mitch@gimp.org>

	* app/gimpprogress.[ch]
	* app/undo.c: s/GDisplay/GimpDisplay/

	* app/plug_in.[ch]: removed unused boolean "destroy" field of
	the PlugIn struct.

	* app/core/gimpedit.c: don't include "app_procs.h"

	* app/display/gimpdisplay-callbacks.c: moved the "grab_abd_scroll"
	stuff from gimpdisplay-scroll.* here (less complicated and easier
	to cleanup...)

	* app/display/gimpdisplay-scroll.[ch]: removed here.

	* app/display/gimpdisplay-render.[ch]
	* app/display/gimpdisplay-selection.[ch]
	* app/display/gimpdisplayshell.c: s/GDisplay/GimpDisplay/g

	* app/display/gimpdisplay.[ch]: ditto, removed gdisplay_active()
	which was just a wrapper around
	"gimp_context_get_display (gimp_get_user_context (the_gimp))"
	(which is more to type but makes the use of the global
	"the_gimp" variable more obvious).

	* app/gui/color-area.h
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-dialog-utils.c
	* app/gui/image-commands.c
	* app/gui/info-window.h
	* app/gui/paths-dialog.h
	* app/gui/select-commands.c
	* app/gui/tool-options-dialog.c
	* app/gui/tools-commands.c
	* app/gui/view-commands.c: s/GDisplay/GimpDisplay/, gdisplay_active()
	removal, include "app_procs.h" for "the_gimp".

	* app/tools/gimpbezierselecttool.h
	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpcolorbalancetool.[ch]
	* app/tools/gimpcurvestool.[ch]
	* app/tools/gimpeditselectiontool.h
	* app/tools/gimphistogramtool.[ch]
	* app/tools/gimphuesaturationtool.[ch]
	* app/tools/gimplevelstool.[ch]
	* app/tools/gimpmovetool.h
	* app/tools/gimpperspectivetool.h
	* app/tools/gimpposterizetool.[ch]
	* app/tools/gimprotatetool.h
	* app/tools/gimpscaletool.h
	* app/tools/gimpsheartool.h
	* app/tools/gimptexttool.h
	* app/tools/gimpthresholdtool.[ch]
	* app/tools/gimptool.[ch]
	* app/tools/gimptransformtool.h
	* app/tools/tool_manager.[ch]: lots of s/GDisplay/GimpDisplay/, made
	all *_dialog_hide() functions private, cleanup.

	* app/widgets/*: removed GtkType and gtk_type_* stuff entirely and
	use GObject functions, removed lots of empty "destroy" methods and
	use more type checking class cast macros instead of casting
	directly.

	* app/widgets/gimpcontainermenu.c: fixed item insert order.

	* app/widgets/gimphistogramview.[ch]: cleaned up and renamed all
	functions.

	* app/widgets/gimpwidgets-utils.[ch]: removed gimp_dialog_hide() as
	Gtk+ does the right thing (TM) now.

	* tools/pdbgen/pdb/color.pdb: implemented "histogram" without
	digging into tools/ and widgets/ (needs to be done for all
	color PDB functions).

	* tools/pdbgen/pdb/gimprc.pdb: no need to use "the_gimp" in a PDB
	function as a "Gimp" pointer is passed to them all.

	* tools/pdbgen/pdb/image.pdb: don't include "app_procs.h"

	* app/pdb/color_cmds.c
	* app/pdb/gimprc_cmds.c
	* app/pdb/image_cmds.c: regenerated.

	* app/pdb/procedural_db.c: don't include "app_procs.h"
2001-10-17 11:33:43 +00:00
Michael Natterer a824143b20 set style properties for dockables.
2001-08-03  Michael Natterer  <mitch@gimp.org>

	* gtkrc: set style properties for dockables.

	* app/main.c: some #if 0'ed code for mem profiling.

	* app/gui/commands.[ch]
	* app/gui/menus.c: added a mem profiling menu entry + callback.

	* app/gui/palette-editor.c: added a #warning as reminder, use
	gtk_dialog_set_has_separator().

	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpcontainerview.[ch]
	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdrawablelistview.[ch]: added some style
	properties to set GimpDockable and friends' borders and spacings.

	* libgimpwidgets/gimppixmap.[ch]
	* libgimpwidgets/gimpsizeentry.[ch]
	* libgimpwidgets/gimpunitmenu.[ch]: GObject stuff, cleanup.

	* app/docindex.c
	* app/errorconsole.c
	* app/gdisplay_color_ui.c
	* app/gimpprogress.c
	* app/module_db.c
	* app/undo_history.c
	* app/user_install.c
	* app/gui/channels-commands.c
	* app/gui/gradient-editor.c
	* app/gui/info-window.c
	* app/gui/tips-dialog.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c
	* app/widgets/gimpdatafactoryview.c
	* libgimp/gimpexport.c
	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* plug-ins/[lots of files]:

	Some perl mass processing applying s/_("Foo")/GTK_STOCK_FOO/g,
	minor manual cleanup in some files.
2001-08-03 19:43:19 +00:00
Michael Natterer 06b16890ba Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24  Michael Natterer  <mitch@gimp.org>

	Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)

	* configure.in: require glib/gtk+ >= 1.3.7, commented out the
	gtkxmhtml stuff.

	From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
	to hack or use GIMP HEAD.

	Beware, it crashes randomly :)

	* app/core/Makefile.am
	* app/core/gimpmarshal.list: new file plus rules to generate
	gimpmarshal.[ch] from it.

	* app/core/*
	* app/tools/*
	* app/widgets/*
	* libgimpwidgets/*: started to use the glib object system. All
	core/ objects are still gtk objects however. All signals are
	created using g_signal_new(). There are many gtk+ artefacts left.
	Finally, we will _not_ use the gtk_signal_foo() wrappers and
	friends any more.

	* app/colormaps.c
	* app/devices.[ch]
	* app/disp_callbacks.c
	* app/errorconsole.c
	* app/file-save.[ch]
	* app/interface.c
	* app/module_db.c
	* app/nav_window.c
	* app/ops_buttons.c
	* app/scroll.c
	* app/user_install.c
	* app/gui/about-dialog.c
	* app/gui/brush-editor.c
	* app/gui/brushes-commands.c
	* app/gui/color-notebook.c
	* app/gui/colormap-dialog.c
	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/file-commands.c
	* app/gui/file-dialog-utils.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.[ch]
	* app/gui/file-save-dialog.c
	* app/gui/gradient-editor.c
	* app/gui/gradients-commands.c
	* app/gui/image-commands.c
	* app/gui/info-dialog.[ch]
	* app/gui/layer-select.c
	* app/gui/layers-commands.c
	* app/gui/menus.c
	* app/gui/offset-dialog.c
	* app/gui/palette-editor.c
	* app/gui/palettes-commands.c
	* app/gui/patterns-commands.c
	* app/gui/preferences-dialog.c
	* app/gui/resize-dialog.[ch]
	* app/gui/splash.c
	* app/gui/tips-dialog.c
	* app/gui/tool-options-dialog.c
	* app/gui/toolbox.c
	* app/gui/tools-commands.c
	* libgimp/gimpbrushmenu.c
	* libgimp/gimpmenu.c
	* libgimp/gimppatternmenu.c
	* libgimp/gimpui.c
	* libgimpbase/gimpenv.c: tons and tons of changes like "const
	gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
	and currently disables), lots of s/gtk_signal/g_signal/,
	removal/replacement of deprecated stuff,
	s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
	while I was on it, zillions of warnings left...

	* modules/Makefile.am: disabled the water color selector
	temporarily (XInput issues).

	* plug-ins/Makefile.am
	* plug-ins/common/.cvsignore
	* plug-ins/common/Makefile.am
	* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
	which did not build (including Script-Fu). They are trivial to
	fix.
2001-07-24 21:27:11 +00:00
Michael Natterer 714f4b14ea some minor fixes / cleanup.
2001-04-23  Michael Natterer  <mitch@gimp.org>

	* app/gimpcontext.[ch]: some minor fixes / cleanup.

	* app/gimpdata.c: forgot to gtk_object_class_add_signals() in
	class_init().

	* app/gui/dialogs-constructors.[ch]: added a tool_tab_func() so
	the notebook tab shows a tool preview, pass a GimpContext to all
	dialog constructors and added set_context() functions for all
	dockable based dialogs so they can be configured to use the
	context of the destination dock when dragging them around.

	* app/widgets/gimpcontainermenuimpl.c: removed debugging output.

	* app/widgets/gimpdialogfactory.[ch]: add a method to create
	dockables (which gets passed the dock the dockable will be added
	to) so the dockables can be created in the right context.

	* app/widgets/gimpdock.[ch]: added a GimpContext attribute, remove
	the dockbooks explicitely in destroy().

	* app/widgets/gimpdockable.[ch]: dockables now know about their
	set_context_func() and can thus be dragged between different
	contexts.

	* app/widgets/gimpdockbook.c: gimp_dockbook_add(): refuse to add
	dockables to dockbooks which are not part of a dock, set the
	dockable's context after adding it.

	* app/widgets/gimpimagedock.[ch]: image docks now keep a pointer
	to the global image list which is passed to them on construction
	so they don't need to know about the global "image_context"
	variable, added an "Auto" button like in L&C.

	* app/gui/dialogs-commands.c: changed accordingly.
2001-04-23 16:58:18 +00:00
Michael Natterer 90e8b4d790 cleanup.
2001-04-22  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am: cleanup.

	* app/interface.c: #include "gimpui.h"

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.c
	* app/gui/menus.c
	* app/gui/test-commands.[ch]: changes for the image menu below.

	* app/apptypes.h
	* app/widgets/Makefile.am
	* app/widgets/gimpcontainermenu.[ch]
	* app/widgets/gimpcontainermenuimpl.[ch]: new widgets. The actual
	implemtation lives in a separate file because
	gimpcontainermenu.c's code is identical to gimpcontainerview.c's
	except for the base class. This will become an interface with Gtk 2.0.

	* app/widgets/gimpimagedock.[ch]: a dock with an image menu. The
	pages still don't follow the context correctly.

	* app/widgets/gimpmenuitem.[ch]: a menu item with a preview.

	* app/widgets/gimpdialogfactory.[ch]: pass a dock constructor to
	the constructor and provide a method to create a new dock within
	this factory's context.

	* app/widgets/gimpdock.[ch]: removed the constructor because we
	create only image docks now. Put the vbox into a main_vbox (which
	also contains the image menu).

	* app/widgets/gimpdockbook.[ch]: create new docks with the dialog
	factory.

	* app/gimpcontainer.[ch]
	* app/gimpdata.[ch]
	* app/gimpdatafactory.[ch]
	* app/gimpdatalist.[ch]
	* app/gimplist.[ch]
	* app/gimpviewable.[ch]
	* app/widgets/gimpbrushpreview.[ch]
	* app/widgets/gimpcontainergridview.[ch]
	* app/widgets/gimpcontainerlistview.[ch]
	* app/widgets/gimpcontainerview.[ch]
	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdrawablelistitem.[ch]
	* app/widgets/gimpdrawablelistview.[ch]
	* app/widgets/gimpdrawablepreview.[ch]
	* app/widgets/gimplayerlistitem.[ch]
	* app/widgets/gimplayerlistview.[ch]
	* app/widgets/gimplistitem.[ch]
	* app/widgets/gimppalettepreview.[ch]
	* app/widgets/gimppatternpreview.[ch]
	* app/widgets/gimppreview.[ch]: ass-sign some copyrights.
2001-04-22 00:38:56 +00:00
Michael Natterer aa77e7140d grouped the files together which will go to gui/.
2001-04-15  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am: grouped the files together which will go to gui/.

	* app/widgets/gimpdialogfactory.[ch]: maintain a list of open
	GimpDocks for session management.

	* app/widgets/gimpdock.c: register open docks with the dialog
	factory.

	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdockbook.c: pass a pointer to the GimpDockbook
	to the GimpDockable's "get_tab" function because the function is
	called before the dockable is added to the dockbook.

	* app/test_commands.c
	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.c: changed accordingly.
2001-04-15 16:16:13 +00:00
Michael Natterer 4d33754a37 app/Makefile.am app/apptypes.h new object (the notebook separated out of
2001-04-10  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/apptypes.h
	* app/gimpdockbook.[ch]: new object (the notebook separated out
	of gimpdock.[ch]).

	* app/gimpdnd.h: new DND type "DIALOG".

	* app/gimpdock.[ch]
	* app/gimpdockable.[ch]: DND mostly works now.

	* app/menus.c
	* app/test_commands.[ch]: updated.
2001-04-10 16:03:40 +00:00
Michael Natterer 1187328dee configure.in app/Makefile.am app/paint-funcs/.cvsignore made the
2001-04-07  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/Makefile.am
	* app/paint-funcs/.cvsignore
	* app/paint-funcs/Makefile.am: made the paint-funcs directory compile
	so Prof can continue hacking it. The old stuff still needs to be
	removed.

	* app/apptypes.h
	* app/gimpdock.[ch]
	* app/gimpdockable.[ch]: new widgets (not used yet).

	* app/menus.c
	* app/test_commands.[ch]: untested testing code for the new widgets.
2001-04-07 14:44:12 +00:00