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
2008-07-23 Sven Neumann <sven@gimp.org>
* app/widgets/gimpsessioninfo.c
(gimp_session_info_get_geometry):
don't report negative offsets, they would be interpreted
wrongly.
svn path=/trunk/; revision=26292
2008-05-16 Michael Natterer <mitch@gimp.org>
Implement the presistent menu of recently closed docks, still
somewhat hackish but fully functional. Fixes bug #132744.
* app/actions/dialogs-actions.c
* app/actions/dialogs-commands.[ch]
* menus/image-menu.xml.in: remove the menu items that were
creating the hardcoded preconfigured docks.
* app/dialogs/dialogs.[ch]: add GimpContainer of recently closed
docks and API to load and save it.
* app/gui/session.c: call the recent dock load and save functions.
* app/widgets/gimpsessioninfo.[ch]: implement the GimpConfig interface
and (de)serialize via proper interface methods.
* app/gui/session.c
* app/widgets/gimpdialogfactory.c: use the GimpConfig API
to (de)serialize session infos and added the code that was
formerly in the info's (de)serialize functions but didn't belong
there.
* app/widgets/gimpaction.[ch]: add "max-width-chars" property and
set it on proxy menu item labels.
* app/actions/windows-actions.[ch]
* app/actions/windows-commands.[ch]
* app/menus/windows-menu.c: add actions and menu of recently
closed docks and code to restore the dock when the menu items are
selected. Use above new action property to ensure a minimum
width of the menu.
* app/widgets/gimpmenudock.c: use '-' instead of '|' for
separating notebooks in the window title. Menu items don't like '|'.
* app/widgets/gimpdock.c: removed the confirmation dialog when
closing docks and simply add them to the recent docks container.
This code is totally misplaced and will move to another file soon.
svn path=/trunk/; revision=25671
2008-05-14 Michael Natterer <mitch@gimp.org>
Made session info serialization independent from widgets so it can
be used on stored dock layouts which are not open:
* app/widgets/gimpsessioninfo-book.[ch]
* app/widgets/gimpsessioninfo-dock.[ch]
* app/widgets/gimpsessioninfo-dockable.[ch]: add from_widget()
functions which return newly allocated session info structs.
Changed serialize() functions to take these structs instead of
widgets. Changed deserialize() functions to return the structs
instead of appending them to lists in their parent structs. Don't
free anything in restore().
* app/widgets/gimpsessioninfo-aux.[ch]
(gimp_session_info_aux_serialize): take a GList of aux_info
instead of a widget.
* app/widgets/gimpsessioninfo.[ch]: add new functions get_info()
which collects above session info details from dialogs and
clear_info() which clears that info. Call clear_info() from
finalize(). Don't free anything in restore().
* app/widgets/gimpdialogfactory.c
(gimp_dialog_factories_save_foreach): collect the session info
detials from the dialogs before serializing because serialize()
doesn't know about the widget any longer. Clear the infos after
serializing.
(gimp_dialog_factories_restore_foreach): clear the session info
details after creating the dialogs because restore() doesn't clear
the info by itself any longer.
svn path=/trunk/; revision=25657
2008-03-23 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpsessioninfo.c (gimp_session_info_get_geometry):
use gdk_drawable_get_size() instead of looking at
widget->allocation since the latter is not yet updated if this
function is called from the dialog factory's "configure-event"
callback. Fixes remembering of dialog sizes within one session.
svn path=/trunk/; revision=25175
2008-03-22 Sven Neumann <sven@gimp.org>
* themes/Default/gtkrc
* app/widgets/gimpmenudock.c: reduced minimum dock width to 200
pixels.
* etc/sessionrc: use -0 instead of -1, just like in X geometry
strings. Changed default dock sizes to be taller but less wide.
* app/widgets/gimpsessioninfo.c: changed code to parse -0 from
the
sessionrc file and to deal more correctly with negative offsets.
svn path=/trunk/; revision=25169
2008-03-22 Sven Neumann <sven@gimp.org>
* app/widgets/gimpsessioninfo.c
(gimp_session_info_set_geometry):
deal with negative positions read from the sessionrc file and
interpret them as a hint to align the window with the right,
respective bottom edge of the screen.
* etc/sessionrc: position the toolbox in the upper left, the
additional dock in the upper right corner of the screen.
svn path=/trunk/; revision=25167
2007-05-24 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpsessioninfo.[ch]: removed more code and cleaned
up the API.
* app/widgets/Makefile.am
* app/widgets/gimpsessioninfodock.[ch]: added the removed code here.
* app/widgets/gimpdialogfactory.c: changed accordingly.
svn path=/trunk/; revision=22604
2006-04-20 Tor Lillqvist <tml@novell.com>
* app/widgets/gimpsessioninfo.c (get_appropriate_monitor): New
helper function. Same functionality as
gdk_screen_get_monitor_at_window(), except that it takes a window
geometry as parameter and not the window itself.
(gimp_session_info_set_geometry): Make sure the window is
completely inside a monitor. (#339099, #324254)
2006-01-14 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpsessioninfo.c (gimp_session_info_restore): always
set the current page of dockbooks, also if it's the first one.
2004-11-04 Sven Neumann <sven@gimp.org>
* app/widgets/gimpsessioninfo.c: be more tolerant and silently
skip entries that the dialog factory doesn't recognize.
* app/widgets/gimpdialogfactory.c: minor cleanup.
2004-09-01 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: added a boolean parameter to
gimp_dialog_factory_dialog_new() to let the caller decide whether
the window should be presented or not.
* app/actions/dialogs-commands.c
* app/actions/image-commands.c
* app/actions/templates-commands.c
* app/gui/gui-vtable.c
* app/gui/gui.c
* app/widgets/gimpsessioninfo.c: changed accordingly. Do not let
gimp_dialog_factory_dialog_new() present the dialog if we need to
change it after creation. This avoids annoying resizes, noticeable
especially with the error dialog.
2004-07-08 Sven Neumann <sven@gimp.org>
* app/widgets/gimpsessioninfo.c: only write aux-info for properties
that have been changed from their default values.
* app/widgets/gimphistogrameditor.c: some code cleanup.
2004-07-08 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-deserialize.c
* app/config/gimpconfig-serialize.c: removed redundant casts.
* app/widgets/gimpsessioninfo.[ch]: added convenience functions to
get and set aux-info based on object properties.
* app/widgets/gimphistogrameditor.c: use the new functions to save
a histogram's channel and scale in the sessionrc.
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-03-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: made enum
GimpDialogVisibilityState and GIMP_DIALOG_VISIBILITY_KEY public.
* app/widgets/gimpsessioninfo.c (gimp_session_info_get_geometry):
only look at GTK_WIDGET_VISIBLE(info->widget) if the dialog's
visibility state is GIMP_DIALOG_VISIBILITY_UNKNOWN and map the
visibility state to info->open otherwise.
Fixes bug #137076.
2003-12-16 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpsessioninfo.c (gimp_session_info_restore): free
GimpSessionInfoAux structs using gimp_session_info_aux_free()
instead of g_free() so we don't leak its members.
2003-11-14 Sven Neumann <sven@gimp.org>
* libgimpbase/gimputils.[ch] (gimp_memsize_to_string): take a
guint64 parameter and handle values beyond a gigabyte.
* app/core/gimptemplate.[ch]: use a guint64 for the initial memory
size and removed the gboolean that used to indicate a gulong
overflow.
* app/widgets/gimptemplateeditor.[ch]: changed accordingly.
* app/gui/file-new-dialog.c: don't set the OK button insensitive
when the initial memory size exceeds GULONG_MAX.
* app/widgets/gimpsessioninfo.c (gimp_session_info_deserialize):
replaced a misleading comment.
2003-11-13 Sven Neumann <sven@gimp.org>
* app/widgets/gimpsessioninfo.c: only save the screen number to
the sessionrc if the screen is not the default screen.
2003-11-13 Sven Neumann <sven@gimp.org>
* app/widgets/gimpsessioninfo.c (gimp_session_info_deserialize):
restore compatibility with older sessionrc format. No need to
break everyone's sessionrc again.
2003-11-13 Michael Natterer <mitch@gimp.org>
Made session management multiscreen aware:
* app/widgets/gimpsessioninfo.[ch]: added "gint screen" member
to struct GimpSessionInfo.
(gimp_session_info_get_geometry): ask the window for its screen.
(gimp_session_info_restore): place the window on the remembered
screen if the screen exists.
(gimp_session_info_save)
(gimp_session_info_deserialize): extended "open-on-exit" property
to include the screen number (e.g. "(open-on-exit 1)" for screen 1).
This change breaks everybody's sessionrc again...
2003-11-08 Michael Natterer <mitch@gimp.org>
To be multihead safe, each new window or menu needs to be
associated with a GdkScreen or it will pop up on the default
screen.
* libgimpwidgets/gimpquerybox.[ch]
* app/display/gimpdisplayshell-layer-select.[ch]
* app/widgets/widgets-types.h
* app/widgets/gimpitemfactory.[ch]
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimptemplateview.[ch]
* app/widgets/gimptooldialog.[ch]
* app/widgets/gimpviewabledialog.[ch]
* app/gui/channels-commands.[ch]
* app/gui/color-notebook.[ch]
* app/gui/convert-dialog.[ch]
* app/gui/edit-commands.[ch]
* app/gui/grid-dialog.[ch]
* app/gui/image-commands.[ch]
* app/gui/info-dialog.[ch]
* app/gui/layers-commands.[ch]
* app/gui/offset-dialog.[ch]
* app/gui/resize-dialog.[ch]
* app/gui/stroke-dialog.[ch]
* app/gui/templates-commands.[ch]
* app/gui/vectors-commands.[ch]: added "GtkWidget *parent"
paramaters to all functions which create menus, popups or windows
and pass "parent" to gimp_dialog_new() or one of the various
wrappers around it. As a side effect, this fixes bug #61092.
* app/widgets/gimpdialogfactory.[ch]: added "GdkScreen *screen"
instead of "parent" here since there are no possible parent
windows on startup.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_origin_button_press): added a quick hack to
send a display to another screen: click the origin button with the
middle mouse button.
* app/display/gimpdisplayshell.c
(gimp_display_shell_screen_changed): don't chain up
undonditionally (don't crash).
* libgimpwidgets/gimpdialog.c (gimp_dialog_new_valist): set the
dialog's screen from a non-GtkWidget parent widget. The rest of
non-window parent widget handling is still unimplemented.
* libgimpwidgets/gimpcolorbutton.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpdevicestatus.c
* app/widgets/gimpdockable.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimperrorconsole.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimphelp.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimppreview-popup.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpsessioninfo.c
* app/widgets/gimptoolbox-color-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptoolbox.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpvectorstreeview.c
* app/widgets/gimpwidgets-utils.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpnavigationview.c
* app/gui/module-browser.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/drawable-commands.c
* app/gui/file-commands.c
* app/gui/file-new-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gradient-editor-commands.c
* app/gui/gui-vtable.c
* app/gui/gui.c
* app/gui/info-window.c
* app/gui/palette-import-dialog.c
* app/gui/palettes-commands.c
* app/gui/qmask-commands.c
* app/gui/select-commands.c
* app/gui/tool-options-commands.c
* app/gui/view-commands.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcroptool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptransformtool.c
* plug-ins/FractalExplorer/FractalExplorer.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c: changed accordingly. Changed all
menu_position funcs to place the menu on the right screen.
2003-10-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: renamed
gimp_dialog_factories_idle() and _unidle() to
gimp_dialog_factories_set_busy() and _unset_busy().
Added utility function gimp_dialog_factory_set_widget_data() and
public API gimp_dialog_factory_from_widget() so we don't need to
g_object_[set|get]_data() with magic keys all over the place.
* app/widgets/gimpsessioninfo.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-menu.c
* app/gui/gui-vtable.c: changed accordingly.
* app/widgets/gimpsessioninfo.c: remember active page of all dock
notebooks in sessionrc.
* app/widgets/gimpsessioninfo.h: cleaned up the session info structs.
2003-10-11 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpsessioninfo.[ch]: added utility function
gimp_session_info_aux_new().
* app/widgets/gimpcoloreditor.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpimagedock.c (get_aux_info): use it.
2003-10-11 Michael Natterer <mitch@gimp.org>
* app/widgets/widgets-types.h
* app/widgets/gimpsessioninfo.[ch]: added new struct
GimpSessionInfoAux which contains "gchar *name" and "gchar *value".
Changed sessionrc "aux-info" format again to be really extendable
this time. Also breaks everybody's sessionrc again.
* app/widgets/gimpimagedock.c
* etc/sessionrc: changed accordingly.
Implemented the stuff suggested in bug #122964. Fixes bug #122964
and bug #52206:
* app/widgets/gimpdataeditor.[ch]: replaced the "Gimp" member by a
"GimpDataFactory" and changed gimp_data_editor_construct()
accordingly. Implement GimpDockedInterface::set_aux_info() and
get_aux_info() and remember the currently edited data across
sessions.
* app/gui/gradient-editor-commands.c
* app/gui/gradient-editor-menu.c
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimppaletteeditor.c: changed accordingly.
* app/widgets/gimpcoloreditor.c: remember the active color
selector across sessions.
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 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.