Commit 9dd403f7 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

CPPFLAGS: added -DGTK_DISABLE_DEPRECATED

2002-01-25  Michael Natterer  <mitch@gimp.org>

	* configure.in: CPPFLAGS: added -DGTK_DISABLE_DEPRECATED

	* libgimpwidgets/gimpdialog.c: still use the deprecated
	gtk_window_set_policy() but spit out a #warning.

	* app/widgets/widgets-types.h
	* app/widgets/gimpitemfactory.[ch]: made it a GtkItemFactory
	subclass. This way we can reproduce the effect of
	gtk_item_factory_get_from_path() which is deprectated for good
	reasons.  For GIMP, using it its perfectly OK since we only have
	one item factory per "<prefix>".

	* app/widgets/gimpbrushfactoryview.[ch]
	* app/widgets/gimpbufferview.[ch]
	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimpdialogfactory.[ch]
	* app/widgets/gimpdock.c
	* app/widgets/gimpdockbook.c
	* app/widgets/gimpdocumentview.[ch]
	* app/widgets/gimpdrawablelistview.[ch]
	* app/widgets/gimppreview.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell.[ch]: pass around GimpItemFactory
	pointers instead of "const gchar *" item factory identifiers.
	Replaced gtk_window_set_policy() by gtk_window_set_resizable()
	and other recommended stuff.

	* app/gui/about-dialog.c
	* app/gui/dialogs-constructors.c
	* app/gui/dialogs.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/gradient-editor.c
	* app/gui/menus.c
	* app/gui/offset-dialog.c
	* app/gui/splash.c
	* app/gui/tips-dialog.c
	* app/gui/toolbox.c: lots of
	s/gtk_item_factory_from_path/gimp_item_factory_from_path/,
	gtk_window_set_policy() replacements, misc fixes.

	* plug-ins/gdyntext/charmap_window.c
	* plug-ins/gdyntext/gdyntext_ui.c
	* plug-ins/gdyntext/message_window.c
	* plug-ins/imagemap/imap_main.c: replaced gtk_window_set_policy().
