2001-02-27 22:14:13 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2002-02-26 01:58:50 +08:00
|
|
|
* gimpitemlistview.c
|
2001-10-18 00:11:28 +08:00
|
|
|
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
|
2001-04-22 08:38:56 +08:00
|
|
|
*
|
2001-02-27 22:14:13 +08:00
|
|
|
* 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"
|
|
|
|
|
2002-01-30 22:54:27 +08:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#warning GTK_DISABLE_DEPRECATED
|
|
|
|
#endif
|
|
|
|
#undef GTK_DISABLE_DEPRECATED
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "libgimpmath/gimpmath.h"
|
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
2001-05-08 11:48:54 +08:00
|
|
|
#include "widgets-types.h"
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2001-05-09 10:32:03 +08:00
|
|
|
#include "core/gimpchannel.h"
|
|
|
|
#include "core/gimpcontainer.h"
|
|
|
|
#include "core/gimpimage.h"
|
|
|
|
#include "core/gimplayer.h"
|
|
|
|
#include "core/gimpmarshal.h"
|
|
|
|
|
2002-02-26 13:42:14 +08:00
|
|
|
#include "vectors/gimpvectors.h"
|
|
|
|
|
2001-05-03 20:26:05 +08:00
|
|
|
#include "gimpchannellistview.h"
|
2001-05-08 11:48:54 +08:00
|
|
|
#include "gimpdnd.h"
|
2002-02-26 01:58:50 +08:00
|
|
|
#include "gimpitemlistview.h"
|
2001-11-30 22:41:56 +08:00
|
|
|
#include "gimpitemfactory.h"
|
2001-05-03 20:26:05 +08:00
|
|
|
#include "gimplayerlistview.h"
|
|
|
|
#include "gimplistitem.h"
|
2001-05-08 09:32:25 +08:00
|
|
|
#include "gimppreview.h"
|
2002-02-26 13:42:14 +08:00
|
|
|
#include "gimpvectorslistview.h"
|
2001-05-03 20:26:05 +08:00
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
|
|
|
|
2001-05-03 20:26:05 +08:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
SET_IMAGE,
|
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
static void gimp_item_list_view_class_init (GimpItemListViewClass *klass);
|
|
|
|
static void gimp_item_list_view_init (GimpItemListView *view);
|
|
|
|
static void gimp_item_list_view_destroy (GtkObject *object);
|
|
|
|
|
|
|
|
static void gimp_item_list_view_real_set_image (GimpItemListView *view,
|
|
|
|
GimpImage *gimage);
|
|
|
|
|
|
|
|
static void gimp_item_list_view_select_item (GimpContainerView *view,
|
|
|
|
GimpViewable *item,
|
|
|
|
gpointer insert_data);
|
|
|
|
static void gimp_item_list_view_activate_item (GimpContainerView *view,
|
|
|
|
GimpViewable *item,
|
|
|
|
gpointer insert_data);
|
|
|
|
static void gimp_item_list_view_context_item (GimpContainerView *view,
|
|
|
|
GimpViewable *item,
|
|
|
|
gpointer insert_data);
|
|
|
|
|
|
|
|
static void gimp_item_list_view_new_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view);
|
|
|
|
static void gimp_item_list_view_new_dropped (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
static void gimp_item_list_view_raise_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view);
|
|
|
|
static void gimp_item_list_view_raise_extended_clicked
|
|
|
|
(GtkWidget *widget,
|
|
|
|
guint state,
|
|
|
|
GimpItemListView *view);
|
|
|
|
static void gimp_item_list_view_lower_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view);
|
|
|
|
static void gimp_item_list_view_lower_extended_clicked
|
|
|
|
(GtkWidget *widget,
|
|
|
|
guint state,
|
|
|
|
GimpItemListView *view);
|
|
|
|
|
|
|
|
static void gimp_item_list_view_duplicate_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view);
|
|
|
|
static void gimp_item_list_view_edit_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view);
|
|
|
|
static void gimp_item_list_view_delete_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view);
|
|
|
|
|
|
|
|
static void gimp_item_list_view_item_changed (GimpImage *gimage,
|
|
|
|
GimpItemListView *view);
|
|
|
|
static void gimp_item_list_view_size_changed (GimpImage *gimage,
|
|
|
|
GimpItemListView *view);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
|
|
|
|
2001-05-03 20:26:05 +08:00
|
|
|
static guint view_signals[LAST_SIGNAL] = { 0 };
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
static GimpContainerListViewClass *parent_class = NULL;
|
|
|
|
|
|
|
|
|
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
|
|
|
GType
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_get_type (void)
|
2001-02-27 22:14:13 +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
|
|
|
static GType view_type = 0;
|
2001-02-27 22:14:13 +08:00
|
|
|
|
|
|
|
if (! view_type)
|
|
|
|
{
|
2001-10-17 19:33:43 +08:00
|
|
|
static const GTypeInfo view_info =
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
sizeof (GimpItemListViewClass),
|
2001-10-17 19:33:43 +08:00
|
|
|
NULL, /* base_init */
|
|
|
|
NULL, /* base_finalize */
|
2002-02-26 01:58:50 +08:00
|
|
|
(GClassInitFunc) gimp_item_list_view_class_init,
|
2001-10-17 19:33:43 +08:00
|
|
|
NULL, /* class_finalize */
|
|
|
|
NULL, /* class_data */
|
2002-02-26 01:58:50 +08:00
|
|
|
sizeof (GimpItemListView),
|
2001-10-17 19:33:43 +08:00
|
|
|
0, /* n_preallocs */
|
2002-02-26 01:58:50 +08:00
|
|
|
(GInstanceInitFunc) gimp_item_list_view_init,
|
2001-02-27 22:14:13 +08:00
|
|
|
};
|
|
|
|
|
2001-10-17 19:33:43 +08:00
|
|
|
view_type = g_type_register_static (GIMP_TYPE_CONTAINER_LIST_VIEW,
|
2002-02-26 01:58:50 +08:00
|
|
|
"GimpItemListView",
|
2001-10-17 19:33:43 +08:00
|
|
|
&view_info, 0);
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return view_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_class_init (GimpItemListViewClass *klass)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
|
|
|
GtkObjectClass *object_class;
|
|
|
|
GimpContainerViewClass *container_view_class;
|
|
|
|
|
2001-10-17 19:33:43 +08:00
|
|
|
object_class = GTK_OBJECT_CLASS (klass);
|
|
|
|
container_view_class = GIMP_CONTAINER_VIEW_CLASS (klass);
|
2001-02-27 22:14:13 +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
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2001-05-03 20:26:05 +08:00
|
|
|
view_signals[SET_IMAGE] =
|
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_new ("set_image",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
2002-02-26 01:58:50 +08:00
|
|
|
G_STRUCT_OFFSET (GimpItemListViewClass, set_image),
|
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
|
|
|
NULL, NULL,
|
2001-11-23 07:46:13 +08:00
|
|
|
gimp_marshal_VOID__OBJECT,
|
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_TYPE_NONE, 1,
|
|
|
|
GIMP_TYPE_OBJECT);
|
2001-05-03 20:26:05 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
object_class->destroy = gimp_item_list_view_destroy;
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
container_view_class->select_item = gimp_item_list_view_select_item;
|
|
|
|
container_view_class->activate_item = gimp_item_list_view_activate_item;
|
|
|
|
container_view_class->context_item = gimp_item_list_view_context_item;
|
2001-05-03 20:26:05 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
klass->set_image = gimp_item_list_view_real_set_image;
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_init (GimpItemListView *view)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-03-08 08:27:45 +08:00
|
|
|
GimpEditor *editor;
|
2001-08-05 04:38:54 +08:00
|
|
|
|
2002-03-08 08:27:45 +08:00
|
|
|
editor = GIMP_EDITOR (view);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-03-08 08:27:45 +08:00
|
|
|
view->gimage = NULL;
|
|
|
|
view->item_type = G_TYPE_NONE;
|
|
|
|
view->signal_name = NULL;
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2001-08-05 04:38:54 +08:00
|
|
|
view->new_button =
|
2002-03-08 08:27:45 +08:00
|
|
|
gimp_editor_add_button (editor,
|
|
|
|
GTK_STOCK_NEW,
|
|
|
|
_("New"), NULL,
|
|
|
|
G_CALLBACK (gimp_item_list_view_new_clicked),
|
|
|
|
NULL,
|
|
|
|
view);
|
2001-08-05 04:38:54 +08:00
|
|
|
|
|
|
|
view->raise_button =
|
2002-03-08 08:27:45 +08:00
|
|
|
gimp_editor_add_button (editor,
|
|
|
|
GTK_STOCK_GO_UP,
|
|
|
|
_("Raise\n"
|
|
|
|
"<Shift> To Top"), NULL,
|
|
|
|
G_CALLBACK (gimp_item_list_view_raise_clicked),
|
|
|
|
G_CALLBACK (gimp_item_list_view_raise_extended_clicked),
|
|
|
|
view);
|
2001-08-05 04:38:54 +08:00
|
|
|
|
|
|
|
view->lower_button =
|
2002-03-08 08:27:45 +08:00
|
|
|
gimp_editor_add_button (editor,
|
|
|
|
GTK_STOCK_GO_DOWN,
|
|
|
|
_("Lower\n"
|
|
|
|
"<Shift> To Bottom"), NULL,
|
|
|
|
G_CALLBACK (gimp_item_list_view_lower_clicked),
|
|
|
|
G_CALLBACK (gimp_item_list_view_lower_extended_clicked),
|
|
|
|
view);
|
2001-08-05 04:38:54 +08:00
|
|
|
|
|
|
|
view->duplicate_button =
|
2002-03-08 08:27:45 +08:00
|
|
|
gimp_editor_add_button (editor,
|
|
|
|
GIMP_STOCK_DUPLICATE,
|
|
|
|
_("Duplicate"), NULL,
|
|
|
|
G_CALLBACK (gimp_item_list_view_duplicate_clicked),
|
|
|
|
NULL,
|
|
|
|
view);
|
2001-08-05 04:38:54 +08:00
|
|
|
|
|
|
|
view->edit_button =
|
2002-03-08 08:27:45 +08:00
|
|
|
gimp_editor_add_button (editor,
|
|
|
|
GIMP_STOCK_EDIT,
|
|
|
|
_("Edit"), NULL,
|
|
|
|
G_CALLBACK (gimp_item_list_view_edit_clicked),
|
|
|
|
NULL,
|
|
|
|
view);
|
2001-08-05 04:38:54 +08:00
|
|
|
|
|
|
|
view->delete_button =
|
2002-03-08 08:27:45 +08:00
|
|
|
gimp_editor_add_button (editor,
|
|
|
|
GTK_STOCK_DELETE,
|
|
|
|
_("Delete"), NULL,
|
|
|
|
G_CALLBACK (gimp_item_list_view_delete_clicked),
|
|
|
|
NULL,
|
|
|
|
view);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2001-03-06 21:28:39 +08:00
|
|
|
gtk_widget_set_sensitive (view->new_button, FALSE);
|
|
|
|
gtk_widget_set_sensitive (view->raise_button, FALSE);
|
|
|
|
gtk_widget_set_sensitive (view->lower_button, FALSE);
|
2001-02-27 22:14:13 +08:00
|
|
|
gtk_widget_set_sensitive (view->duplicate_button, FALSE);
|
2001-03-06 21:28:39 +08:00
|
|
|
gtk_widget_set_sensitive (view->edit_button, FALSE);
|
|
|
|
gtk_widget_set_sensitive (view->delete_button, FALSE);
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_destroy (GtkObject *object)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpItemListView *view;
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
view = GIMP_ITEM_LIST_VIEW (object);
|
2001-02-27 22:14:13 +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
|
|
|
if (view->gimage)
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_set_image (view, NULL);
|
2001-05-01 22:58:13 +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
|
|
|
if (view->signal_name)
|
|
|
|
{
|
|
|
|
g_free (view->signal_name);
|
|
|
|
view->signal_name = NULL;
|
|
|
|
}
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2001-11-30 22:41:56 +08:00
|
|
|
if (view->item_factory)
|
|
|
|
{
|
2002-01-26 02:34:33 +08:00
|
|
|
g_object_unref (G_OBJECT (view->item_factory));
|
2001-11-30 22:41:56 +08:00
|
|
|
view->item_factory = NULL;
|
|
|
|
}
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
|
|
|
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_new (gint preview_size,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GType item_type,
|
|
|
|
const gchar *signal_name,
|
|
|
|
GimpGetContainerFunc get_container_func,
|
|
|
|
GimpGetItemFunc get_item_func,
|
|
|
|
GimpSetItemFunc set_item_func,
|
|
|
|
GimpReorderItemFunc reorder_item_func,
|
|
|
|
GimpAddItemFunc add_item_func,
|
|
|
|
GimpRemoveItemFunc remove_item_func,
|
|
|
|
GimpCopyItemFunc copy_item_func,
|
|
|
|
GimpConvertItemFunc convert_item_func,
|
|
|
|
GimpNewItemFunc new_item_func,
|
|
|
|
GimpEditItemFunc edit_item_func,
|
2002-02-26 22:40:30 +08:00
|
|
|
GimpActivateItemFunc activate_item_func,
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpItemFactory *item_factory)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpItemListView *list_view;
|
|
|
|
GimpContainerView *view;
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2001-07-07 20:19:21 +08:00
|
|
|
g_return_val_if_fail (preview_size > 0 && preview_size <= 64, NULL);
|
2001-02-27 22:14:13 +08:00
|
|
|
g_return_val_if_fail (! gimage || GIMP_IS_IMAGE (gimage), NULL);
|
|
|
|
g_return_val_if_fail (signal_name != NULL, NULL);
|
|
|
|
g_return_val_if_fail (get_container_func != NULL, NULL);
|
2002-02-26 01:58:50 +08:00
|
|
|
g_return_val_if_fail (get_item_func != NULL, NULL);
|
|
|
|
g_return_val_if_fail (get_item_func != NULL, NULL);
|
|
|
|
g_return_val_if_fail (reorder_item_func != NULL, NULL);
|
|
|
|
g_return_val_if_fail (add_item_func != NULL, NULL);
|
|
|
|
g_return_val_if_fail (remove_item_func != NULL, NULL);
|
|
|
|
g_return_val_if_fail (copy_item_func != NULL, NULL);
|
|
|
|
/* convert_item_func may be NULL */
|
|
|
|
g_return_val_if_fail (new_item_func != NULL, NULL);
|
|
|
|
g_return_val_if_fail (edit_item_func != NULL, NULL);
|
2002-02-26 22:40:30 +08:00
|
|
|
g_return_val_if_fail (activate_item_func != NULL, NULL);
|
2002-01-26 02:34:33 +08:00
|
|
|
g_return_val_if_fail (GIMP_IS_ITEM_FACTORY (item_factory), NULL);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
if (item_type == GIMP_TYPE_LAYER)
|
2001-03-12 01:24:47 +08:00
|
|
|
{
|
2001-08-10 22:41:39 +08:00
|
|
|
list_view = g_object_new (GIMP_TYPE_LAYER_LIST_VIEW, NULL);
|
2001-03-12 01:24:47 +08:00
|
|
|
}
|
2002-02-26 01:58:50 +08:00
|
|
|
else if (item_type == GIMP_TYPE_CHANNEL)
|
2001-05-03 20:26:05 +08:00
|
|
|
{
|
2001-08-10 22:41:39 +08:00
|
|
|
list_view = g_object_new (GIMP_TYPE_CHANNEL_LIST_VIEW, NULL);
|
2001-05-03 20:26:05 +08:00
|
|
|
}
|
2002-02-26 13:42:14 +08:00
|
|
|
else if (item_type == GIMP_TYPE_DRAWABLE)
|
|
|
|
{
|
|
|
|
list_view = g_object_new (GIMP_TYPE_DRAWABLE_LIST_VIEW, NULL);
|
|
|
|
}
|
|
|
|
else if (item_type == GIMP_TYPE_VECTORS)
|
|
|
|
{
|
|
|
|
list_view = g_object_new (GIMP_TYPE_VECTORS_LIST_VIEW, NULL);
|
|
|
|
}
|
2001-03-12 01:24:47 +08:00
|
|
|
else
|
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
list_view = g_object_new (GIMP_TYPE_ITEM_LIST_VIEW, NULL);
|
2001-03-12 01:24:47 +08:00
|
|
|
}
|
2001-02-27 22:14:13 +08:00
|
|
|
|
|
|
|
view = GIMP_CONTAINER_VIEW (list_view);
|
|
|
|
|
2001-07-07 20:19:21 +08:00
|
|
|
view->preview_size = preview_size;
|
2001-10-23 01:27:46 +08:00
|
|
|
view->reorderable = TRUE;
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
list_view->item_type = item_type;
|
|
|
|
list_view->signal_name = g_strdup (signal_name);
|
|
|
|
list_view->get_container_func = get_container_func;
|
|
|
|
list_view->get_item_func = get_item_func;
|
|
|
|
list_view->set_item_func = set_item_func;
|
|
|
|
list_view->reorder_item_func = reorder_item_func;
|
|
|
|
list_view->add_item_func = add_item_func;
|
|
|
|
list_view->remove_item_func = remove_item_func;
|
|
|
|
list_view->copy_item_func = copy_item_func;
|
|
|
|
list_view->convert_item_func = convert_item_func;
|
|
|
|
list_view->new_item_func = new_item_func;
|
|
|
|
list_view->edit_item_func = edit_item_func;
|
2002-02-26 22:40:30 +08:00
|
|
|
list_view->activate_item_func = activate_item_func;
|
2001-11-30 22:41:56 +08:00
|
|
|
|
2002-01-26 02:34:33 +08:00
|
|
|
list_view->item_factory = item_factory;
|
|
|
|
g_object_ref (G_OBJECT (list_view->item_factory));
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2001-08-05 04:38:54 +08:00
|
|
|
/* connect "drop to new" manually as it makes a difference whether
|
|
|
|
* it was clicked or dropped
|
|
|
|
*/
|
2002-09-02 22:39:08 +08:00
|
|
|
gimp_dnd_viewable_dest_add (list_view->new_button,
|
2002-02-26 01:58:50 +08:00
|
|
|
item_type,
|
|
|
|
gimp_item_list_view_new_dropped,
|
2001-08-05 04:38:54 +08:00
|
|
|
view);
|
|
|
|
|
|
|
|
gimp_container_view_enable_dnd (view,
|
|
|
|
GTK_BUTTON (list_view->duplicate_button),
|
2002-02-26 01:58:50 +08:00
|
|
|
item_type);
|
2001-08-05 04:38:54 +08:00
|
|
|
gimp_container_view_enable_dnd (view,
|
|
|
|
GTK_BUTTON (list_view->edit_button),
|
2002-02-26 01:58:50 +08:00
|
|
|
item_type);
|
2001-08-05 04:38:54 +08:00
|
|
|
gimp_container_view_enable_dnd (view,
|
|
|
|
GTK_BUTTON (list_view->delete_button),
|
2002-02-26 01:58:50 +08:00
|
|
|
item_type);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_set_image (list_view, gimage);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
|
|
|
return GTK_WIDGET (list_view);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_set_image (GimpItemListView *view,
|
|
|
|
GimpImage *gimage)
|
2001-05-03 20:26:05 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
g_return_if_fail (GIMP_IS_ITEM_LIST_VIEW (view));
|
2001-05-03 20:26:05 +08:00
|
|
|
g_return_if_fail (! gimage || GIMP_IS_IMAGE (gimage));
|
|
|
|
|
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_emit (G_OBJECT (view), view_signals[SET_IMAGE], 0,
|
|
|
|
gimage);
|
2001-05-03 20:26:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_real_set_image (GimpItemListView *view,
|
|
|
|
GimpImage *gimage)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
g_return_if_fail (GIMP_IS_ITEM_LIST_VIEW (view));
|
2001-02-27 22:14:13 +08:00
|
|
|
g_return_if_fail (! gimage || GIMP_IS_IMAGE (gimage));
|
|
|
|
|
|
|
|
if (view->gimage == gimage)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (view->gimage)
|
|
|
|
{
|
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),
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_item_changed,
|
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
|
|
|
view);
|
|
|
|
g_signal_handlers_disconnect_by_func (G_OBJECT (view->gimage),
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_size_changed,
|
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
|
|
|
view);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
|
|
|
gimp_container_view_set_container (GIMP_CONTAINER_VIEW (view), NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
view->gimage = gimage;
|
|
|
|
|
|
|
|
if (view->gimage)
|
|
|
|
{
|
|
|
|
GimpContainer *container;
|
|
|
|
|
|
|
|
container = view->get_container_func (view->gimage);
|
|
|
|
|
|
|
|
gimp_container_view_set_container (GIMP_CONTAINER_VIEW (view), container);
|
|
|
|
|
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), view->signal_name,
|
2002-02-26 01:58:50 +08:00
|
|
|
G_CALLBACK (gimp_item_list_view_item_changed),
|
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
|
|
|
view);
|
|
|
|
g_signal_connect (G_OBJECT (view->gimage), "size_changed",
|
2002-02-26 01:58:50 +08:00
|
|
|
G_CALLBACK (gimp_item_list_view_size_changed),
|
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
|
|
|
view);
|
2001-03-12 01:24:47 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_item_changed (view->gimage, view);
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
2001-03-06 21:28:39 +08:00
|
|
|
|
|
|
|
gtk_widget_set_sensitive (view->new_button, (view->gimage != NULL));
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
2001-03-12 01:24:47 +08:00
|
|
|
|
|
|
|
/* GimpContainerView methods */
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_select_item (GimpContainerView *view,
|
|
|
|
GimpViewable *item,
|
|
|
|
gpointer insert_data)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpItemListView *list_view;
|
|
|
|
gboolean raise_sensitive = FALSE;
|
|
|
|
gboolean lower_sensitive = FALSE;
|
|
|
|
gboolean duplicate_sensitive = FALSE;
|
|
|
|
gboolean edit_sensitive = FALSE;
|
|
|
|
gboolean delete_sensitive = FALSE;
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
list_view = GIMP_ITEM_LIST_VIEW (view);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
if (GIMP_CONTAINER_VIEW_CLASS (parent_class)->select_item)
|
|
|
|
GIMP_CONTAINER_VIEW_CLASS (parent_class)->select_item (view,
|
|
|
|
item,
|
|
|
|
insert_data);
|
|
|
|
|
2001-03-06 21:28:39 +08:00
|
|
|
if (item)
|
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpViewable *active_viewable;
|
|
|
|
gint index;
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
active_viewable = list_view->get_item_func (list_view->gimage);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
if (active_viewable != item)
|
2001-03-06 21:28:39 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
list_view->set_item_func (list_view->gimage, item);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-05-09 01:48:24 +08:00
|
|
|
gimp_image_flush (list_view->gimage);
|
2001-03-06 21:28:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
index = gimp_container_get_child_index (view->container,
|
|
|
|
GIMP_OBJECT (item));
|
|
|
|
|
|
|
|
if (view->container->num_children > 1)
|
|
|
|
{
|
|
|
|
if (index > 0)
|
|
|
|
raise_sensitive = TRUE;
|
|
|
|
|
|
|
|
if (index < (view->container->num_children - 1))
|
|
|
|
lower_sensitive = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
duplicate_sensitive = TRUE;
|
|
|
|
edit_sensitive = TRUE;
|
|
|
|
delete_sensitive = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive (list_view->raise_button, raise_sensitive);
|
|
|
|
gtk_widget_set_sensitive (list_view->lower_button, lower_sensitive);
|
|
|
|
gtk_widget_set_sensitive (list_view->duplicate_button, duplicate_sensitive);
|
|
|
|
gtk_widget_set_sensitive (list_view->edit_button, edit_sensitive);
|
|
|
|
gtk_widget_set_sensitive (list_view->delete_button, delete_sensitive);
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_activate_item (GimpContainerView *view,
|
|
|
|
GimpViewable *item,
|
|
|
|
gpointer insert_data)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 22:40:30 +08:00
|
|
|
GimpItemListView *item_view;
|
|
|
|
|
|
|
|
item_view = GIMP_ITEM_LIST_VIEW (view);
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
if (GIMP_CONTAINER_VIEW_CLASS (parent_class)->activate_item)
|
|
|
|
GIMP_CONTAINER_VIEW_CLASS (parent_class)->activate_item (view,
|
|
|
|
item,
|
|
|
|
insert_data);
|
|
|
|
|
2002-02-26 22:40:30 +08:00
|
|
|
item_view->activate_item_func (item);
|
2001-03-06 21:28:39 +08:00
|
|
|
}
|
|
|
|
|
2001-04-29 23:23:01 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_context_item (GimpContainerView *view,
|
|
|
|
GimpViewable *item,
|
|
|
|
gpointer insert_data)
|
2001-04-29 23:23:01 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpItemListView *item_view;
|
2001-11-30 22:41:56 +08:00
|
|
|
|
2001-04-29 23:23:01 +08:00
|
|
|
if (GIMP_CONTAINER_VIEW_CLASS (parent_class)->context_item)
|
|
|
|
GIMP_CONTAINER_VIEW_CLASS (parent_class)->context_item (view,
|
|
|
|
item,
|
|
|
|
insert_data);
|
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
item_view = GIMP_ITEM_LIST_VIEW (view);
|
2001-11-30 22:41:56 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
if (item_view->item_factory)
|
2001-11-30 22:41:56 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpImage *gimage;
|
|
|
|
|
|
|
|
gimage = gimp_item_get_image (GIMP_ITEM (item));
|
|
|
|
|
|
|
|
gimp_item_factory_popup_with_data (item_view->item_factory,
|
|
|
|
gimage,
|
2001-11-30 22:41:56 +08:00
|
|
|
NULL);
|
|
|
|
}
|
2001-04-29 23:23:01 +08:00
|
|
|
}
|
|
|
|
|
2001-03-12 01:24:47 +08:00
|
|
|
|
|
|
|
/* "New" functions */
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_new_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-09-02 22:39:08 +08:00
|
|
|
view->new_item_func (view->gimage, NULL, TRUE);
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_new_dropped (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpItemListView *view;
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
view = (GimpItemListView *) data;
|
2001-02-27 22:14:13 +08:00
|
|
|
|
|
|
|
if (viewable && gimp_container_have (GIMP_CONTAINER_VIEW (view)->container,
|
|
|
|
GIMP_OBJECT (viewable)))
|
|
|
|
{
|
2002-09-02 22:39:08 +08:00
|
|
|
view->new_item_func (view->gimage, viewable, FALSE);
|
|
|
|
|
|
|
|
gimp_image_flush (view->gimage);
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-03-12 01:24:47 +08:00
|
|
|
|
|
|
|
/* "Duplicate" functions */
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_duplicate_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpViewable *viewable;
|
|
|
|
GimpViewable *new_viewable;
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
viewable = view->get_item_func (view->gimage);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
new_viewable = view->copy_item_func (viewable,
|
|
|
|
G_TYPE_FROM_INSTANCE (viewable),
|
|
|
|
TRUE);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
if (GIMP_IS_VIEWABLE (new_viewable))
|
|
|
|
{
|
|
|
|
view->add_item_func (view->gimage, new_viewable, -1);
|
|
|
|
|
2002-05-09 01:48:24 +08:00
|
|
|
gimp_image_flush (view->gimage);
|
2002-02-26 01:58:50 +08:00
|
|
|
}
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
2001-03-12 01:24:47 +08:00
|
|
|
|
|
|
|
/* "Raise/Lower" functions */
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_raise_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2001-03-06 21:28:39 +08:00
|
|
|
GimpContainer *container;
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpViewable *viewable;
|
2001-03-06 21:28:39 +08:00
|
|
|
gint index;
|
|
|
|
|
|
|
|
container = GIMP_CONTAINER_VIEW (view)->container;
|
2002-02-26 01:58:50 +08:00
|
|
|
viewable = view->get_item_func (view->gimage);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
index = gimp_container_get_child_index (container, GIMP_OBJECT (viewable));
|
2001-03-06 21:28:39 +08:00
|
|
|
|
|
|
|
if (index > 0)
|
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
view->reorder_item_func (view->gimage, viewable, index - 1, TRUE);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-05-09 01:48:24 +08:00
|
|
|
gimp_image_flush (view->gimage);
|
2001-03-06 21:28:39 +08:00
|
|
|
}
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
2001-05-07 04:31:46 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_raise_extended_clicked (GtkWidget *widget,
|
|
|
|
guint state,
|
|
|
|
GimpItemListView *view)
|
2001-05-07 04:31:46 +08:00
|
|
|
{
|
|
|
|
GimpContainer *container;
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpViewable *viewable;
|
2001-05-07 04:31:46 +08:00
|
|
|
gint index;
|
|
|
|
|
|
|
|
container = GIMP_CONTAINER_VIEW (view)->container;
|
2002-02-26 01:58:50 +08:00
|
|
|
viewable = view->get_item_func (view->gimage);
|
2001-05-07 04:31:46 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
index = gimp_container_get_child_index (container, GIMP_OBJECT (viewable));
|
2001-05-07 04:31:46 +08:00
|
|
|
|
|
|
|
if ((state & GDK_SHIFT_MASK) && (index > 0))
|
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
view->reorder_item_func (view->gimage, viewable, 0, TRUE);
|
2001-05-07 04:31:46 +08:00
|
|
|
|
2002-05-09 01:48:24 +08:00
|
|
|
gimp_image_flush (view->gimage);
|
2001-05-07 04:31:46 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_lower_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2001-03-06 21:28:39 +08:00
|
|
|
GimpContainer *container;
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpViewable *viewable;
|
2001-03-06 21:28:39 +08:00
|
|
|
gint index;
|
|
|
|
|
|
|
|
container = GIMP_CONTAINER_VIEW (view)->container;
|
2002-02-26 01:58:50 +08:00
|
|
|
viewable = view->get_item_func (view->gimage);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
index = gimp_container_get_child_index (container, GIMP_OBJECT (viewable));
|
2001-03-06 21:28:39 +08:00
|
|
|
|
|
|
|
if (index < container->num_children - 1)
|
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
view->reorder_item_func (view->gimage, viewable, index + 1, TRUE);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-05-09 01:48:24 +08:00
|
|
|
gimp_image_flush (view->gimage);
|
2001-03-06 21:28:39 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-05-07 04:31:46 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_lower_extended_clicked (GtkWidget *widget,
|
|
|
|
guint state,
|
|
|
|
GimpItemListView *view)
|
2001-05-07 04:31:46 +08:00
|
|
|
{
|
|
|
|
GimpContainer *container;
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpViewable *viewable;
|
2001-05-07 04:31:46 +08:00
|
|
|
gint index;
|
|
|
|
|
|
|
|
container = GIMP_CONTAINER_VIEW (view)->container;
|
2002-02-26 01:58:50 +08:00
|
|
|
viewable = view->get_item_func (view->gimage);
|
2001-05-07 04:31:46 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
index = gimp_container_get_child_index (container, GIMP_OBJECT (viewable));
|
2001-05-07 04:31:46 +08:00
|
|
|
|
|
|
|
if ((state & GDK_SHIFT_MASK) && (index < container->num_children - 1))
|
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
view->reorder_item_func (view->gimage, viewable,
|
|
|
|
container->num_children - 1, TRUE);
|
2001-05-07 04:31:46 +08:00
|
|
|
|
2002-05-09 01:48:24 +08:00
|
|
|
gimp_image_flush (view->gimage);
|
2001-05-07 04:31:46 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-03-12 01:24:47 +08:00
|
|
|
|
|
|
|
/* "Edit" functions */
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_edit_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpViewable *viewable;
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
viewable = view->get_item_func (view->gimage);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
view->edit_item_func (viewable);
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
2001-03-12 01:24:47 +08:00
|
|
|
|
|
|
|
/* "Delete" functions */
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_delete_clicked (GtkWidget *widget,
|
|
|
|
GimpItemListView *view)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpViewable *viewable;
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
viewable = view->get_item_func (view->gimage);
|
2001-03-06 21:28:39 +08:00
|
|
|
|
2002-03-11 20:58:59 +08:00
|
|
|
view->remove_item_func (view->gimage, viewable);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-05-09 01:48:24 +08:00
|
|
|
gimp_image_flush (view->gimage);
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
|
|
|
|
2001-03-12 01:24:47 +08:00
|
|
|
|
|
|
|
/* GimpImage callbacks */
|
|
|
|
|
2001-02-27 22:14:13 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_item_changed (GimpImage *gimage,
|
|
|
|
GimpItemListView *view)
|
2001-02-27 22:14:13 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpViewable *viewable;
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
viewable = view->get_item_func (gimage);
|
2001-02-27 22:14:13 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_container_view_select_item (GIMP_CONTAINER_VIEW (view), viewable);
|
2001-02-27 22:14:13 +08:00
|
|
|
}
|
2001-05-07 01:56:10 +08:00
|
|
|
|
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_size_changed (GimpImage *gimage,
|
|
|
|
GimpItemListView *view)
|
2001-05-07 01:56:10 +08:00
|
|
|
{
|
|
|
|
gint preview_size;
|
|
|
|
|
|
|
|
preview_size = GIMP_CONTAINER_VIEW (view)->preview_size;
|
|
|
|
|
|
|
|
gimp_container_view_set_preview_size (GIMP_CONTAINER_VIEW (view),
|
|
|
|
preview_size);
|
|
|
|
}
|