gimp/app/widgets/gimpchanneltreeview.c

471 lines
14 KiB
C
Raw Normal View History

/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpchannellistview.c
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "widgets-types.h"
#include "core/gimpchannel.h"
#include "core/gimpcontainer.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
gdk_pixbuf_new_from_stream -> _from_inline 2001-10-13 Michael Natterer <mitch@gimp.org> * RELEASE-TO-CVS.patch: gdk_pixbuf_new_from_stream -> _from_inline * app/display/Makefile.am * app/display/gimpdisplay-foreach.[ch]: new files for functions operating on all displays (will go away as soon as the display behaves like a proper view which doesn't need to be updated explicitly). * app/display/gimpdisplay-callbacks.c * app/display/gimpdisplay-scale.[ch] * app/display/gimpdisplay-scroll.[ch] * app/display/gimpdisplay.[ch]: "scale" and "scroll" namespace cleanup, moved bounds_checking() to gimpdisplay-scroll.[ch], lots of unfinished, intermediate stuff. * app/display/gimpdisplayshell.[ch]: added some GObject framework for the GimpDisplayShell object (not used yet). * app/app_procs.c * app/docindex.c * app/image_map.c * app/nav_window.c * app/path.c * app/qmask.c * app/undo.c * app/gui/channels-commands.c * app/gui/convert-dialog.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/layer-select.c * app/gui/layers-commands.c * app/gui/offset-dialog.c * app/gui/paths-dialog.c * app/gui/preferences-dialog.c * app/gui/select-commands.c * app/gui/view-commands.c * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/gimptransformtool.c * app/widgets/gimpbufferview.c * app/widgets/gimpchannellistview.c * app/widgets/gimpcomponentlistitem.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimpdrawablelistview.c * app/widgets/gimplayerlistitem.c * app/widgets/gimplayerlistview.c * app/widgets/gimplistitem.c * tools/pdbgen/pdb/display.pdb * app/pdb/display_cmds.c: changed accordingly (mostly including "gimpdisplay-foreach.h" instead of "gimpdisplay.h")
2001-10-13 20:52:30 +08:00
#include "display/gimpdisplay-foreach.h"
#include "gimpchannellistview.h"
#include "gimpcomponentlistitem.h"
#include "gimpdnd.h"
#include "gimpimagepreview.h"
#include "gimplistitem.h"
#include "libgimp/gimpintl.h"
static void gimp_channel_list_view_class_init (GimpChannelListViewClass *klass);
static void gimp_channel_list_view_init (GimpChannelListView *view);
static void gimp_channel_list_view_set_image (GimpDrawableListView *view,
GimpImage *gimage);
static void gimp_channel_list_view_select_item (GimpContainerView *view,
GimpViewable *item,
gpointer insert_data);
static void gimp_channel_list_view_set_preview_size (GimpContainerView *view);
static void gimp_channel_list_view_to_selection (GimpChannelListView *view,
GimpChannel *channel,
ChannelOps operation);
static void gimp_channel_list_view_toselection_clicked
(GtkWidget *widget,
GimpChannelListView *view);
static void gimp_channel_list_view_toselection_extended_clicked
(GtkWidget *widget,
guint state,
GimpChannelListView *view);
added GimpDropMode... ...removed from here. 2001-05-06 Michael Natterer <mitch@gimp.org> * app/appenums.h: added GimpDropMode... * app/gimpdnd.h: ...removed from here. * app/gimpimage.[ch]: - New signal "mode_changed". - removed "const GimpImage*" from gimp_image_colormap_changed() because a signal emission is never "const" for the object which emits the signal. - Fixed gimp_image_[set|get]_component_[active|visible](): ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode. * app/gimpimage-convert.c * app/undo.c: call gimp_image_mode_changed(). * app/gimpviewable.c: added an implementation of "invalidate_preview" which frees the preview temp_buf which may be attached to the viewable. Subclasses need to chain up now. * app/gimpdrawable.c * app/gimpimage.c: chain up in invalidate_preview(). * app/widgets/gimpchannellistview.c: connect to the image's "mode_changed" signal and rebuild the channel list in the callback. * app/widgets/gimpcontainerview.h: indentation. * app/widgets/gimpdockbook.c: set the dockable's context to NULL in gimp_dockbook_remove() * app/widgets/gimpimagedock.c: forgot to actually set the dock's image in gimp_image_dock_new(). * app/gui/dialogs-constructors.c: added a get_name_func() for tool views which returns the tool's "blurb". It's safe to assume now that a dockable's context will exist as long as the dockable exists unless it's explicitely set to NULL, so remove ugly hacks handling context destruction. * app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-07 00:14:34 +08:00
static void gimp_channel_list_view_create_components
(GimpChannelListView *view);
static void gimp_channel_list_view_clear_components
(GimpChannelListView *view);
added GimpDropMode... ...removed from here. 2001-05-06 Michael Natterer <mitch@gimp.org> * app/appenums.h: added GimpDropMode... * app/gimpdnd.h: ...removed from here. * app/gimpimage.[ch]: - New signal "mode_changed". - removed "const GimpImage*" from gimp_image_colormap_changed() because a signal emission is never "const" for the object which emits the signal. - Fixed gimp_image_[set|get]_component_[active|visible](): ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode. * app/gimpimage-convert.c * app/undo.c: call gimp_image_mode_changed(). * app/gimpviewable.c: added an implementation of "invalidate_preview" which frees the preview temp_buf which may be attached to the viewable. Subclasses need to chain up now. * app/gimpdrawable.c * app/gimpimage.c: chain up in invalidate_preview(). * app/widgets/gimpchannellistview.c: connect to the image's "mode_changed" signal and rebuild the channel list in the callback. * app/widgets/gimpcontainerview.h: indentation. * app/widgets/gimpdockbook.c: set the dockable's context to NULL in gimp_dockbook_remove() * app/widgets/gimpimagedock.c: forgot to actually set the dock's image in gimp_image_dock_new(). * app/gui/dialogs-constructors.c: added a get_name_func() for tool views which returns the tool's "blurb". It's safe to assume now that a dockable's context will exist as long as the dockable exists unless it's explicitely set to NULL, so remove ugly hacks handling context destruction. * app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-07 00:14:34 +08:00
static void gimp_channel_list_view_mode_changed (GimpImage *gimage,
GimpChannelListView *view);
static void gimp_channel_list_view_alpha_changed (GimpImage *gimage,
GimpChannelListView *view);
static void gimp_channel_list_view_component_toggle
(GtkList *list,
GtkWidget *child,
GimpChannelListView *view);
static GimpDrawableListViewClass *parent_class = NULL;
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 19:33:43 +08:00
GType
gimp_channel_list_view_get_type (void)
{
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 19:33:43 +08:00
static GType view_type = 0;
if (! view_type)
{
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 19:33:43 +08:00
static const GTypeInfo view_info =
{
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 19:33:43 +08:00
sizeof (GimpChannelListViewClass),
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gimp_channel_list_view_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpChannelListView),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_channel_list_view_init,
};
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 19:33:43 +08:00
view_type = g_type_register_static (GIMP_TYPE_DRAWABLE_LIST_VIEW,
"GimpChannelListView",
&view_info, 0);
}
return view_type;
}
static void
gimp_channel_list_view_class_init (GimpChannelListViewClass *klass)
{
GimpContainerViewClass *container_view_class;
GimpDrawableListViewClass *drawable_view_class;
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 19:33:43 +08:00
container_view_class = GIMP_CONTAINER_VIEW_CLASS (klass);
drawable_view_class = GIMP_DRAWABLE_LIST_VIEW_CLASS (klass);
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-25 05:27:11 +08:00
parent_class = g_type_class_peek_parent (klass);
container_view_class->select_item = gimp_channel_list_view_select_item;
container_view_class->set_preview_size = gimp_channel_list_view_set_preview_size;
drawable_view_class->set_image = gimp_channel_list_view_set_image;
}
static void
gimp_channel_list_view_init (GimpChannelListView *view)
{
GimpDrawableListView *drawable_view;
register the button icons with GTK_ICON_SIZE_BUTTON, but set them as 2001-08-05 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpstock.[ch]: register the button icons with GTK_ICON_SIZE_BUTTON, but set them as scalable fallbacks for themselves so they get scaled for menus. * app/gui/menus.c: set stock icons for much more menu entries. * app/widgets/gimpwidgets-utils.[ch]: new utility function gimp_item_factory_popup_with_data(). * app/disp_callbacks.[ch] * app/gui/brushes-commands.c * app/gui/channels-commands.c * app/gui/gradients-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/paths-dialog.c * app/gui/patterns-commands.c: use the new function. * app/tools/gimpcolorbalancetool.c * app/tools/gimpcurvestool.c * app/tools/gimphuesaturationtool.c * app/tools/gimplevelstool.c * app/tools/gimpposterizetool.c: s/_("Reset")/GIMP_STOCK_RESET/ * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerview.[ch]: moved the button_box utility functions from the container editor to GimpContainerView itself. * app/widgets/gimpbufferview.c * app/widgets/gimpchannellistview.c * app/widgets/gimpcomponentlistitem.c * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpdatafactoryview.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimplayerlistitem.c * app/widgets/gimplayerlistview.c: changed accordingly. Removed lots of duplicated code and use stock images instead of pixmaps. * libgimpwidgets/gimpfileselection.[ch] * libgimpwidgets/gimppatheditor.c: use stock images instead of pixmaps. * pixmaps/Makefile.am: removed "yes" and "no", added "stroke". * pixmaps/anchor.xpm * pixmaps/delete.xpm * pixmaps/lower.xpm * pixmaps/new.xpm * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm * pixmaps/raise.xpm * pixmaps/refresh.xpm * pixmaps/toselection.xpm: made them all 16x16 so they are scaled nicely in menus. Should probably be 18x18.
2001-08-05 04:38:54 +08:00
GimpContainerView *container_view;
register the button icons with GTK_ICON_SIZE_BUTTON, but set them as 2001-08-05 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpstock.[ch]: register the button icons with GTK_ICON_SIZE_BUTTON, but set them as scalable fallbacks for themselves so they get scaled for menus. * app/gui/menus.c: set stock icons for much more menu entries. * app/widgets/gimpwidgets-utils.[ch]: new utility function gimp_item_factory_popup_with_data(). * app/disp_callbacks.[ch] * app/gui/brushes-commands.c * app/gui/channels-commands.c * app/gui/gradients-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/paths-dialog.c * app/gui/patterns-commands.c: use the new function. * app/tools/gimpcolorbalancetool.c * app/tools/gimpcurvestool.c * app/tools/gimphuesaturationtool.c * app/tools/gimplevelstool.c * app/tools/gimpposterizetool.c: s/_("Reset")/GIMP_STOCK_RESET/ * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerview.[ch]: moved the button_box utility functions from the container editor to GimpContainerView itself. * app/widgets/gimpbufferview.c * app/widgets/gimpchannellistview.c * app/widgets/gimpcomponentlistitem.c * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpdatafactoryview.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimplayerlistitem.c * app/widgets/gimplayerlistview.c: changed accordingly. Removed lots of duplicated code and use stock images instead of pixmaps. * libgimpwidgets/gimpfileselection.[ch] * libgimpwidgets/gimppatheditor.c: use stock images instead of pixmaps. * pixmaps/Makefile.am: removed "yes" and "no", added "stroke". * pixmaps/anchor.xpm * pixmaps/delete.xpm * pixmaps/lower.xpm * pixmaps/new.xpm * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm * pixmaps/raise.xpm * pixmaps/refresh.xpm * pixmaps/toselection.xpm: made them all 16x16 so they are scaled nicely in menus. Should probably be 18x18.
2001-08-05 04:38:54 +08:00
drawable_view = GIMP_DRAWABLE_LIST_VIEW (view);
container_view = GIMP_CONTAINER_VIEW (view);
/* component frame */
view->component_frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (view->component_frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (view), view->component_frame, FALSE, FALSE, 0);
gtk_box_reorder_child (GTK_BOX (view), view->component_frame, 0);
/* don't show */
view->component_list = gtk_list_new ();
gtk_list_set_selection_mode (GTK_LIST (view->component_list),
GTK_SELECTION_MULTIPLE);
gtk_container_add (GTK_CONTAINER (view->component_frame),
view->component_list);
gtk_widget_show (view->component_list);
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-25 05:27:11 +08:00
g_signal_connect (G_OBJECT (view->component_list), "select_child",
G_CALLBACK (gimp_channel_list_view_component_toggle),
view);
g_signal_connect (G_OBJECT (view->component_list), "unselect_child",
G_CALLBACK (gimp_channel_list_view_component_toggle),
view);
/* To Selection button */
register the button icons with GTK_ICON_SIZE_BUTTON, but set them as 2001-08-05 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpstock.[ch]: register the button icons with GTK_ICON_SIZE_BUTTON, but set them as scalable fallbacks for themselves so they get scaled for menus. * app/gui/menus.c: set stock icons for much more menu entries. * app/widgets/gimpwidgets-utils.[ch]: new utility function gimp_item_factory_popup_with_data(). * app/disp_callbacks.[ch] * app/gui/brushes-commands.c * app/gui/channels-commands.c * app/gui/gradients-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/paths-dialog.c * app/gui/patterns-commands.c: use the new function. * app/tools/gimpcolorbalancetool.c * app/tools/gimpcurvestool.c * app/tools/gimphuesaturationtool.c * app/tools/gimplevelstool.c * app/tools/gimpposterizetool.c: s/_("Reset")/GIMP_STOCK_RESET/ * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerview.[ch]: moved the button_box utility functions from the container editor to GimpContainerView itself. * app/widgets/gimpbufferview.c * app/widgets/gimpchannellistview.c * app/widgets/gimpcomponentlistitem.c * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpdatafactoryview.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimplayerlistitem.c * app/widgets/gimplayerlistview.c: changed accordingly. Removed lots of duplicated code and use stock images instead of pixmaps. * libgimpwidgets/gimpfileselection.[ch] * libgimpwidgets/gimppatheditor.c: use stock images instead of pixmaps. * pixmaps/Makefile.am: removed "yes" and "no", added "stroke". * pixmaps/anchor.xpm * pixmaps/delete.xpm * pixmaps/lower.xpm * pixmaps/new.xpm * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm * pixmaps/raise.xpm * pixmaps/refresh.xpm * pixmaps/toselection.xpm: made them all 16x16 so they are scaled nicely in menus. Should probably be 18x18.
2001-08-05 04:38:54 +08:00
view->toselection_button =
gimp_container_view_add_button (container_view,
GIMP_STOCK_TO_SELECTION,
_("Channel to Selection\n"
"<Shift> Add\n"
"<Ctrl> Subtract\n"
"<Shift><Ctrl> Intersect"), NULL,
G_CALLBACK (gimp_channel_list_view_toselection_clicked),
G_CALLBACK (gimp_channel_list_view_toselection_extended_clicked),
view);
gimp_container_view_enable_dnd (container_view,
GTK_BUTTON (view->toselection_button),
GIMP_TYPE_CHANNEL);
gtk_widget_set_sensitive (view->toselection_button, FALSE);
}
/* GimpChannelListView methods */
static void
gimp_channel_list_view_set_image (GimpDrawableListView *view,
GimpImage *gimage)
{
GimpChannelListView *channel_view;
channel_view = GIMP_CHANNEL_LIST_VIEW (view);
if (view->gimage)
{
if (! gimage)
gtk_widget_hide (channel_view->component_frame);
gimp_channel_list_view_clear_components (channel_view);
added GimpDropMode... ...removed from here. 2001-05-06 Michael Natterer <mitch@gimp.org> * app/appenums.h: added GimpDropMode... * app/gimpdnd.h: ...removed from here. * app/gimpimage.[ch]: - New signal "mode_changed". - removed "const GimpImage*" from gimp_image_colormap_changed() because a signal emission is never "const" for the object which emits the signal. - Fixed gimp_image_[set|get]_component_[active|visible](): ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode. * app/gimpimage-convert.c * app/undo.c: call gimp_image_mode_changed(). * app/gimpviewable.c: added an implementation of "invalidate_preview" which frees the preview temp_buf which may be attached to the viewable. Subclasses need to chain up now. * app/gimpdrawable.c * app/gimpimage.c: chain up in invalidate_preview(). * app/widgets/gimpchannellistview.c: connect to the image's "mode_changed" signal and rebuild the channel list in the callback. * app/widgets/gimpcontainerview.h: indentation. * app/widgets/gimpdockbook.c: set the dockable's context to NULL in gimp_dockbook_remove() * app/widgets/gimpimagedock.c: forgot to actually set the dock's image in gimp_image_dock_new(). * app/gui/dialogs-constructors.c: added a get_name_func() for tool views which returns the tool's "blurb". It's safe to assume now that a dockable's context will exist as long as the dockable exists unless it's explicitely set to NULL, so remove ugly hacks handling context destruction. * app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-07 00:14:34 +08:00
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-25 05:27:11 +08:00
g_signal_handlers_disconnect_by_func (G_OBJECT (view->gimage),
gimp_channel_list_view_mode_changed,
channel_view);
g_signal_handlers_disconnect_by_func (G_OBJECT (view->gimage),
gimp_channel_list_view_alpha_changed,
channel_view);
}
if (GIMP_DRAWABLE_LIST_VIEW_CLASS (parent_class)->set_image)
GIMP_DRAWABLE_LIST_VIEW_CLASS (parent_class)->set_image (view, gimage);
if (view->gimage)
{
if (! GTK_WIDGET_VISIBLE (channel_view->component_frame))
gtk_widget_show (channel_view->component_frame);
gimp_channel_list_view_create_components (channel_view);
added GimpDropMode... ...removed from here. 2001-05-06 Michael Natterer <mitch@gimp.org> * app/appenums.h: added GimpDropMode... * app/gimpdnd.h: ...removed from here. * app/gimpimage.[ch]: - New signal "mode_changed". - removed "const GimpImage*" from gimp_image_colormap_changed() because a signal emission is never "const" for the object which emits the signal. - Fixed gimp_image_[set|get]_component_[active|visible](): ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode. * app/gimpimage-convert.c * app/undo.c: call gimp_image_mode_changed(). * app/gimpviewable.c: added an implementation of "invalidate_preview" which frees the preview temp_buf which may be attached to the viewable. Subclasses need to chain up now. * app/gimpdrawable.c * app/gimpimage.c: chain up in invalidate_preview(). * app/widgets/gimpchannellistview.c: connect to the image's "mode_changed" signal and rebuild the channel list in the callback. * app/widgets/gimpcontainerview.h: indentation. * app/widgets/gimpdockbook.c: set the dockable's context to NULL in gimp_dockbook_remove() * app/widgets/gimpimagedock.c: forgot to actually set the dock's image in gimp_image_dock_new(). * app/gui/dialogs-constructors.c: added a get_name_func() for tool views which returns the tool's "blurb". It's safe to assume now that a dockable's context will exist as long as the dockable exists unless it's explicitely set to NULL, so remove ugly hacks handling context destruction. * app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-07 00:14:34 +08:00
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-25 05:27:11 +08:00
g_signal_connect (G_OBJECT (view->gimage), "mode_changed",
G_CALLBACK (gimp_channel_list_view_mode_changed),
channel_view);
g_signal_connect (G_OBJECT (view->gimage), "alpha_changed",
G_CALLBACK (gimp_channel_list_view_alpha_changed),
channel_view);
}
}
/* GimpContainerView methods */
static void
gimp_channel_list_view_select_item (GimpContainerView *view,
GimpViewable *item,
gpointer insert_data)
{
GimpDrawableListView *drawable_view;
GimpChannelListView *list_view;
drawable_view = GIMP_DRAWABLE_LIST_VIEW (view);
list_view = GIMP_CHANNEL_LIST_VIEW (view);
if (GIMP_CONTAINER_VIEW_CLASS (parent_class)->select_item)
GIMP_CONTAINER_VIEW_CLASS (parent_class)->select_item (view,
item,
insert_data);
if (drawable_view->gimage)
{
gboolean floating_sel;
floating_sel = (gimp_image_floating_sel (drawable_view->gimage) != NULL);
register the button icons with GTK_ICON_SIZE_BUTTON, but set them as 2001-08-05 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpstock.[ch]: register the button icons with GTK_ICON_SIZE_BUTTON, but set them as scalable fallbacks for themselves so they get scaled for menus. * app/gui/menus.c: set stock icons for much more menu entries. * app/widgets/gimpwidgets-utils.[ch]: new utility function gimp_item_factory_popup_with_data(). * app/disp_callbacks.[ch] * app/gui/brushes-commands.c * app/gui/channels-commands.c * app/gui/gradients-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/paths-dialog.c * app/gui/patterns-commands.c: use the new function. * app/tools/gimpcolorbalancetool.c * app/tools/gimpcurvestool.c * app/tools/gimphuesaturationtool.c * app/tools/gimplevelstool.c * app/tools/gimpposterizetool.c: s/_("Reset")/GIMP_STOCK_RESET/ * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerview.[ch]: moved the button_box utility functions from the container editor to GimpContainerView itself. * app/widgets/gimpbufferview.c * app/widgets/gimpchannellistview.c * app/widgets/gimpcomponentlistitem.c * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpdatafactoryview.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimplayerlistitem.c * app/widgets/gimplayerlistview.c: changed accordingly. Removed lots of duplicated code and use stock images instead of pixmaps. * libgimpwidgets/gimpfileselection.[ch] * libgimpwidgets/gimppatheditor.c: use stock images instead of pixmaps. * pixmaps/Makefile.am: removed "yes" and "no", added "stroke". * pixmaps/anchor.xpm * pixmaps/delete.xpm * pixmaps/lower.xpm * pixmaps/new.xpm * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm * pixmaps/raise.xpm * pixmaps/refresh.xpm * pixmaps/toselection.xpm: made them all 16x16 so they are scaled nicely in menus. Should probably be 18x18.
2001-08-05 04:38:54 +08:00
gtk_widget_set_sensitive (view->button_box, !floating_sel);
}
gtk_widget_set_sensitive (list_view->toselection_button, item != NULL);
}
static void
gimp_channel_list_view_set_preview_size (GimpContainerView *view)
{
GimpChannelListView *channel_view;
GList *list;
if (GIMP_CONTAINER_VIEW_CLASS (parent_class)->set_preview_size)
GIMP_CONTAINER_VIEW_CLASS (parent_class)->set_preview_size (view);
channel_view = GIMP_CHANNEL_LIST_VIEW (view);
for (list = GTK_LIST (channel_view->component_list)->children;
list;
list = g_list_next (list))
{
gimp_list_item_set_preview_size (GIMP_LIST_ITEM (list->data),
view->preview_size);
}
gtk_widget_queue_resize (channel_view->component_frame);
}
/* "To Selection" functions */
static void
gimp_channel_list_view_to_selection (GimpChannelListView *view,
GimpChannel *channel,
ChannelOps operation)
{
if (channel)
{
GimpImage *gimage;
GimpChannel *new_channel;
gimage = gimp_drawable_gimage (GIMP_DRAWABLE (channel));
if (operation == CHANNEL_OP_REPLACE)
{
new_channel = channel;
g_object_ref (G_OBJECT (channel));
}
else
{
new_channel = gimp_channel_copy (gimp_image_get_mask (gimage), TRUE);
gimp_channel_combine_mask (new_channel,
channel,
operation,
0, 0);
}
gimage_mask_load (gimage, new_channel);
g_object_unref (G_OBJECT (new_channel));
gdisplays_flush ();
}
}
static void
gimp_channel_list_view_toselection_clicked (GtkWidget *widget,
GimpChannelListView *view)
{
GimpDrawableListView *drawable_view;
GimpDrawable *drawable;
drawable_view = GIMP_DRAWABLE_LIST_VIEW (view);
drawable = drawable_view->get_drawable_func (drawable_view->gimage);
if (drawable)
gimp_channel_list_view_to_selection (view, GIMP_CHANNEL (drawable),
CHANNEL_OP_REPLACE);
}
static void
gimp_channel_list_view_toselection_extended_clicked (GtkWidget *widget,
guint state,
GimpChannelListView *view)
{
GimpDrawableListView *drawable_view;
GimpDrawable *drawable;
drawable_view = GIMP_DRAWABLE_LIST_VIEW (view);
drawable = drawable_view->get_drawable_func (drawable_view->gimage);
if (drawable)
{
ChannelOps operation = CHANNEL_OP_REPLACE;
if (state & GDK_SHIFT_MASK)
{
if (state & GDK_CONTROL_MASK)
operation = CHANNEL_OP_INTERSECT;
else
operation = CHANNEL_OP_ADD;
}
else if (state & GDK_CONTROL_MASK)
{
operation = CHANNEL_OP_SUB;
}
gimp_channel_list_view_to_selection (view, GIMP_CHANNEL (drawable),
operation);
}
}
static void
gimp_channel_list_view_create_components (GimpChannelListView *view)
{
GimpImage *gimage;
GtkWidget *list_item;
gint n_components = 0;
ChannelType components[MAX_CHANNELS];
GList *list = NULL;
gint i;
gimage = GIMP_DRAWABLE_LIST_VIEW (view)->gimage;
switch (gimp_image_base_type (gimage))
{
case RGB:
n_components = 3;
components[0] = RED_CHANNEL;
components[1] = GREEN_CHANNEL;
components[2] = BLUE_CHANNEL;
break;
case GRAY:
n_components = 1;
components[0] = GRAY_CHANNEL;
break;
case INDEXED:
n_components = 1;
components[0] = INDEXED_CHANNEL;
break;
}
components[n_components++] = ALPHA_CHANNEL;
for (i = 0; i < n_components; i++)
{
list_item =
gimp_component_list_item_new (gimage,
GIMP_CONTAINER_VIEW (view)->preview_size,
components[i]);
gtk_widget_show (list_item);
list = g_list_append (list, list_item);
}
gtk_list_insert_items (GTK_LIST (view->component_list), list, 0);
gtk_widget_queue_resize (GTK_WIDGET (view->component_frame));
}
added GimpDropMode... ...removed from here. 2001-05-06 Michael Natterer <mitch@gimp.org> * app/appenums.h: added GimpDropMode... * app/gimpdnd.h: ...removed from here. * app/gimpimage.[ch]: - New signal "mode_changed". - removed "const GimpImage*" from gimp_image_colormap_changed() because a signal emission is never "const" for the object which emits the signal. - Fixed gimp_image_[set|get]_component_[active|visible](): ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode. * app/gimpimage-convert.c * app/undo.c: call gimp_image_mode_changed(). * app/gimpviewable.c: added an implementation of "invalidate_preview" which frees the preview temp_buf which may be attached to the viewable. Subclasses need to chain up now. * app/gimpdrawable.c * app/gimpimage.c: chain up in invalidate_preview(). * app/widgets/gimpchannellistview.c: connect to the image's "mode_changed" signal and rebuild the channel list in the callback. * app/widgets/gimpcontainerview.h: indentation. * app/widgets/gimpdockbook.c: set the dockable's context to NULL in gimp_dockbook_remove() * app/widgets/gimpimagedock.c: forgot to actually set the dock's image in gimp_image_dock_new(). * app/gui/dialogs-constructors.c: added a get_name_func() for tool views which returns the tool's "blurb". It's safe to assume now that a dockable's context will exist as long as the dockable exists unless it's explicitely set to NULL, so remove ugly hacks handling context destruction. * app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-07 00:14:34 +08:00
static void
gimp_channel_list_view_clear_components (GimpChannelListView *view)
added GimpDropMode... ...removed from here. 2001-05-06 Michael Natterer <mitch@gimp.org> * app/appenums.h: added GimpDropMode... * app/gimpdnd.h: ...removed from here. * app/gimpimage.[ch]: - New signal "mode_changed". - removed "const GimpImage*" from gimp_image_colormap_changed() because a signal emission is never "const" for the object which emits the signal. - Fixed gimp_image_[set|get]_component_[active|visible](): ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode. * app/gimpimage-convert.c * app/undo.c: call gimp_image_mode_changed(). * app/gimpviewable.c: added an implementation of "invalidate_preview" which frees the preview temp_buf which may be attached to the viewable. Subclasses need to chain up now. * app/gimpdrawable.c * app/gimpimage.c: chain up in invalidate_preview(). * app/widgets/gimpchannellistview.c: connect to the image's "mode_changed" signal and rebuild the channel list in the callback. * app/widgets/gimpcontainerview.h: indentation. * app/widgets/gimpdockbook.c: set the dockable's context to NULL in gimp_dockbook_remove() * app/widgets/gimpimagedock.c: forgot to actually set the dock's image in gimp_image_dock_new(). * app/gui/dialogs-constructors.c: added a get_name_func() for tool views which returns the tool's "blurb". It's safe to assume now that a dockable's context will exist as long as the dockable exists unless it's explicitely set to NULL, so remove ugly hacks handling context destruction. * app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-07 00:14:34 +08:00
{
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-25 05:27:11 +08:00
g_signal_handlers_block_by_func (G_OBJECT (view->component_list),
gimp_channel_list_view_component_toggle,
view);
added GimpDropMode... ...removed from here. 2001-05-06 Michael Natterer <mitch@gimp.org> * app/appenums.h: added GimpDropMode... * app/gimpdnd.h: ...removed from here. * app/gimpimage.[ch]: - New signal "mode_changed". - removed "const GimpImage*" from gimp_image_colormap_changed() because a signal emission is never "const" for the object which emits the signal. - Fixed gimp_image_[set|get]_component_[active|visible](): ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode. * app/gimpimage-convert.c * app/undo.c: call gimp_image_mode_changed(). * app/gimpviewable.c: added an implementation of "invalidate_preview" which frees the preview temp_buf which may be attached to the viewable. Subclasses need to chain up now. * app/gimpdrawable.c * app/gimpimage.c: chain up in invalidate_preview(). * app/widgets/gimpchannellistview.c: connect to the image's "mode_changed" signal and rebuild the channel list in the callback. * app/widgets/gimpcontainerview.h: indentation. * app/widgets/gimpdockbook.c: set the dockable's context to NULL in gimp_dockbook_remove() * app/widgets/gimpimagedock.c: forgot to actually set the dock's image in gimp_image_dock_new(). * app/gui/dialogs-constructors.c: added a get_name_func() for tool views which returns the tool's "blurb". It's safe to assume now that a dockable's context will exist as long as the dockable exists unless it's explicitely set to NULL, so remove ugly hacks handling context destruction. * app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-07 00:14:34 +08:00
gtk_list_clear_items (GTK_LIST (view->component_list), 0, -1);
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-25 05:27:11 +08:00
g_signal_handlers_unblock_by_func (G_OBJECT (view->component_list),
gimp_channel_list_view_component_toggle,
view);
}
static void
gimp_channel_list_view_mode_changed (GimpImage *gimage,
GimpChannelListView *view)
{
gimp_channel_list_view_clear_components (view);
added GimpDropMode... ...removed from here. 2001-05-06 Michael Natterer <mitch@gimp.org> * app/appenums.h: added GimpDropMode... * app/gimpdnd.h: ...removed from here. * app/gimpimage.[ch]: - New signal "mode_changed". - removed "const GimpImage*" from gimp_image_colormap_changed() because a signal emission is never "const" for the object which emits the signal. - Fixed gimp_image_[set|get]_component_[active|visible](): ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode. * app/gimpimage-convert.c * app/undo.c: call gimp_image_mode_changed(). * app/gimpviewable.c: added an implementation of "invalidate_preview" which frees the preview temp_buf which may be attached to the viewable. Subclasses need to chain up now. * app/gimpdrawable.c * app/gimpimage.c: chain up in invalidate_preview(). * app/widgets/gimpchannellistview.c: connect to the image's "mode_changed" signal and rebuild the channel list in the callback. * app/widgets/gimpcontainerview.h: indentation. * app/widgets/gimpdockbook.c: set the dockable's context to NULL in gimp_dockbook_remove() * app/widgets/gimpimagedock.c: forgot to actually set the dock's image in gimp_image_dock_new(). * app/gui/dialogs-constructors.c: added a get_name_func() for tool views which returns the tool's "blurb". It's safe to assume now that a dockable's context will exist as long as the dockable exists unless it's explicitely set to NULL, so remove ugly hacks handling context destruction. * app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-07 00:14:34 +08:00
gimp_channel_list_view_create_components (view);
}
static void
gimp_channel_list_view_alpha_changed (GimpImage *gimage,
GimpChannelListView *view)
{
g_print ("gimp_channel_list_view_alpha_changed()\n");
}
static void
gimp_channel_list_view_component_toggle (GtkList *list,
GtkWidget *child,
GimpChannelListView *view)
{
GimpComponentListItem *component_item;
component_item = GIMP_COMPONENT_LIST_ITEM (child);
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-25 05:27:11 +08:00
g_signal_handlers_block_by_func (G_OBJECT (view->component_list),
gimp_channel_list_view_component_toggle,
view);
gimp_image_set_component_active (GIMP_DRAWABLE_LIST_VIEW (view)->gimage,
component_item->channel,
child->state == GTK_STATE_SELECTED);
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-25 05:27:11 +08:00
g_signal_handlers_unblock_by_func (G_OBJECT (view->component_list),
gimp_channel_list_view_component_toggle,
view);
}