parent 46715fc1
2002-01-25 Michael Natterer <mitch@gimp.org>
* configure.in: CPPFLAGS: added -DGTK_DISABLE_DEPRECATED
* libgimpwidgets/gimpdialog.c: still use the deprecated
gtk_window_set_policy() but spit out a #warning.
* app/widgets/widgets-types.h
* app/widgets/gimpitemfactory.[ch]: made it a GtkItemFactory
subclass. This way we can reproduce the effect of
gtk_item_factory_get_from_path() which is deprectated for good
reasons. For GIMP, using it its perfectly OK since we only have
one item factory per "<prefix>".
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimpbufferview.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpdialogfactory.[ch]
* app/widgets/gimpdock.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpdocumentview.[ch]
* app/widgets/gimpdrawablelistview.[ch]
* app/widgets/gimppreview.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.[ch]: pass around GimpItemFactory
pointers instead of "const gchar *" item factory identifiers.
Replaced gtk_window_set_policy() by gtk_window_set_resizable()
and other recommended stuff.
* app/gui/about-dialog.c
* app/gui/dialogs-constructors.c
* app/gui/dialogs.c
* app/gui/file-open-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c: lots of
s/gtk_item_factory_from_path/gimp_item_factory_from_path/,
gtk_window_set_policy() replacements, misc fixes.
* plug-ins/gdyntext/charmap_window.c
* plug-ins/gdyntext/gdyntext_ui.c
* plug-ins/gdyntext/message_window.c
* plug-ins/imagemap/imap_main.c: replaced gtk_window_set_policy().
2002-01-25 Michael Natterer <mitch@gimp.org>
* plug-ins/common/tga.c
* plug-ins/common/video.c: compile with GTK_DISABLE_DEPRECATED.
2002-01-24 Sven Neumann <sven@gimp.org>
* plug-ins/common/tga.c: merged fix for bug #53278 from stable branch.
......
......@@ -130,8 +130,8 @@ about_dialog_create (void)
GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_wmclass (GTK_WINDOW (about_dialog), "about_dialog", "Gimp");
gtk_window_set_title (GTK_WINDOW (about_dialog), _("About The GIMP"));
gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, FALSE);
gtk_window_set_position (GTK_WINDOW (about_dialog), GTK_WIN_POS_CENTER);
gtk_window_set_resizable (GTK_WINDOW (about_dialog), FALSE);
gimp_help_connect (about_dialog, gimp_standard_help_func,
"dialogs/about.html");
......@@ -161,7 +161,7 @@ about_dialog_create (void)
gtk_widget_set_events (about_dialog, GDK_BUTTON_PRESS_MASK);
if (!about_dialog_load_logo (about_dialog))
if (! about_dialog_load_logo (about_dialog))
{
gtk_widget_destroy (about_dialog);
about_dialog = NULL;
......
......@@ -42,6 +42,7 @@
#include "widgets/gimpdatafactoryview.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpimagedock.h"
#include "widgets/gimpitemfactory.h"
#include "widgets/gimpdockable.h"
#include "widgets/gimpdockbook.h"
#include "widgets/gimpdocumentview.h"
......@@ -386,7 +387,7 @@ dialogs_brush_list_view_new (GimpDialogFactory *factory,
TRUE,
preview_size,
5, 3,
"<Brushes>");
gimp_item_factory_from_path ("<Brushes>"));
return dialogs_dockable_new (view,
"Brush List", "Brushes",
......@@ -407,7 +408,7 @@ dialogs_pattern_list_view_new (GimpDialogFactory *factory,
context,
preview_size,
5, 3,
"<Patterns>");
gimp_item_factory_from_path ("<Patterns>"));
return dialogs_dockable_new (view,
"Pattern List", "Patterns",
......@@ -428,7 +429,7 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory,
context,
preview_size,
5, 3,
"<Gradients>");
gimp_item_factory_from_path ("<Gradients>"));
return dialogs_dockable_new (view,
"Gradient List", "Gradients",
......@@ -449,7 +450,7 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory,
context,
preview_size,
5, 3,
"<Palettes>");
gimp_item_factory_from_path ("<Palettes>"));
return dialogs_dockable_new (view,
"Palette List", "Palettes",
......@@ -488,7 +489,7 @@ dialogs_buffer_list_view_new (GimpDialogFactory *factory,
context,
preview_size,
5, 3,
"<Buffers>");
gimp_item_factory_from_path ("<Buffers>"));
return dialogs_dockable_new (view,
"Buffer List", "Buffers",
......@@ -532,7 +533,7 @@ dialogs_brush_grid_view_new (GimpDialogFactory *factory,
TRUE,
preview_size,
5, 3,
"<Brushes>");
gimp_item_factory_from_path ("<Brushes>"));
return dialogs_dockable_new (view,
"Brush Grid", "Brushes",
......@@ -553,7 +554,7 @@ dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
context,
preview_size,
5, 3,
"<Patterns>");
gimp_item_factory_from_path ("<Patterns>"));
return dialogs_dockable_new (view,
"Pattern Grid", "Patterns",
......@@ -574,7 +575,7 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
context,
preview_size,
5, 3,
"<Gradients>");
gimp_item_factory_from_path ("<Gradients>"));
return dialogs_dockable_new (view,
"Gradient Grid", "Gradients",
......@@ -595,7 +596,7 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory,
context,
preview_size,
5, 3,
"<Gradients>");
gimp_item_factory_from_path ("<Gradients>"));
return dialogs_dockable_new (view,
"Palette Grid", "Palettes",
......@@ -634,7 +635,7 @@ dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
context,
preview_size,
5, 3,
"<Buffers>");
gimp_item_factory_from_path ("<Buffers>"));
return dialogs_dockable_new (view,
"Buffer Grid", "Buffers",
......@@ -671,7 +672,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
(GimpConvertDrawableFunc) gimp_layer_new_from_drawable,
(GimpNewDrawableFunc) layers_new_layer_query,
(GimpEditDrawableFunc) layers_edit_layer_query,
"<Layers>");
gimp_item_factory_from_path ("<Layers>"));
dockable = dialogs_dockable_new (view,
"Layer List", "Layers",
......@@ -709,7 +710,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
(GimpConvertDrawableFunc) NULL,
(GimpNewDrawableFunc) channels_new_channel_query,
(GimpEditDrawableFunc) channels_edit_channel_query,
"<Channels>");
gimp_item_factory_from_path ("<Channels>"));
dockable = dialogs_dockable_new (view,
"Channel List", "Channels",
......@@ -789,7 +790,7 @@ dialogs_document_history_new (GimpDialogFactory *factory,
context,
preview_size,
5, 3,
"<Documents>");
gimp_item_factory_from_path ("<Documents>"));
return dialogs_dockable_new (view,
"Document History", "History",
......
......@@ -26,6 +26,7 @@
#include "core/gimpcontext.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpitemfactory.h"
#include "dialogs.h"
#include "dialogs-constructors.h"
......@@ -100,7 +101,7 @@ dialogs_init (Gimp *gimp)
global_dock_factory = gimp_dialog_factory_new ("dock",
gimp_get_user_context (gimp),
gtk_item_factory_from_path ("<Dialogs>"),
gimp_item_factory_from_path ("<Dialogs>"),
dialogs_dock_new);
for (i = 0; i < G_N_ELEMENTS (toplevel_entries); i++)
......
......@@ -38,7 +38,7 @@
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "core/core-types.h"
#include "gui-types.h"
#include "base/temp-buf.h"
......@@ -224,12 +224,12 @@ file_open_dialog_create (Gimp *gimp)
"open/dialogs/file_open.html");
{
GtkItemFactory *item_factory;
GtkWidget *frame;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *option_menu;
GtkWidget *open_options_genbutton;
GimpItemFactory *item_factory;
GtkWidget *frame;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *option_menu;
GtkWidget *open_options_genbutton;
open_options = gtk_hbox_new (TRUE, 1);
......@@ -250,9 +250,9 @@ file_open_dialog_create (Gimp *gimp)
gtk_box_pack_start (GTK_BOX (hbox), option_menu, FALSE, FALSE, 0);
gtk_widget_show (option_menu);
item_factory = gtk_item_factory_from_path ("<Load>");
item_factory = gimp_item_factory_from_path ("<Load>");
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu),
item_factory->widget);
GTK_ITEM_FACTORY (item_factory)->widget);
gtk_widget_show (vbox);
gtk_widget_show (frame);
......
......@@ -250,11 +250,11 @@ file_save_dialog_create (void)
"save/dialogs/file_save.html");
{
GtkItemFactory *item_factory;
GtkWidget *frame;
GtkWidget *hbox;
GtkWidget *label;
GtkWidget *option_menu;
GimpItemFactory *item_factory;
GtkWidget *frame;
GtkWidget *hbox;
GtkWidget *label;
GtkWidget *option_menu;
save_options = gtk_hbox_new (TRUE, 1);
......@@ -275,9 +275,9 @@ file_save_dialog_create (void)
gtk_box_pack_start (GTK_BOX (hbox), option_menu, TRUE, TRUE, 0);
gtk_widget_show (option_menu);
item_factory = gtk_item_factory_from_path ("<Save>");
item_factory = gimp_item_factory_from_path ("<Save>");
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu),
item_factory->widget);
GTK_ITEM_FACTORY (item_factory)->widget);
gtk_widget_show (frame);
......
......@@ -137,7 +137,7 @@ offset_dialog_create (GimpDrawable *drawable)
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 1);
spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_widget_set_size_request (spinbutton, 75, 0);
gtk_widget_set_size_request (spinbutton, 75, -1);
off_d->off_se = gimp_size_entry_new (1, off_d->gimage->unit, "%a",
TRUE, TRUE, FALSE, 75,
......
......@@ -91,11 +91,11 @@ tips_dialog_create (void)
gtk_window_set_wmclass (GTK_WINDOW (tips_dialog), "tip_of_the_day", "Gimp");
gtk_window_set_title (GTK_WINDOW (tips_dialog), _("GIMP Tip of the Day"));
gtk_window_set_position (GTK_WINDOW (tips_dialog), GTK_WIN_POS_CENTER);
gtk_window_set_policy (GTK_WINDOW (tips_dialog), FALSE, TRUE, FALSE);
gtk_window_set_resizable (GTK_WINDOW (tips_dialog), TRUE);
g_signal_connect (G_OBJECT (tips_dialog), "delete_event",
G_CALLBACK (gtk_widget_destroy),
NULL);
G_CALLBACK (gtk_widget_destroy),
NULL);
g_signal_connect (G_OBJECT (tips_dialog), "destroy",
G_CALLBACK (tips_dialog_destroy),
......
......@@ -193,6 +193,9 @@ gimp_display_shell_canvas_realize (GtkWidget *canvas,
GDK_TOP_LEFT_ARROW,
GIMP_TOOL_CURSOR_NONE,
GIMP_CURSOR_MODIFIER_NONE);
/* allow shrinking */
gtk_widget_set_size_request (GTK_WIDGET (shell), 0, 0);
}
gboolean
......@@ -485,7 +488,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
case 3:
state |= GDK_BUTTON3_MASK;
gimp_item_factory_popup_with_data (shell->ifactory,
gimp_item_factory_popup_with_data (shell->item_factory,
gimage,
NULL);
return_val = TRUE;
......@@ -1038,12 +1041,16 @@ gimp_display_shell_origin_button_press (GtkWidget *widget,
if (! gdisp->gimage->gimp->busy && event->button == 1)
{
gint x, y;
GtkItemFactory *factory;
gint x, y;
gimp_display_shell_origin_menu_position (GTK_MENU (shell->ifactory->widget),
&x, &y, widget);
factory = GTK_ITEM_FACTORY (shell->item_factory);
gtk_item_factory_popup_with_data (shell->ifactory,
gimp_display_shell_origin_menu_position (GTK_MENU (factory->widget),
&x, &y,
widget);
gtk_item_factory_popup_with_data (factory,
gdisp->gimage,
NULL,
x, y,
......@@ -1089,9 +1096,9 @@ gimp_display_shell_qmask_button_press (GtkWidget *widget,
if ((event->type == GDK_BUTTON_PRESS) && (event->button == 3))
{
GtkItemFactory *factory;
GimpItemFactory *factory;
factory = gtk_item_factory_from_path ("<QMask>");
factory = gimp_item_factory_from_path ("<QMask>");
gimp_item_factory_popup_with_data (factory, shell, NULL);
......
......@@ -172,7 +172,7 @@ static void
gimp_display_shell_init (GimpDisplayShell *shell)
{
shell->gdisp = NULL;
shell->ifactory = NULL;
shell->item_factory = NULL;
shell->offset_x = 0;
shell->offset_y = 0;
......@@ -239,6 +239,55 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->cd_list = NULL;
shell->cd_ui = NULL;
#endif /* DISPLAY_FILTERS */
gtk_window_set_wmclass (GTK_WINDOW (shell), "image_window", "Gimp");
gtk_window_set_resizable (GTK_WINDOW (shell), TRUE);
gtk_widget_set_events (GTK_WIDGET (shell), (GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_KEY_PRESS_MASK |
GDK_KEY_RELEASE_MASK));
/* active display callback */
g_signal_connect (G_OBJECT (shell), "button_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);
g_signal_connect (G_OBJECT (shell), "key_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);
/* dnd stuff */
gtk_drag_dest_set (GTK_WIDGET (shell),
GTK_DEST_DEFAULT_ALL,
display_target_table,
G_N_ELEMENTS (display_target_table),
GDK_ACTION_COPY);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_LAYER,
gimp_display_shell_drop_drawable,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_LAYER_MASK,
gimp_display_shell_drop_drawable,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_CHANNEL,
gimp_display_shell_drop_drawable,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_PATTERN,
gimp_display_shell_drop_pattern,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_BUFFER,
gimp_display_shell_drop_buffer,
shell);
gimp_dnd_color_dest_set (GTK_WIDGET (shell),
gimp_display_shell_drop_color,
shell);
/* connect the "F1" help key */
gimp_help_connect (GTK_WIDGET (shell),
gimp_standard_help_func,
"image/image_window.html");
}
static void
......@@ -385,64 +434,15 @@ gimp_display_shell_new (GimpDisplay *gdisp)
/* the toplevel shell */
shell = g_object_new (GIMP_TYPE_DISPLAY_SHELL, NULL);
shell->gdisp = gdisp;
gtk_window_set_wmclass (GTK_WINDOW (shell), "image_window", "Gimp");
gtk_window_set_policy (GTK_WINDOW (shell), TRUE, TRUE, TRUE);
gtk_widget_set_events (GTK_WIDGET (shell), (GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_KEY_PRESS_MASK |
GDK_KEY_RELEASE_MASK));
/* the popup menu */
shell->ifactory = gtk_item_factory_from_path ("<Image>");
shell->gdisp = gdisp;
shell->item_factory = gimp_item_factory_from_path ("<Image>");
/* The accelerator table for images */
gimp_window_add_accel_group (GTK_WINDOW (shell),
shell->ifactory,
GTK_ITEM_FACTORY (shell->item_factory),
gimp_display_shell_get_accel_context,
shell);
/* active display callback */
g_signal_connect (G_OBJECT (shell), "button_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);
g_signal_connect (G_OBJECT (shell), "key_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);
/* dnd stuff */
gtk_drag_dest_set (GTK_WIDGET (shell),
GTK_DEST_DEFAULT_ALL,
display_target_table,
G_N_ELEMENTS (display_target_table),
GDK_ACTION_COPY);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_LAYER,
gimp_display_shell_drop_drawable,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_LAYER_MASK,
gimp_display_shell_drop_drawable,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_CHANNEL,
gimp_display_shell_drop_drawable,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_PATTERN,
gimp_display_shell_drop_pattern,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_BUFFER,
gimp_display_shell_drop_buffer,
shell);
gimp_dnd_color_dest_set (GTK_WIDGET (shell),
gimp_display_shell_drop_color,
shell);
/* connect the "F1" help key */
gimp_help_connect (GTK_WIDGET (shell),
gimp_standard_help_func,
"image/image_window.html");
/* GtkTable widgets are not able to shrink a row/column correctly if
* widgets are attached with GTK_EXPAND even if those widgets have
* other rows/columns in their rowspan/colspan where they could
......
......@@ -52,7 +52,7 @@ struct _GimpDisplayShell
GimpDisplay *gdisp;
GtkItemFactory *ifactory;
GimpItemFactory *item_factory;
gint offset_x; /* offset of display image into raw image */
gint offset_y;
......
......@@ -172,7 +172,7 @@ static void
gimp_display_shell_init (GimpDisplayShell *shell)
{
shell->gdisp = NULL;
shell->ifactory = NULL;
shell->item_factory = NULL;
shell->offset_x = 0;
shell->offset_y = 0;
......@@ -239,6 +239,55 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->cd_list = NULL;
shell->cd_ui = NULL;
#endif /* DISPLAY_FILTERS */
gtk_window_set_wmclass (GTK_WINDOW (shell), "image_window", "Gimp");
gtk_window_set_resizable (GTK_WINDOW (shell), TRUE);
gtk_widget_set_events (GTK_WIDGET (shell), (GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_KEY_PRESS_MASK |
GDK_KEY_RELEASE_MASK));
/* active display callback */
g_signal_connect (G_OBJECT (shell), "button_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);
g_signal_connect (G_OBJECT (shell), "key_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);
/* dnd stuff */
gtk_drag_dest_set (GTK_WIDGET (shell),
GTK_DEST_DEFAULT_ALL,
display_target_table,
G_N_ELEMENTS (display_target_table),
GDK_ACTION_COPY);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_LAYER,
gimp_display_shell_drop_drawable,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_LAYER_MASK,
gimp_display_shell_drop_drawable,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_CHANNEL,
gimp_display_shell_drop_drawable,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_PATTERN,
gimp_display_shell_drop_pattern,
shell);
gimp_dnd_viewable_dest_set (GTK_WIDGET (shell), GIMP_TYPE_BUFFER,
gimp_display_shell_drop_buffer,
shell);
gimp_dnd_color_dest_set (GTK_WIDGET (shell),
gimp_display_shell_drop_color,
shell);
/* connect the "F1" help key */
gimp_help_connect (GTK_WIDGET (shell),
gimp_standard_help_func,
"image/image_window.html");
}
static void
......@@ -385,64 +434,15 @@ gimp_display_shell_new (GimpDisplay *gdisp)
/* the toplevel shell */
shell = g_object_new (GIMP_TYPE_DISPLAY_SHELL, NULL);
shell->gdisp = gdisp;
gtk_window_set_wmclass (GTK_WINDOW (shell), "image_window", "Gimp");
gtk_window_set_policy (GTK_WINDOW (shell), TRUE, TRUE, TRUE);
gtk_widget_set_events (GTK_WIDGET (shell), (GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_KEY_PRESS_MASK |
GDK_KEY_RELEASE_MASK));
/* the popup menu */
shell->ifactory = gtk_item_factory_from_path ("<Image>");
shell->gdisp = gdisp;
shell->item_factory = gimp_item_factory_from_path ("<Image>");
/* The accelerator table for images */
gimp_window_add_accel_group (GTK_WINDOW (shell),
shell->ifactory,
GTK_ITEM_FACTORY (shell->item_factory),
gimp_display_shell_get_accel_context,
shell);
/* active display callback */
g_signal_connect (G_OBJECT (shell), "button_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);
g_signal_connect (G_OBJECT (shell), "key_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);