2008-06-28 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.[ch]: add new function
gimp_container_tree_view_connect_name_edited() which makes the
name cell editable and connects a passed "edited" callback.
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimpsettingseditor.c
* app/widgets/gimptemplateview.c: use it instead of having the
same code four times.
svn path=/trunk/; revision=26009
2007-01-22 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdatafactoryview.c: don't add the open-as-image
button to all data factory views.
* app/widgets/gimppatternfactoryview.c: but do it here for the
Pattern dialog.
svn path=/trunk/; revision=21755
2006-05-30 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdataeditor.c (gimp_data_editor_name_activate)
* app/widgets/gimpdatafactoryview.c
(gimp_data_factory_view_tree_name_edited): strip the newly
entered name from whitespace and reject empty names.
2005-01-13 Michael Natterer <mitch@gimp.org>
Allow to easily open brushes and patterns as images.
Fixes bug #163059.
* app/actions/brushes-actions.c
* app/actions/patterns-actions.c: added "brushes-open-as-image"
and "patterns-open-as-image" actions.
* app/actions/data-commands.[ch]: added
data_open_as_image_cmd_callback() which tries to load
data->filename as image.
* app/widgets/gimphelp-ids.h: added help IDs for the new actions.
* app/widgets/gimpdatafactoryview.c: added buttons.
* menus/brushes-menu.xml
* menus/patterns-menu.xml: added them to the menus.
2004-12-10 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdatafactoryview.c
(gimp_data_factory_view_tree_name_edited)
* app/widgets/gimpitemtreeview.c
(gimp_item_tree_view_name_edited)
* app/widgets/gimptemplateview.c
(gimp_template_view_tree_name_edited): call gimp_object_set_name()
or gimp_item_rename() only if the item's name has actually changed
and restore the old text otherwise. Fixes one instance of "name is
not updated correctly after editing" for which I blamed GTK+ in
bug #145463 :-) The other instances should be fixed in GTK+ HEAD
and are imho unfixable with GTK+ 2.4.
2004-09-27 Michael Natterer <mitch@gimp.org>
* app/actions/brushes-actions.c
* app/actions/gradients-actions.c
* app/actions/palettes-actions.c
* app/actions/patterns-actions.c: made the "foo-edit" actions
GimpStringActions and pass the identifier of the editor dialog
to the callback.
* app/actions/data-commands.[ch] (data_edit_data_cmd_callback):
show the editor dialog here instead of calling view->edit_func().
* app/dialogs/dialogs-constructors.[ch]: removed the brush,
gradient and palette edit_funcs.
* app/widgets/widgets-types.h: removed typedef GimpDataEditFunc.
* app/widgets/gimpdatafactoryview.[ch]: removed the edit_func
member and parameters and create the edit button unconditionally.
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimppatternfactoryview.[ch]: changed accordingly.
* app/widgets/Makefile.am
* app/widgets/gimpdataselect.[ch]: removed this class, it's not
needed any longer.
* app/widgets/gimpbrushselect.[ch]
* app/widgets/gimpgradientselect.[ch]
* app/widgets/gimppaletteselect.[ch]
* app/widgets/gimppatternselect.[ch]: derive them from GimpPdbDialog
and follow the edit_func removal.
* app/gui/gui-vtable.c (gui_pdb_dialog_new): removed edit_func
stuff.
* app/widgets/gimpcontainereditor.c: minor unrelated cleanup.
2004-08-31 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdatafactoryview.c
(gimp_data_factory_view_activate_item): emit "clicked" on the
edit_button only if it exists and is sensitive. Fixes bug #151343.
2004-05-28 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainergridview.[ch]
* app/widgets/gimpcontainertreeview.[ch]: removed "reorderable"
from gimp_container_foo_view_new().
* app/widgets/gimpcontainereditor.[ch]: removed "reorderable" from
gimp_container_editor_construct(). Automatically set the view to
reorderable if the viewed container has no sort_func.
* app/widgets/gimpbufferview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpdocumentview.c
* app/widgets/gimpimageview.c
* app/widgets/gimptemplateview.c
* app/widgets/gimptoolview.c
* app/widgets/gimpundoeditor.c: removed reoderable stuff because
GimpContainerEditor does this generically now.
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpfontview.c: set reorderable to FALSE because
they should not be reodered even if they don't have a sort_func.
* app/gui/font-select.c: removed reorderable stuff. Some cleanup.
* app/gui/brush-select.c
* app/gui/gradient-select.c
* app/gui/palette-select.c
* app/gui/pattern-select.c: same cleanups as in font-select.c
2004-05-12 Michael Natterer <mitch@gimp.org>
* app/actions/documents-actions.c
* app/actions/documents-commands.c
* app/actions/edit-actions.c
* app/actions/edit-commands.[ch]
* app/actions/layers-actions.c
* app/actions/layers-commands.c
* app/actions/select-actions.c
* app/actions/select-commands.[ch]
* app/actions/vectors-actions.c
* app/actions/vectors-commands.[ch]: added tooltips for actions
which are now used for dialog buttons, added callback
implementations which formerly lived in various widgets, moved
some actions around and did some general cleanups.
* menus/image-menu.xml.in: s/edit-stroke/select-stroke/
* menus/Makefile.am
* menus/selection-editor-menu.xml: new popup menu.
* app/menus/menus.c: register <SelectionEditor> and <UndoEditor>
UI managers.
* app/widgets/gimpeditor.[ch]: added construct properties
"menu-factory", "menu-identifier", "ui-path" and "popup-data".
Implement GObject::constructor() and create the UI manager
if all needed properties were set. Enables creating action
buttons at widget construction time because they need a
UI manager.
(gimp_editor_add_action_button): changed to take a va_list of
"extended" actions which are invoked if the resp. button emits
"extended_clicked". Store the actions and their modifier masks in
a list attached to the button.
* app/widgets/gimpcontainerview.c
(gimp_container_view_item_selected): if the view has container
*and* context, simply change the context and return.
(gimp_container_view_context_changed): don't emit "select_item"
manually but simply call gimp_container_view_select_item().
(gimp_container_view_viewable_dropped): use
gimp_container_view_item_selected() instead of changing the
context directly.
* app/widgets/gimpcontainereditor.c
(gimp_container_editor_select_item): update the UI manager.
* app/widgets/gimpdockable.c: don't try to fiddle with the
dialog's menu if it doesn't have a ui_path (happens if the UI
manager is just a collection of actions for the dialog buttons and
has no menu registered).
* app/widgets/gimpimageeditor.c: connect to the image's "flush"
signal and update the UI manager in the callback.
* app/widgets/gimpitemtreeview.c: use GimpEditor's construct
properties to create the UI manager so GimpItemTreeView subclasses
can have action buttons. Update the UI manager in
gimp_item_tree_view_select_item().
* app/widgets/gimpbufferview.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpfontview.c
* app/widgets/gimpimageview.c
* app/widgets/gimptemplateview.c
* app/widgets/gimptoolview.c: changed calls to
gimp_editor_add_action_button() accordingly and removed some
unneeded select_item() implementations.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpvectorstreeview.[ch]
* app/widgets/gimpdocumentview.[ch]
* app/widgets/gimplayertreeview.c
* app/widgets/gimpselectioneditor.[ch]
* app/widgets/gimpundoeditor.[ch]: use action buttons and removed
lots of callbacks which went to the resp. action callbacks.
* app/widgets/widgets-types.h: removed some now unneeded function
prototypes.
* app/gui/dialogs-constructors.c: changed (simplified) many dialog
constructors accordingly.
2004-04-21 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds
API to update all action groups and knows which UIs it can create
from which XML files.
* app/widgets/gimpmenufactory.[ch]: register the XML file
basenames along with path of their toplevel menus. Create
GimpUIManagers instead of GtkUIManagers and register the
XML files and menu paths with them.
* app/gui/menus.c: register all XML files and their toplevel
menu paths.
* app/widgets/gimpeditor.[ch]: also create a GimpUIManager when
creating the GtkItemFactory. Added "const gchar *ui_identifier"
parameter to gimp_editor_create_menu().
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdataeditor.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpitemtreeview.[ch]: added "ui_identifier"
parameters to all constructors.
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpdocumentview.c
* app/widgets/gimperrorconsole.c
* app/widgets/gimpfontview.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpimageview.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimppatternfactoryview.c
* app/widgets/gimptemplateview.c
* app/widgets/gimptooloptionseditor.c
* app/gui/dialogs-constructors.c
* app/gui/gradient-select.c
* app/gui/palette-select.c
* app/gui/pattern-select.c: pass UI identifiers to the changed
functions above.
* app/display/gimpdisplayshell.[ch]: added a GimpUIManager for
the menubar (menubar creating code still commented out).
* app/display/gimpdisplay.c
* app/gui/gui-vtable.c: update the ui manager.
2004-03-17 Simon Budig <simon@gimp.org>
* app/gui/plug-in-menus.c: Sort the plugin menu entries with
the mnemonics stripped. Avoids weird ordering in the "C" and
"POSIX" locales.
* app/widgets/gimpitemtreeview.c: make a simple click on the
"New" Button use defaults and use shift-click for the new-dialog
invocation.
Some more useless button cleanup:
* app/widgets/gimpdatafactoryview.c: only create an Edit button
when the edit_function is set.
* app/core/gimp.c: don't set an edit func for the patterns.
* app/gui/patterns-menu.c: Don't create the "New", "Edit" and
"Duplicate" Menu entries for the patterns.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimppatternfactoryview.[ch]: New widget:
gimp_pattern_factory_view. Necessary to be able to hide the
"duplicate" button...
* app/gui/dialogs-constructors.c: Use it.
2004-03-17 Simon Budig <simon@gimp.org>
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c
* app/widgets/gimpdatafactoryview.c: remove basically useless
edit buttons in the layers, vectors and patterns dialog.
* app/widgets/gimpitemtreeview.c: Make Shift-Click on the "New"
button create a new item using defaults.
2004-02-13 Michael Natterer <mitch@gimp.org>
Fixed GimpData's default "writable" and "deletable" behaviour:
* app/core/gimpdata.c (gimp_data_init): default to writable and
deletable == TRUE (something that has no filename was never loaded
from disk and can't be undeletable or read-only).
Fixes bug #134274.
* app/core/gimpdata.[ch]: added new function
gimp_data_make_internal() which frees the filename and sets the
data's flags accordingly.
* app/core/gimp-gradients.c (gimp_gradients_add_gradient)
* app/core/gimpbrush.c (gimp_brush_get_standard)
* app/core/gimpgradient.c (gimp_gradient_get_standard)
* app/core/gimppalette.c (gimp_palette_get_standard)
* app/core/gimppattern.c (gimp_pattern_get_standard): use the
new function for internal data objects.
* app/core/gimpdata.c (gimp_data_save, gimp_data_delete_from_disk)
* app/core/gimpdatafactory.c (gimp_data_factory_save_single):
bail out with g_return_if_fail() is the data is not writable
or deletable.
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c: changed accordingly.
2004-02-05 Michael Natterer <mitch@gimp.org>
Disallow editing of data objects which have no save functionality.
Also fixed the misassumption that "deletable" is always equal to
"writable". Fixes bug #133456.
* app/core/gimpdata.[ch]: added a "deletable" property which is
always equal to "writable" except when the data class does not
implement GimpData::save() (then deletable may be TRUE but
writable is always FALSE).
* app/gui/brushes-menu.c
* app/gui/gradients-menu.c
* app/gui/palettes-menu.c
* app/gui/patterns-menu.c
* app/widgets/gimpdatafactoryview.c: look at data->deletable when
setting the sensitivity of the "Delete" buttons and menu items.
* app/widgets/gimpdatafactoryview.c
(gimp_data_factory_view_tree_name_edited): rename the data
only if it's writable and restore the old name otherwise.
* app/widgets/gimpdataeditor.c: no need to look at data->internal
for figuring if the data is editable, data->editable is enough.
All files above: s/writeable/writable/g
* app/widgets/gimpbrusheditor.c (gimp_brush_editor_set_data):
simplified.
2003-11-08 Michael Natterer <mitch@gimp.org>
* app/widgets/gimptooloptionseditor.c
(gimp_tool_options_editor_get_preview): use
gtk_widget_get_screen() instead of gdk_screen_get_default().
* app/widgets/gimpdatafactoryview.[ch]: added "GtkWidget *parent"
to GimpDataEditFunc.
* app/gui/dialogs-constructors.[ch]
(dialogs_edit_brush,gradient,palette_func): use the passed parent
widget for finding the right screen instead of
gdk_screen_get_deafault().
* app/gui/gui.c: minor cleanup.
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-09-18 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimppaletteeditor.[ch]
* app/widgets/gimptemplateview.[ch]: order the button boxes in
these dialogs like the entries their popup menus: The default
(double click) action is the first menu entry / button. In an
attack of consistency, also reordered functions and function
parameters all over the place to match the new order.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c
* app/gui/dialogs-constructors.c: changed accordingly.
2003-03-25 Sven Neumann <sven@gimp.org>
* Makefile.am
* gimpintl.h: removed this header file.
* gimpmiscui.c: include libgimp-intl.h.
* gimp.c (gimp_main): call setlocale() and bind to the libgimp
textdomain so that plug-ins don't need to do that explicitely.
* libgimp/stdplugins-intl.h: added the functionality that used to
live in gimpintl.h and removed the libgimp related stuff. Got rid
of the INIT_I18N_UI() macro.
* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
Plug-ins simply call INIT_I18N() once in their run() function.
* plug-ins/script-fu/script-fu-intl.h: added the functionality
that used to live in gimpintl.h and removed the libgimp related
stuff.
* app/Makefile.am
* app/gimp-intl.h: new file that defines the gettext macros for
the GIMP core.
* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.
* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
2003-03-22 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainereditor.c: allow to create a
GimpContainerEditor without a popup menu.
* app/widgets/gimpcellrendererviewable.c: free the event we
got from gdk_get_current_event().
* app/widgets/gimpcontainerview.c: check view->hash_table for
being non-NULL before using it. Be prepared to be destroyed by as
a result of calling gimp_context_set_foo(view->context, foo).
* app/widgets/gimpcontainertreeview.[ch]: added
tree_view->editable_cells and handle *all* mouse clicks in
gimp_container_tree_view_button_press() (by returning TRUE). Start
editing on double-click only. Use gtk_tree_view_set_cursor()
instead of gtk_tree_selection_select_path() to avoid
selected/focus confusion when the focus enters the widget. Be
prepeared to be destroyed as a result of item selection.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcontainerpopup.[ch]: new GtkWindow derived
widget which pops up a selection of any GimpContainer/GimpContext
combo.
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpitemtreeview.c: add the name cell to
tree_view->editable_cells so it becomes editable.
* app/tools/gimpblendoptions.c
* app/tools/paint_options.c: use the new container popup for
selecting brushes and gradients.
2003-03-06 Michael Natterer <mitch@gimp.org>
* themes/Default/images/stock-delete-16.png
* themes/Default/images/stock-lower-16.png
* themes/Default/images/stock-new-16.png
* themes/Default/images/stock-paste-16.png
* themes/Default/images/stock-raise-16.png
* themes/Default/images/stock-refresh-16.png: removed these files
since we use the icons provided by GTK+ now.
* themes/Default/gtkrc
* themes/Default/images/Makefile.am: removed them here hoo.
* libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent
in the header and the .c file. Added GIMP_STOCK_ERROR and
GIMP_STOCK_QUESTION which are available in all sizes (unlike
GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION).
* app/core/gimpviewable.c
* app/display/gimpdisplayshell.c
* app/gui/file-commands.c
* app/gui/file-new-dialog.c
* app/gui/file-save-dialog.c
* app/widgets/gimpwidgets-utils.c
* app/widgets/gimpdatafactoryview.c: use the new stock IDs.
* app/config/gimpcoreconfig.[ch]: renamed "preview_size" to
"layer_preview_size" and added "gboolean layer_previews" which
switches layer previews on/off independent of their size.
* app/config/gimprc-blurbs.h: added/changed their blurbs.
* app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE.
* app/core/gimpdrawable-preview.c
* app/core/gimpdrawable.c
* app/core/gimpimage.c: return NULL previews if
core_config->layer_previews is FALSE. Invalidate all layer/channel
previews whenever "layer_previews" changes.
* app/widgets/gimppreviewrendererdrawable.c
* app/widgets/gimppreviewrendererimage.c: render the stock_id
if the drawable/image returns a NULL preview. Fixes bug #107242.
* app/display/gimpdisplayshell-handlers.c: don't set the
sensitivity of the navigation button because it can no longer be
disabled.
* app/display/gimpdisplayshell-layer-select.c
* app/gui/dialogs-constructors.c
* app/gui/dialogs.c
* app/gui/paths-dialog.c: changed accordingly.
* app/gui/preferences-dialog.c: added a toggle button for the new
"layer_previews" boolean.
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerlistview.c: chain up unconditionally
in GimpContainerView::clear_items().
* app/widgets/gimpcontainertreeview.c: ditto. Made the reorder()
implementation lengthy and eeky (but working) again... Stop signal
emission on double clicks so GtkTreeView doesn't re-select the
item we are about change.
* app/widgets/gimpcontainerview.c
(gimp_container_view_real_clear_items): need to use
g_hash_table_new_full() here too or everything will b0rk.
* app/widgets/gimppreviewrenderer.c
(gimp_preview_renderer_default_render_stock): use
gtk_widget_render_icon() instead of gtk_icon_set_render_icon().
* tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-02-26 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.[ch]: added a writeable field to GimpData and
set it from gimp_data_set_filename().
* app/gui/brushes-menu.c
* app/gui/gradients-menu.c
* app/gui/palettes-menu.c
* app/gui/patterns-menu.c
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpgradienteditor.c: look at data->writeable when
setting widgets sensitivity.
* app/gui/user-install-dialog.c (user_install_dialog_create): reduce
some of the dialog clutter by not showing the directories created for
plug-ins.
* app/core/gimpviewable.[ch]: added a default_stock_id to
GimpViewableClass so we don't need to hold a copy in each instance.
Added accessor functions to set and get the stock_id.
* app/core/gimptoolinfo.c
* app/gui/dialogs-constructors.c
* app/gui/image-menu.c
* app/tools/gimpcroptool.c
* app/tools/gimphistogramtool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptransformtool.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimppreview.c
* app/widgets/gimptoolbox.c: use gimp_viewable_get_stock_id().
* app/text/gimptextlayer.c: set a text icon as default stock_id.
2003-01-10 Michael Natterer <mitch@gimp.org>
Move away from creating all item_factories statically in
menus_init() but create a new one for each place where one is
needed:
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpmenufactory.[ch]: new factory which creates and
configures the GimpItemFactories it knows about on-the-fly.
* app/widgets/gimpitemfactory.[ch]: added
gimp_item_factory_update() which calls the "update_func". Added
"gboolean update_on_popup" so item_factories can be configured to
require manual updates (used for the <Image> factory).
* app/gui/menus.[ch]: create a "global_menu_factory" and register
all menus we have with it. Added various setup functions which
do stuff like adding the "Open Recent" menu or reorder plug-in
menu entries. Removed the debugging stuff...
* app/gui/Makefile.am
* app/gui/debug-commands.[ch]: ...and added it here.
* app/gui/gui.c: create the <Toolbox>, the popup-<Image> and the
<Paths> factories here because they are still global.
* app/gui/plug-in-menus.[ch]: changed the "image_factory"
parameters to "item_factory" and create/update the entries for the
passed item_factory only. Makes the whole stuff much more
straightforward.
* app/plug-in/plug-ins.c: don't call plug_in_make_menu().
* app/display/gimpdisplay.[ch]
* app/display/gimpdisplayshell.[ch]: added "menu_factory" and
"popup_factory" parameters to gimp_display_new() and
gimp_display_shell_new(). Create the menubar_factory and the
qmask_factory dynamically. Pass the shell, not a Gimp to the QMask
callbacks. Changed gimp_display_shell_set_menu_sensitivity() to
gimp_display_shell_menu_update() and don't call it directly (it's
a GimpItemFactory update_func now). Call gimp_item_factory_update()
on the resp. factories instead.
* app/gui/qmask-commands.c
* app/display/gimpdisplayshell-callbacks.c
* app/tools/gimpimagemaptool.c: changed accordingly.
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimpbufferview.[ch]
* app/widgets/gimpcolormapeditor.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdataeditor.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpdialogfactory.[ch]
* app/widgets/gimpdock.c
* app/widgets/gimpdockbook.[ch]
* app/widgets/gimpdocumentview.[ch]
* app/widgets/gimpgradienteditor.[ch]
* app/widgets/gimpimageview.[ch]
* app/widgets/gimpitemlistview.[ch]
* app/widgets/gimppaletteeditor.[ch]: pass around lots of
GimpMenuFactory pointers and menu_identifiers so all views can
create their item_factories themselves. Unref the factories when
they are no longer needed because they belong to the views now.
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/dialogs.c
* app/gui/brush-select.c
* app/gui/gradient-select.c
* app/gui/palette-select.c
* app/gui/pattern-select.c: changed accordingly.
* app/gui/file-dialog-utils.[ch] (file_dialog_new): require
menu_factory and menu_identifier parameters.
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.[ch]: removed file_*_dialog_menu_init()
(they went to menus.c as setup_funcs). Added file_*_dialog_set_type()
and moved the <Load> and <Save> factory callbacks to file-commands.c
* app/gui/file-commands.[ch]: changed accordingly.
* app/gui/view-commands.c: changed the statusbar, menubar, rulers
and guides callbacks to do their job only if the setting has
actually changed. Don't update whole item factories afterwards.
Instead, just change the state of the items that actually need
update.
Unrelated:
* app/core/gimpchannel.c (gimp_channel_init): set "bounds_known"
and friends to FALSE since we don't know that the new channel will
be empty (fixes QMask and probably other stuff).
* app/gui/image-commands.c
* app/gui/vectors-commands.c: cleanup.
2003-01-05 Manish Singh <yosh@gimp.org>
* many files in app, modules and libgimp*: cleanup, removed unecessary
G_OBJECT() casts. Should do the same for plug-ins, when more of them
get undeprecated.
2003-01-04 Sven Neumann <sven@gimp.org>
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerlistview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpitemlistview.c: check preview sizes to be
smaller than GIMP_PREVIEW_MAX_SIZE instead of using a hardcoded
and much too small value of 64.
* app/widgets/gimpdialogfactory.c: check that the preview size is
in range of the GimpPreviewSize enum when parsing the sessionrc.
2002-12-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpdata.[ch]: use GError for reporting load/save
errors. Added gimp_data_error_quark() and a GimpDataError enum.
Made simple virtual functions out of save(), get_extension()
and duplicate() because they don't need to be signals.
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.[ch]
* app/core/gimpbrushpipe.[ch]
* app/core/gimpgradient.[ch]
* app/core/gimppalette.[ch]
* app/core/gimppattern.[ch]: changed accordingly. Set data->dirty
to FALSE in each _load() function.
* app/core/gimpdatafactory.[ch]: report GError messages here.
Changed the ugly factory->path pointer location hack to
factory->path_property_name and get the path from
factory->gimp->config. Added gimp_data_factory_data_duplicate()
implementation which was already declared in the header.
* app/core/gimp.c: pass the path property name to
gimp_data_factory_new().
* app/widgets/gimpdatafactoryview.c: removed the duplicate
implementation and call gimp_data_factory_data_duplicate().
* app/core/gimpgradient.[ch]: added gimp_gradient_save_as_pov().
* app/gui/gradients-commands.c: removed save_as_pov implementation
and call gimp_gradient_save_as_pov().
2002-11-30 Michael Natterer <mitch@gimp.org>
* app/base/base-types.h: removed the global "base_config" variable.
* app/base/base.[ch]: added "gboolean use_mmx" to base_init().
Don't #include "appenv.h". Pass around more parameters to reduce
the usage of the global "paint_options" pointer.
* app/app_procs.c: pass "use_mmx" to base_init().
* app/base/temp-buf.c: pass "temp_path" around internally. Declare
"base_config" extern and added a #warning.
* app/core/gimpdata.[ch]
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.[ch]
* app/core/gimpbrushpipe.[ch]
* app/core/gimpgradient.[ch]
* app/core/gimppalette.[ch]
* app/core/gimppattern.[ch]: added "gboolean stingy_memory_use"
parameters to all _new(), _load() and _duplicate() functions.
* app/core/gimpmarshal.list: GimpData::duplicate needs an
OBJECT__BOOLEAN marshaller now.
* app/core/gimpdatafactory.[ch]: added a "Gimp" pointer so the
factory can find the config. Pass base_config->stingy_memory_use
to the GimpData functions changed above.
* app/core/gimp-gradients.c
* app/core/gimp.c
* app/core/gimppalette-import.c
* app/gui/palettes-commands.c
* app/widgets/gimpdatafactoryview.c: changed accordingly.
* app/core/gimpcontext.c: get "stingy_memory_use" from
context->gimp->config.
2002-10-30 Michael Natterer <mitch@gimp.org>
* app/core/gimpdata.[ch] (gimp_data_delete_from_disk): don't
g_message() on error but return a GError.
* app/widgets/gimpdatafactoryview.c: show the message here.
2002-06-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpdata.[ch]: added a boolean "internal" which
indicates that the data object is an automatically created
internal object. Changed the code to refuse saving to deleting
internal objects.
* app/core/Makefile.am
* app/core/gimp-gradients.[ch]: new files implementing internal
gradients (FG -> BG in RGB and HSV and FG -> transparent).
* app/core/gimp.c: call gimp_gradients_init().
* app/core/gimpdatafactory.c (gimp_data_factory_data_free): don't
free internal objects so they stay there on "Refresh".
* app/core/gimpdatalist.c: sort internal objects to the beginning
of the list.
* app/widgets/gimpdataeditor.c: refuse to change the name of
internal objects.
* app/widgets/gimpdatafactoryview.c: set the "Delete" button
insensitive for internal objects.
* app/widgets/gimpgradienteditor.c: refuse to edit internal
gradients, just display them so color picking works.
* app/gui/brushes-commands.c
* app/gui/gradients-commands.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c: set the "Delete" menu item
insensitive for internal objects.
* app/gui/gui.c: need to call render_setup() earlier because of
you-dont-want-to-know-why. Will change it back once the previews
have their own render buffers.
* app/tools/gimpblendtool.c: Replaced the "Type" menu by a preview
showing the active gradient. Clicking the preview pops up the
gradient selection. Renamed the "Gradient" menu to "Shape". Removed
"blend_mode" from the BlendOptions struct because we always use
"custom" mode now.
2002-03-08 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: added GimpPaletteEntry typedef.
* app/core/gimppalette.h: removed it here.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpeditor.[ch]: new widget which is the base class
for everything which is a vbox and has a button area at the
bottom.
* app/widgets/gimpcontainerview.[ch]: derived from GimpEditor now.
* app/widgets/gimpdataeditor.[ch]: a GimpEditor subclass which is
the base class for the new data editors below.
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpchannellistview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpdocumentview.c
* app/widgets/gimpitemlistview.c
* app/widgets/gimplayerlistview.c
* app/widgets/gimpvectorslistview.c
* themes/Default/gtkrc: chagec accordingly.
* app/gui/Makefile.am
* app/gui/brush-editor.[ch]
* app/gui/gradient-editor.[ch]
* app/gui/palette-editor.[ch]: removed...
* app/widgets/gimpbrusheditor.[ch]
* app/widgets/gimpgradienteditor.[ch]
* app/widgets/gimppaletteeditor.[ch]: ...and added back as
GimpDataEditor subclasses. Lots of cleanup and stuff...
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs.c
* app/gui/gradient-editor-commands.c
* app/gui/gui-types.h
* app/gui/palette-select.c
* app/tools/gimpcolorpickertool.c: changed accordingly.
2002-01-25 Michael Natterer <mitch@gimp.org>
* configure.in: CPPFLAGS: added -DGTK_DISABLE_DEPRECATED
* libgimpwidgets/gimpdialog.c: still use the deprecated
gtk_window_set_policy() but spit out a #warning.
* app/widgets/widgets-types.h
* app/widgets/gimpitemfactory.[ch]: made it a GtkItemFactory
subclass. This way we can reproduce the effect of
gtk_item_factory_get_from_path() which is deprectated for good
reasons. For GIMP, using it its perfectly OK since we only have
one item factory per "<prefix>".
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimpbufferview.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpdialogfactory.[ch]
* app/widgets/gimpdock.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpdocumentview.[ch]
* app/widgets/gimpdrawablelistview.[ch]
* app/widgets/gimppreview.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.[ch]: pass around GimpItemFactory
pointers instead of "const gchar *" item factory identifiers.
Replaced gtk_window_set_policy() by gtk_window_set_resizable()
and other recommended stuff.
* app/gui/about-dialog.c
* app/gui/dialogs-constructors.c
* app/gui/dialogs.c
* app/gui/file-open-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c: lots of
s/gtk_item_factory_from_path/gimp_item_factory_from_path/,
gtk_window_set_policy() replacements, misc fixes.
* plug-ins/gdyntext/charmap_window.c
* plug-ins/gdyntext/gdyntext_ui.c
* plug-ins/gdyntext/message_window.c
* plug-ins/imagemap/imap_main.c: replaced gtk_window_set_policy().
2002-01-13 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimpstock.[ch]: removed stock items which are
already defined in Gtk+ (GTK_STOCK_NEW etc.).
* libgimpwidgets/gimpquerybox.[ch]: moved the icon code from the
boolean query box constructor to create_query_box() so it can be
used for all of them. New macro GIMP_QUERY_BOX_VBOX() to pack
custom widgets into the dialogs. Will probably have to make a
real widget out of it to get a sane API...
* app/gui/menus.c
* app/gui/select-commands.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpdocumentview.c
* app/widgets/gimpdrawablelistview.c
* libgimpwidgets/gimppatheditor.c
* plug-ins/common/uniteditor.c: changed accordingly.
* libgimpwidgets/gimpwidgets.c: register the WM icons in
large -> small order.
* themes/Default/Makefile.am: don't create inline pixbufs of the
removed stock items' icons...
* themes/Default/gtkrc: ...but simply override them here.
* themes/Default/imagerc: removed them here too.
2001-11-30 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimpimage-qmask.[ch]: new files: the QMask stuff
stripped from GUI code. Added gimp_image_qmask_invert().
* app/core/gimpimage.[ch]: removed the QMask functions.
* app/display/Makefile.am
* app/display/gimpdisplayshell-qmask.[ch]: removed.
* app/gui/Makefile.am
* app/gui/qmask-commands.[ch]: new files for the new QMask item
factory callbacks and the qmask query dialog.
* app/gui/menus.c: added a context menu for the QMask button.
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell-handlers.c: don't include the qmask
stuff.
* app/display/gimpdisplayshell-callbacks.[ch]: Moved the 2 qmask
callbacks here. Don't popup the dialog on double_click. Show
the contect menu on right-click.
* app/display/gimpdisplayshell-callbacks.[ch]:
gimp_display_shell_canvas_events(): removed the hack of
conntecting "key_press_event" to gtk_true() while a tool is
active. Instead, check for (event & GDK_BUTTON1_MASK) in the
key_press and key_release handlers and stop signal emission. Save
the modifier state on "button_press" and restore it after
"button_release".
Changed the way context menus are updated/shown:
- removed GimpContainerContextFunc.
- pass around item factory identifiers (e.g. "<Brushes>")
- added voodoo to update the menus before showing them.
* app/widgets/gimpitemfactory.[ch]: gimp_item_factory_new(): take
a GimpItemFactoryUpdateFunc parameter, attach it as data to the
factory and use it to update the menu in
gimp_item_factory_popup_with_date().
* app/widgets/gimpwidgets-utils.[ch]: removed
gimp_item_factory_popup_with_data() here.
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimpbufferview.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpdocumentview.[ch]
* app/widgets/gimpdrawablelistview.[ch]: use item_factory
identifier strings all over the place.
* app/widgets/gimpdockbook.c: removed the menu update code, it's
now in gui/dialogs-commands.c.
* app/gui/brushes-commands.[ch]
* app/gui/buffers-commands.[c]
* app/gui/channels-commands.[ch]
* app/gui/dialogs-commands.[ch]
* app/gui/documents-commands.[ch]
* app/gui/gradient-editor-commands.[ch]
* app/gui/gradients-commands.[ch]
* app/gui/layers-commands.[ch]
* app/gui/palettes-commands.[ch]
* app/gui/patterns-commands.[ch]: removed all show_context_menu()
functions and made the update functions public. Changed all
update functions to use the gimp_item_factory_set_foo() methods
instead of gimp_menu_item_set_foo().
* app/gui/menus.c: pass the update functions to the
gimp_item_factory_new().
* app/gui/dialogs-constructors.c: pass item factory identifiers to
all view constructors.
* app/gui/gradient-editor.c: show the context menu using the new
method.
* app/gui/toolbox.c: no need to include "dialogs-commands.h".
2001-10-22 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/docindex.[ch]: removed.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpdocumentview.[ch]: new widget as replacement.
* app/core/gimpcontext.[ch]: added context->imagefile property.
* app/app_procs.c
* app/file-save.c
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs.c
* app/gui/file-open-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gui.c
* app/gui/menus.c
* app/gui/test-commands.c: changed accordingly.
* app/widgets/gimpcontainerview.[ch]: added "gboolean reorderable"
property which needs to be set by subclasses.
* app/widgets/gimpdrawablelistview.c: removed the "insert_item"
implementation which was used to make the items reorderable.
* app/widgets/gimpcontainerlistview.[ch]: make the list items
reorderable depending on view->reorderable.
* app/widgets/gimpbufferview.c: made it reorderable.
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpcontainergridview.[ch]
* app/widgets/gimpdatafactoryview.c: changed accordingly.