Commit 3781c7fb authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

Use the global <Image> accel_group in all docks except the toolbox (the

2004-01-31  Michael Natterer  <mitch@gimp.org>

	Use the global <Image> accel_group in all docks except the
	toolbox (the latter needs GTK+ 2.4's new menu features).
	Addresses bug #119878:

	* app/gui/buffers-commands.c
	* app/gui/channels-commands.c
	* app/gui/data-commands.c
	* app/gui/documents-commands.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/gradients-commands.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/plug-in-commands.c
	* app/gui/select-commands.c
	* app/gui/tool-options-commands.c
	* app/gui/tools-commands.c
	* app/gui/vectors-commands.c
	* app/gui/view-commands.c: changed the various return_if_no_foo()
	macros to also accept a GimpDock as user_data.

	* app/gui/image-menu.c (image_menu_update): don't update the
	display related menu items if they don't exist (see below).

	* app/gui/gui.c (gui_display_changed): simplified.

	* app/widgets/gimpimagedock.[ch]: create an "<Image>" item_factory
	and attach its accel_group to the dock. Destroy all display
	related menu items. Destroy the layer stack navigation items
	because their default shortcuts interfere with tree and grid view
	keybindings. Connect to "image_changed" of the dock's private
	context and to "flush" of the image container to update the
	item_factory's state.
parent 12f28a49
2004-01-31 Michael Natterer <mitch@gimp.org>
Use the global <Image> accel_group in all docks except the
toolbox (the latter needs GTK+ 2.4's new menu features).
Addresses bug #119878:
* app/gui/buffers-commands.c
* app/gui/channels-commands.c
* app/gui/data-commands.c
* app/gui/documents-commands.c
* app/gui/drawable-commands.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/layers-commands.c
* app/gui/plug-in-commands.c
* app/gui/select-commands.c
* app/gui/tool-options-commands.c
* app/gui/tools-commands.c
* app/gui/vectors-commands.c
* app/gui/view-commands.c: changed the various return_if_no_foo()
macros to also accept a GimpDock as user_data.
* app/gui/image-menu.c (image_menu_update): don't update the
display related menu items if they don't exist (see below).
* app/gui/gui.c (gui_display_changed): simplified.
* app/widgets/gimpimagedock.[ch]: create an "<Image>" item_factory
and attach its accel_group to the dock. Destroy all display
related menu items. Destroy the layer stack navigation items
because their default shortcuts interfere with tree and grid view
keybindings. Connect to "image_changed" of the dock's private
context and to "flush" of the image container to update the
item_factory's state.
2004-01-31 Michael Natterer <mitch@gimp.org>
* app/gui/dialogs.c: added some g_return_if_fail().
......@@ -35,9 +35,7 @@ void
buffers_paste_buffer_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpBufferView *view;
view = GIMP_BUFFER_VIEW (data);
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->paste_button));
}
......@@ -46,9 +44,7 @@ void
buffers_paste_buffer_into_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpBufferView *view;
view = GIMP_BUFFER_VIEW (data);
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->paste_into_button));
}
......@@ -57,9 +53,7 @@ void
buffers_paste_buffer_as_new_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpBufferView *view;
view = GIMP_BUFFER_VIEW (data);
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->paste_as_new_button));
}
......@@ -68,9 +62,7 @@ void
buffers_delete_buffer_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpBufferView *view;
view = GIMP_BUFFER_VIEW (data);
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->delete_button));
}
......@@ -36,6 +36,7 @@
#include "widgets/gimpcolorpanel.h"
#include "widgets/gimpcomponenteditor.h"
#include "widgets/gimpdock.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpitemtreeview.h"
#include "widgets/gimpviewabledialog.h"
......@@ -60,6 +61,8 @@ static void channels_color_changed (GimpColorButton *button,
gimage = ((GimpDisplay *) data)->gimage; \
else if (GIMP_IS_GIMP (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gimage = gimp_context_get_image (((GimpDock *) data)->context); \
else if (GIMP_IS_COMPONENT_EDITOR (data)) \
gimage = ((GimpImageEditor *) data)->gimage; \
else if (GIMP_IS_ITEM_TREE_VIEW (data)) \
......
......@@ -33,9 +33,7 @@ void
data_new_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->new_button))
gtk_button_clicked (GTK_BUTTON (view->new_button));
......@@ -45,9 +43,7 @@ void
data_duplicate_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->duplicate_button))
gtk_button_clicked (GTK_BUTTON (view->duplicate_button));
......@@ -57,9 +53,7 @@ void
data_edit_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->edit_button))
gtk_button_clicked (GTK_BUTTON (view->edit_button));
......@@ -69,9 +63,7 @@ void
data_delete_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->delete_button))
gtk_button_clicked (GTK_BUTTON (view->delete_button));
......@@ -81,9 +73,7 @@ void
data_refresh_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->refresh_button))
gtk_button_clicked (GTK_BUTTON (view->refresh_button));
......
......@@ -35,9 +35,7 @@ void
documents_open_document_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->open_button));
}
......@@ -46,9 +44,7 @@ void
documents_raise_or_open_document_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gimp_button_extended_clicked (GIMP_BUTTON (view->open_button),
GDK_SHIFT_MASK);
......@@ -58,9 +54,7 @@ void
documents_file_open_dialog_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gimp_button_extended_clicked (GIMP_BUTTON (view->open_button),
GDK_CONTROL_MASK);
......@@ -70,9 +64,7 @@ void
documents_remove_document_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->remove_button));
}
......@@ -82,9 +74,7 @@ void
documents_recreate_preview_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->refresh_button));
}
......@@ -93,9 +83,7 @@ void
documents_reload_previews_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gimp_button_extended_clicked (GIMP_BUTTON (view->refresh_button),
GDK_SHIFT_MASK);
......@@ -105,9 +93,7 @@ void
documents_delete_dangling_documents_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gimp_button_extended_clicked (GIMP_BUTTON (view->refresh_button),
GDK_CONTROL_MASK);
......
......@@ -36,6 +36,7 @@
#include "core/gimpimage-undo.h"
#include "core/gimpitem-linked.h"
#include "widgets/gimpdock.h"
#include "widgets/gimpitemtreeview.h"
#include "display/gimpdisplay.h"
......@@ -51,6 +52,8 @@
gimage = ((GimpDisplay *) data)->gimage; \
else if (GIMP_IS_GIMP (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gimage = gimp_context_get_image (((GimpDock *) data)->context); \
else if (GIMP_IS_ITEM_TREE_VIEW (data)) \
gimage = ((GimpItemTreeView *) data)->gimage; \
else \
......
......@@ -40,6 +40,7 @@
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-transform.h"
#include "widgets/gimpdock.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpdialogfactory.h"
......@@ -55,6 +56,8 @@
gdisp = data; \
else if (GIMP_IS_GIMP (data)) \
gdisp = gimp_context_get_display (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gdisp = gimp_context_get_display (((GimpDock *) data)->context); \
else \
gdisp = NULL; \
if (! gdisp) \
......@@ -65,6 +68,8 @@
gimage = ((GimpDisplay *) data)->gimage; \
else if (GIMP_IS_GIMP (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gimage = gimp_context_get_image (((GimpDock *) data)->context); \
else \
gimage = NULL; \
if (! gimage) \
......
......@@ -40,6 +40,7 @@
#include "file/file-save.h"
#include "file/file-utils.h"
#include "widgets/gimpdock.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpdialogfactory.h"
......@@ -65,6 +66,8 @@
gimp = ((GimpDisplay *) data)->gimage->gimp; \
else if (GIMP_IS_GIMP (data)) \
gimp = data; \
else if (GIMP_IS_DOCK (data)) \
gimp = ((GimpDock *) data)->context->gimp; \
else \
gimp = NULL; \
if (! gimp) \
......@@ -76,6 +79,8 @@
gdisp = data; \
else if (GIMP_IS_GIMP (data)) \
gdisp = gimp_context_get_display (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gdisp = gimp_context_get_display (((GimpDock *) data)->context); \
else \
gdisp = NULL; \
if (! gdisp) \
......
......@@ -50,9 +50,7 @@ void
gradients_save_as_pov_ray_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpContainerEditor *editor;
editor = GIMP_CONTAINER_EDITOR (data);
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
gradients_save_as_pov_query (editor);
}
......
......@@ -41,6 +41,7 @@
#include "core/gimpimage-scale.h"
#include "core/gimpimage-undo.h"
#include "widgets/gimpdock.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpviewabledialog.h"
......@@ -69,6 +70,8 @@ typedef struct
gdisp = data; \
else if (GIMP_IS_GIMP (data)) \
gdisp = gimp_context_get_display (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gdisp = gimp_context_get_display (((GimpDock *) data)->context); \
else \
gdisp = NULL; \
if (! gdisp) \
......@@ -79,6 +82,8 @@ typedef struct
gimage = ((GimpDisplay *) data)->gimage; \
else if (GIMP_IS_GIMP (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gimage = gimp_context_get_image (((GimpDock *) data)->context); \
else \
gimage = NULL; \
if (! gimage) \
......
......@@ -44,6 +44,7 @@
#include "pdb/procedural_db.h"
#include "widgets/gimpdock.h"
#include "widgets/gimpenummenu.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpitemtreeview.h"
......@@ -78,6 +79,8 @@ static void layers_resize_layer_query (GimpImage *gimage,
gimage = ((GimpDisplay *) data)->gimage; \
else if (GIMP_IS_GIMP (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gimage = gimp_context_get_image (((GimpDock *) data)->context); \
else if (GIMP_IS_ITEM_TREE_VIEW (data)) \
gimage = ((GimpItemTreeView *) data)->gimage; \
else \
......
......@@ -32,6 +32,7 @@
#include "plug-in/plug-in-run.h"
#include "plug-in/plug-in-proc.h"
#include "widgets/gimpdock.h"
#include "widgets/gimpitemfactory.h"
#include "display/gimpdisplay.h"
......@@ -44,6 +45,8 @@
gdisp = data; \
else if (GIMP_IS_GIMP (data)) \
gdisp = gimp_context_get_display (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gdisp = gimp_context_get_display (((GimpDock *) data)->context); \
else \
gdisp = NULL; \
if (! gdisp) \
......
......@@ -32,6 +32,7 @@
#include "core/gimpimage-qmask.h"
#include "core/gimpselection.h"
#include "widgets/gimpdock.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpdialogfactory.h"
......@@ -49,6 +50,8 @@
gdisp = data; \
else if (GIMP_IS_GIMP (data)) \
gdisp = gimp_context_get_display (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gdisp = gimp_context_get_display (((GimpDock *) data)->context); \
else \
gdisp = NULL; \
if (! gdisp) \
......@@ -59,6 +62,8 @@
gimage = ((GimpDisplay *) data)->gimage; \
else if (GIMP_IS_GIMP (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gimage = gimp_context_get_image (((GimpDock *) data)->context); \
else \
gimage = NULL; \
if (! gimage) \
......
......@@ -78,13 +78,11 @@ tool_options_save_new_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
GimpEditor *editor;
GimpEditor *editor = GIMP_EDITOR (data);
GimpContext *context;
GimpToolInfo *tool_info;
GtkWidget *qbox;
editor = GIMP_EDITOR (data);
context = gimp_get_user_context (editor->item_factory->gimp);
tool_info = gimp_context_get_tool (context);
......
......@@ -28,6 +28,8 @@
#include "core/gimpimage.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimpdock.h"
#include "display/gimpdisplay.h"
#include "tools/gimptool.h"
......@@ -39,6 +41,8 @@
gimp = ((GimpDisplay *) data)->gimage->gimp; \
else if (GIMP_IS_GIMP (data)) \
gimp = data; \
else if (GIMP_IS_DOCK (data)) \
gimp = ((GimpDock *) data)->context->gimp; \
else \
gimp = NULL; \
if (! gimp) \
......
......@@ -43,6 +43,7 @@
#include "vectors/gimpvectors-export.h"
#include "vectors/gimpvectors-import.h"
#include "widgets/gimpdock.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpitemtreeview.h"
#include "widgets/gimpviewabledialog.h"
......@@ -64,6 +65,8 @@
gimage = ((GimpDisplay *) data)->gimage; \
else if (GIMP_IS_GIMP (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gimage = gimp_context_get_image (((GimpDock *) data)->context); \
else if (GIMP_IS_ITEM_TREE_VIEW (data)) \
gimage = ((GimpItemTreeView *) data)->gimage; \
else \
......
......@@ -37,6 +37,7 @@
#include "display/gimpdisplayshell-filter-dialog.h"
#include "display/gimpdisplayshell-scale.h"
#include "widgets/gimpdock.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpitemfactory.h"
......@@ -51,6 +52,8 @@
gdisp = data; \
else if (GIMP_IS_GIMP (data)) \
gdisp = gimp_context_get_display (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gdisp = gimp_context_get_display (((GimpDock *) data)->context); \
else \
gdisp = NULL; \
if (! gdisp) \
......
......@@ -35,9 +35,7 @@ void
buffers_paste_buffer_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpBufferView *view;
view = GIMP_BUFFER_VIEW (data);
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->paste_button));
}
......@@ -46,9 +44,7 @@ void
buffers_paste_buffer_into_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpBufferView *view;
view = GIMP_BUFFER_VIEW (data);
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->paste_into_button));
}
......@@ -57,9 +53,7 @@ void
buffers_paste_buffer_as_new_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpBufferView *view;
view = GIMP_BUFFER_VIEW (data);
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->paste_as_new_button));
}
......@@ -68,9 +62,7 @@ void
buffers_delete_buffer_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpBufferView *view;
view = GIMP_BUFFER_VIEW (data);
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->delete_button));
}
......@@ -36,6 +36,7 @@
#include "widgets/gimpcolorpanel.h"
#include "widgets/gimpcomponenteditor.h"
#include "widgets/gimpdock.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpitemtreeview.h"
#include "widgets/gimpviewabledialog.h"
......@@ -60,6 +61,8 @@ static void channels_color_changed (GimpColorButton *button,
gimage = ((GimpDisplay *) data)->gimage; \
else if (GIMP_IS_GIMP (data)) \
gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \
else if (GIMP_IS_DOCK (data)) \
gimage = gimp_context_get_image (((GimpDock *) data)->context); \
else if (GIMP_IS_COMPONENT_EDITOR (data)) \
gimage = ((GimpImageEditor *) data)->gimage; \
else if (GIMP_IS_ITEM_TREE_VIEW (data)) \
......
......@@ -33,9 +33,7 @@ void
data_new_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->new_button))
gtk_button_clicked (GTK_BUTTON (view->new_button));
......@@ -45,9 +43,7 @@ void
data_duplicate_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->duplicate_button))
gtk_button_clicked (GTK_BUTTON (view->duplicate_button));
......@@ -57,9 +53,7 @@ void
data_edit_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->edit_button))
gtk_button_clicked (GTK_BUTTON (view->edit_button));
......@@ -69,9 +63,7 @@ void
data_delete_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->delete_button))
gtk_button_clicked (GTK_BUTTON (view->delete_button));
......@@ -81,9 +73,7 @@ void
data_refresh_data_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDataFactoryView *view;
view = GIMP_DATA_FACTORY_VIEW (data);
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
if (GTK_WIDGET_SENSITIVE (view->refresh_button))
gtk_button_clicked (GTK_BUTTON (view->refresh_button));
......
......@@ -35,9 +35,7 @@ void
documents_open_document_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->open_button));
}
......@@ -46,9 +44,7 @@ void
documents_raise_or_open_document_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gimp_button_extended_clicked (GIMP_BUTTON (view->open_button),
GDK_SHIFT_MASK);
......@@ -58,9 +54,7 @@ void
documents_file_open_dialog_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gimp_button_extended_clicked (GIMP_BUTTON (view->open_button),
GDK_CONTROL_MASK);
......@@ -70,9 +64,7 @@ void
documents_remove_document_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->remove_button));
}
......@@ -82,9 +74,7 @@ void
documents_recreate_preview_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDocumentView *view;
view = GIMP_DOCUMENT_VIEW (data);
GimpDocumentView *view = GIMP_DOCUMENT_VIEW (data);
gtk_button_clicked (GTK_BUTTON (view->refresh_button));
}
......@@ -93,9 +83,7 @@ void