Commit f44500aa authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

pass the GimpItemListView as "data" to the item_factory callbacks, not

2003-01-12  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpitemlistview.c: pass the GimpItemListView as
	"data" to the item_factory callbacks, not just a "Gimp" pointer.

	* app/display/gimpdisplayshell.c: use
	gtk_window_add_accel_group(), not gimp_window_add_accel_group()
	because we now attach the menubar's accel group, which has the
	GimpDisplay as callback data.

	* app/display/gimpdisplayshell-callbacks.c: pass the GimpDisplay
	as "popup_data" to *_item_factory_popup_with_data().

	* app/gui/channels-commands.c
	* app/gui/drawable-commands.c
	* app/gui/layers-commands.c
	* app/gui/vectors-commands.c: changed accordingly.

	* app/widgets/gimpwidgets-utils.[ch]: removed
	gimp_window_[add|remove]_accel_group() and
	gimp_widget_get_callback_context() because they were evil hacks
	which are no longer needed now that all item_factories have proper
	callback data (no just Gimp pointers).
parent 6098d871
2003-01-12 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpitemlistview.c: pass the GimpItemListView as
"data" to the item_factory callbacks, not just a "Gimp" pointer.
* app/display/gimpdisplayshell.c: use
gtk_window_add_accel_group(), not gimp_window_add_accel_group()
because we now attach the menubar's accel group, which has the
GimpDisplay as callback data.
* app/display/gimpdisplayshell-callbacks.c: pass the GimpDisplay
as "popup_data" to *_item_factory_popup_with_data().
* app/gui/channels-commands.c
* app/gui/drawable-commands.c
* app/gui/layers-commands.c
* app/gui/vectors-commands.c: changed accordingly.
* app/widgets/gimpwidgets-utils.[ch]: removed
gimp_window_[add|remove]_accel_group() and
gimp_widget_get_callback_context() because they were evil hacks
which are no longer needed now that all item_factories have proper
callback data (no just Gimp pointers).
2003-01-12 Dave Neary <bolsh@gimp.org> 2003-01-12 Dave Neary <bolsh@gimp.org>
* plug-ins/common/plugin-def.pl * plug-ins/common/plugin-def.pl
...@@ -94,7 +118,6 @@ ...@@ -94,7 +118,6 @@
* app/gui/images-commands.c * app/gui/images-commands.c
* app/gui/palette-editor-commands.c * app/gui/palette-editor-commands.c
* app/gui/palettes-commands.c * app/gui/palettes-commands.c
* app/gui/patterns-commands.c: simply cast the passed "data" * app/gui/patterns-commands.c: simply cast the passed "data"
pointer instead of calling gimp_widget_get_callback_context(). pointer instead of calling gimp_widget_get_callback_context().
Don't #include "widgets/gimpwidgets-utils.h". Don't #include "widgets/gimpwidgets-utils.h".
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
#include "widgets/gimpcolorpanel.h" #include "widgets/gimpcolorpanel.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpitemlistview.h"
#include "widgets/gimpviewabledialog.h" #include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -58,13 +58,15 @@ static void channels_color_changed (GimpColorButton *button, ...@@ -58,13 +58,15 @@ static void channels_color_changed (GimpColorButton *button,
#define return_if_no_image(gimage,data) \ #define return_if_no_image(gimage,data) \
gimage = (GimpImage *) gimp_widget_get_callback_context (widget); \ if (GIMP_IS_DISPLAY (data)) \
if (! GIMP_IS_IMAGE (gimage)) { \ gimage = ((GimpDisplay *) data)->gimage; \
if (GIMP_IS_DISPLAY (data)) \ else if (GIMP_IS_GIMP (data)) \
gimage = ((GimpDisplay *) data)->gimage; \ gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_GIMP (data)) \ else if (GIMP_IS_ITEM_LIST_VIEW (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ gimage = ((GimpItemListView *) data)->gimage; \
} \ else \
gimage = NULL; \
\
if (! gimage) \ if (! gimage) \
return return
...@@ -548,7 +550,7 @@ channels_menu_update (GtkItemFactory *factory, ...@@ -548,7 +550,7 @@ channels_menu_update (GtkItemFactory *factory,
GList *next = NULL; GList *next = NULL;
GList *prev = NULL; GList *prev = NULL;
gimage = GIMP_IMAGE (data); gimage = GIMP_ITEM_LIST_VIEW (data)->gimage;
channel = gimp_image_get_active_channel (gimage); channel = gimp_image_get_active_channel (gimage);
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpitemlistview.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -46,13 +46,15 @@ ...@@ -46,13 +46,15 @@
#define return_if_no_image(gimage,data) \ #define return_if_no_image(gimage,data) \
gimage = (GimpImage *) gimp_widget_get_callback_context (widget); \ if (GIMP_IS_DISPLAY (data)) \
if (! GIMP_IS_IMAGE (gimage)) { \ gimage = ((GimpDisplay *) data)->gimage; \
if (GIMP_IS_DISPLAY (data)) \ else if (GIMP_IS_GIMP (data)) \
gimage = ((GimpDisplay *) data)->gimage; \ gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_GIMP (data)) \ else if (GIMP_IS_ITEM_LIST_VIEW (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ gimage = ((GimpItemListView *) data)->gimage; \
} \ else \
gimage = NULL; \
\
if (! gimage) \ if (! gimage) \
return return
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
#include "widgets/gimpenummenu.h" #include "widgets/gimpenummenu.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpitemlistview.h"
#include "widgets/gimpviewabledialog.h" #include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -65,13 +65,15 @@ static void layers_resize_layer_query (GimpImage *gimage, ...@@ -65,13 +65,15 @@ static void layers_resize_layer_query (GimpImage *gimage,
#define return_if_no_image(gimage,data) \ #define return_if_no_image(gimage,data) \
gimage = (GimpImage *) gimp_widget_get_callback_context (widget); \ if (GIMP_IS_DISPLAY (data)) \
if (! GIMP_IS_IMAGE (gimage)) { \ gimage = ((GimpDisplay *) data)->gimage; \
if (GIMP_IS_DISPLAY (data)) \ else if (GIMP_IS_GIMP (data)) \
gimage = ((GimpDisplay *) data)->gimage; \ gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_GIMP (data)) \ else if (GIMP_IS_ITEM_LIST_VIEW (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ gimage = ((GimpItemListView *) data)->gimage; \
} \ else \
gimage = NULL; \
\
if (! gimage) \ if (! gimage) \
return return
...@@ -1166,7 +1168,7 @@ layers_menu_update (GtkItemFactory *factory, ...@@ -1166,7 +1168,7 @@ layers_menu_update (GtkItemFactory *factory,
GList *next = NULL; GList *next = NULL;
GList *prev = NULL; GList *prev = NULL;
gimage = GIMP_IMAGE (data); gimage = GIMP_ITEM_LIST_VIEW (data)->gimage;
layer = gimp_image_get_active_layer (gimage); layer = gimp_image_get_active_layer (gimage);
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
#include "vectors/gimpvectors.h" #include "vectors/gimpvectors.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpitemlistview.h"
#include "widgets/gimpviewabledialog.h" #include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -59,15 +59,15 @@ ...@@ -59,15 +59,15 @@
#define return_if_no_image(gimage,data) \ #define return_if_no_image(gimage,data) \
gimage = (GimpImage *) gimp_widget_get_callback_context (widget); \ if (GIMP_IS_DISPLAY (data)) \
if (! GIMP_IS_IMAGE (gimage)) { \ gimage = ((GimpDisplay *) data)->gimage; \
if (GIMP_IS_DISPLAY (data)) \ else if (GIMP_IS_GIMP (data)) \
gimage = ((GimpDisplay *) data)->gimage; \ gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_GIMP (data)) \ else if (GIMP_IS_ITEM_LIST_VIEW (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ gimage = ((GimpItemListView *) data)->gimage; \
else \ else \
gimage = NULL; \ gimage = NULL; \
} \ \
if (! gimage) \ if (! gimage) \
return return
...@@ -640,7 +640,7 @@ vectors_menu_update (GtkItemFactory *factory, ...@@ -640,7 +640,7 @@ vectors_menu_update (GtkItemFactory *factory,
GList *next = NULL; GList *next = NULL;
GList *prev = NULL; GList *prev = NULL;
gimage = GIMP_IMAGE (data); gimage = GIMP_ITEM_LIST_VIEW (data)->gimage;
vectors = gimp_image_get_active_vectors (gimage); vectors = gimp_image_get_active_vectors (gimage);
......
...@@ -612,7 +612,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, ...@@ -612,7 +612,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
case 3: case 3:
state |= GDK_BUTTON3_MASK; state |= GDK_BUTTON3_MASK;
gimp_item_factory_popup_with_data (shell->popup_factory, gimp_item_factory_popup_with_data (shell->popup_factory,
gimage, gdisp,
NULL); NULL);
return_val = TRUE; return_val = TRUE;
break; break;
...@@ -990,6 +990,8 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, ...@@ -990,6 +990,8 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
{ {
/* Hide or show all dialogs */ /* Hide or show all dialogs */
g_print ("toggle dialogs\n");
gimp_dialog_factories_toggle (global_toolbox_factory); gimp_dialog_factories_toggle (global_toolbox_factory);
} }
...@@ -1574,7 +1576,7 @@ gimp_display_shell_origin_menu_popup (GimpDisplayShell *shell, ...@@ -1574,7 +1576,7 @@ gimp_display_shell_origin_menu_popup (GimpDisplayShell *shell,
shell->origin); shell->origin);
gtk_item_factory_popup_with_data (factory, gtk_item_factory_popup_with_data (factory,
shell->gdisp->gimage, shell->gdisp,
NULL, NULL,
x, y, x, y,
button, time); button, time);
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
#include "widgets/gimpdnd.h" #include "widgets/gimpdnd.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpmenufactory.h" #include "widgets/gimpmenufactory.h"
#include "widgets/gimpwidgets-utils.h"
#include "gui/info-window.h" #include "gui/info-window.h"
#include "gui/plug-in-menus.h" #include "gui/plug-in-menus.h"
...@@ -101,8 +100,6 @@ static void gimp_display_shell_destroy (GtkObject *object ...@@ -101,8 +100,6 @@ static void gimp_display_shell_destroy (GtkObject *object
static gboolean gimp_display_shell_delete_event (GtkWidget *widget, static gboolean gimp_display_shell_delete_event (GtkWidget *widget,
GdkEventAny *aevent); GdkEventAny *aevent);
static gpointer gimp_display_shell_get_accel_context (gpointer data);
static void gimp_display_shell_display_area (GimpDisplayShell *shell, static void gimp_display_shell_display_area (GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
...@@ -495,10 +492,8 @@ gimp_display_shell_new (GimpDisplay *gdisp, ...@@ -495,10 +492,8 @@ gimp_display_shell_new (GimpDisplay *gdisp,
FALSE); FALSE);
/* The accelerator table for images */ /* The accelerator table for images */
gimp_window_add_accel_group (GTK_WINDOW (shell), gtk_window_add_accel_group (GTK_WINDOW (shell),
GTK_ITEM_FACTORY (shell->menubar_factory), GTK_ITEM_FACTORY (shell->menubar_factory)->accel_group);
gimp_display_shell_get_accel_context,
shell);
/* GtkTable widgets are not able to shrink a row/column correctly if /* GtkTable widgets are not able to shrink a row/column correctly if
* widgets are attached with GTK_EXPAND even if those widgets have * widgets are attached with GTK_EXPAND even if those widgets have
...@@ -1845,19 +1840,6 @@ gimp_display_shell_selection_visibility (GimpDisplayShell *shell, ...@@ -1845,19 +1840,6 @@ gimp_display_shell_selection_visibility (GimpDisplayShell *shell,
/* private functions */ /* private functions */
static gpointer
gimp_display_shell_get_accel_context (gpointer data)
{
GimpDisplayShell *shell;
shell = (GimpDisplayShell *) data;
if (shell)
return shell->gdisp->gimage;
return NULL;
}
static void static void
gimp_display_shell_display_area (GimpDisplayShell *shell, gimp_display_shell_display_area (GimpDisplayShell *shell,
gint x, gint x,
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
#include "widgets/gimpdnd.h" #include "widgets/gimpdnd.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpmenufactory.h" #include "widgets/gimpmenufactory.h"
#include "widgets/gimpwidgets-utils.h"
#include "gui/info-window.h" #include "gui/info-window.h"
#include "gui/plug-in-menus.h" #include "gui/plug-in-menus.h"
...@@ -101,8 +100,6 @@ static void gimp_display_shell_destroy (GtkObject *object ...@@ -101,8 +100,6 @@ static void gimp_display_shell_destroy (GtkObject *object
static gboolean gimp_display_shell_delete_event (GtkWidget *widget, static gboolean gimp_display_shell_delete_event (GtkWidget *widget,
GdkEventAny *aevent); GdkEventAny *aevent);
static gpointer gimp_display_shell_get_accel_context (gpointer data);
static void gimp_display_shell_display_area (GimpDisplayShell *shell, static void gimp_display_shell_display_area (GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
...@@ -495,10 +492,8 @@ gimp_display_shell_new (GimpDisplay *gdisp, ...@@ -495,10 +492,8 @@ gimp_display_shell_new (GimpDisplay *gdisp,
FALSE); FALSE);
/* The accelerator table for images */ /* The accelerator table for images */
gimp_window_add_accel_group (GTK_WINDOW (shell), gtk_window_add_accel_group (GTK_WINDOW (shell),
GTK_ITEM_FACTORY (shell->menubar_factory), GTK_ITEM_FACTORY (shell->menubar_factory)->accel_group);
gimp_display_shell_get_accel_context,
shell);
/* GtkTable widgets are not able to shrink a row/column correctly if /* GtkTable widgets are not able to shrink a row/column correctly if
* widgets are attached with GTK_EXPAND even if those widgets have * widgets are attached with GTK_EXPAND even if those widgets have
...@@ -1845,19 +1840,6 @@ gimp_display_shell_selection_visibility (GimpDisplayShell *shell, ...@@ -1845,19 +1840,6 @@ gimp_display_shell_selection_visibility (GimpDisplayShell *shell,
/* private functions */ /* private functions */
static gpointer
gimp_display_shell_get_accel_context (gpointer data)
{
GimpDisplayShell *shell;
shell = (GimpDisplayShell *) data;
if (shell)
return shell->gdisp->gimage;
return NULL;
}
static void static void
gimp_display_shell_display_area (GimpDisplayShell *shell, gimp_display_shell_display_area (GimpDisplayShell *shell,
gint x, gint x,
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
#include "widgets/gimpcolorpanel.h" #include "widgets/gimpcolorpanel.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpitemlistview.h"
#include "widgets/gimpviewabledialog.h" #include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -58,13 +58,15 @@ static void channels_color_changed (GimpColorButton *button, ...@@ -58,13 +58,15 @@ static void channels_color_changed (GimpColorButton *button,
#define return_if_no_image(gimage,data) \ #define return_if_no_image(gimage,data) \
gimage = (GimpImage *) gimp_widget_get_callback_context (widget); \ if (GIMP_IS_DISPLAY (data)) \
if (! GIMP_IS_IMAGE (gimage)) { \ gimage = ((GimpDisplay *) data)->gimage; \
if (GIMP_IS_DISPLAY (data)) \ else if (GIMP_IS_GIMP (data)) \
gimage = ((GimpDisplay *) data)->gimage; \ gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_GIMP (data)) \ else if (GIMP_IS_ITEM_LIST_VIEW (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ gimage = ((GimpItemListView *) data)->gimage; \
} \ else \
gimage = NULL; \
\
if (! gimage) \ if (! gimage) \
return return
...@@ -548,7 +550,7 @@ channels_menu_update (GtkItemFactory *factory, ...@@ -548,7 +550,7 @@ channels_menu_update (GtkItemFactory *factory,
GList *next = NULL; GList *next = NULL;
GList *prev = NULL; GList *prev = NULL;
gimage = GIMP_IMAGE (data); gimage = GIMP_ITEM_LIST_VIEW (data)->gimage;
channel = gimp_image_get_active_channel (gimage); channel = gimp_image_get_active_channel (gimage);
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpitemlistview.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -46,13 +46,15 @@ ...@@ -46,13 +46,15 @@
#define return_if_no_image(gimage,data) \ #define return_if_no_image(gimage,data) \
gimage = (GimpImage *) gimp_widget_get_callback_context (widget); \ if (GIMP_IS_DISPLAY (data)) \
if (! GIMP_IS_IMAGE (gimage)) { \ gimage = ((GimpDisplay *) data)->gimage; \
if (GIMP_IS_DISPLAY (data)) \ else if (GIMP_IS_GIMP (data)) \
gimage = ((GimpDisplay *) data)->gimage; \ gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_GIMP (data)) \ else if (GIMP_IS_ITEM_LIST_VIEW (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ gimage = ((GimpItemListView *) data)->gimage; \
} \ else \
gimage = NULL; \
\
if (! gimage) \ if (! gimage) \
return return
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
#include "widgets/gimpenummenu.h" #include "widgets/gimpenummenu.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpitemlistview.h"
#include "widgets/gimpviewabledialog.h" #include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -65,13 +65,15 @@ static void layers_resize_layer_query (GimpImage *gimage, ...@@ -65,13 +65,15 @@ static void layers_resize_layer_query (GimpImage *gimage,
#define return_if_no_image(gimage,data) \ #define return_if_no_image(gimage,data) \
gimage = (GimpImage *) gimp_widget_get_callback_context (widget); \ if (GIMP_IS_DISPLAY (data)) \
if (! GIMP_IS_IMAGE (gimage)) { \ gimage = ((GimpDisplay *) data)->gimage; \
if (GIMP_IS_DISPLAY (data)) \ else if (GIMP_IS_GIMP (data)) \
gimage = ((GimpDisplay *) data)->gimage; \ gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_GIMP (data)) \ else if (GIMP_IS_ITEM_LIST_VIEW (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ gimage = ((GimpItemListView *) data)->gimage; \
} \ else \
gimage = NULL; \
\
if (! gimage) \ if (! gimage) \
return return
...@@ -1166,7 +1168,7 @@ layers_menu_update (GtkItemFactory *factory, ...@@ -1166,7 +1168,7 @@ layers_menu_update (GtkItemFactory *factory,
GList *next = NULL; GList *next = NULL;
GList *prev = NULL; GList *prev = NULL;
gimage = GIMP_IMAGE (data); gimage = GIMP_ITEM_LIST_VIEW (data)->gimage;
layer = gimp_image_get_active_layer (gimage); layer = gimp_image_get_active_layer (gimage);
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
#include "vectors/gimpvectors.h" #include "vectors/gimpvectors.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpitemlistview.h"
#include "widgets/gimpviewabledialog.h" #include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -59,15 +59,15 @@ ...@@ -59,15 +59,15 @@
#define return_if_no_image(gimage,data) \ #define return_if_no_image(gimage,data) \
gimage = (GimpImage *) gimp_widget_get_callback_context (widget); \ if (GIMP_IS_DISPLAY (data)) \
if (! GIMP_IS_IMAGE (gimage)) { \ gimage = ((GimpDisplay *) data)->gimage; \
if (GIMP_IS_DISPLAY (data)) \ else if (GIMP_IS_GIMP (data)) \
gimage = ((GimpDisplay *) data)->gimage; \ gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_GIMP (data)) \ else if (GIMP_IS_ITEM_LIST_VIEW (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ gimage = ((GimpItemListView *) data)->gimage; \
else \ else \
gimage = NULL; \ gimage = NULL; \
} \ \
if (! gimage) \ if (! gimage) \
return return
...@@ -640,7 +640,7 @@ vectors_menu_update (GtkItemFactory *factory, ...@@ -640,7 +640,7 @@ vectors_menu_update (GtkItemFactory *factory,
GList *next = NULL; GList *next = NULL;
GList *prev = NULL; GList *prev = NULL;
gimage = GIMP_IMAGE (data); gimage = GIMP_ITEM_LIST_VIEW (data)->gimage;
vectors = gimp_image_get_active_vectors (gimage); vectors = gimp_image_get_active_vectors (gimage);
......
...@@ -357,7 +357,7 @@ gimp_item_list_view_new (gint preview_size, ...@@ -357,7 +357,7 @@ gimp_item_list_view_new (gint preview_size,