Commit 4fa25532 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

should set the fs.backing_store TileManager pointer to NULL after deleting

2001-11-09  Michael Natterer  <mitch@gimp.org>

	* app/undo.c: should set the fs.backing_store TileManager pointer
	to NULL after deleting it. Why the heck didn't this crash
	before...?

	* app/core/Makefile.am
	* app/core/gimpdrawable-blend.[ch]: the blend stuff taken from
	the blend tool.

	* app/core/core-types.h: added the blend enums.

	* app/tools/gimpblendtool.[ch]: removed the stuff here.

	* tools/pdbgen/pdb/tools.pdb: changed blend wrapper accordingly.

	* app/pdb/tools_cmds.c: regenerated.

	* tools/pdbgen/Makefile.am: don't scan tools/gimpblendtool.c.

	* tools/pdbgen/enums.pl: regenerated.

	* app/tools/gimpbucketfilltool.c: fixed crash caused by my last
	change.

	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell.c: removed lots of uglyness by
	using GtkImages for the qmask and navigation buttons. Don't realize
	anything before the shell is shown. Connect the realize
	callback and do stuff there. Don't call the realize callback
	from gimp_display_shell_canvas_events() any more.

	* pixmaps/navbutton.xpm
	* pixmaps/qmasknosel.xpm
	* pixmaps/qmasksel.xpm: removed.

	* themes/Default/Makefile.am
	* themes/Default/images/Makefile.am
	* themes/Default/images/stock-menu-navigation.png
	* themes/Default/images/stock-menu-qmask-off.png
	* themes/Default/images/stock-menu-qmask-on.png: new PNGs instead.

	* libgimpwidgets/gimpstock.[ch]: register them as stock icons.
parent 9dc96ce7
2001-11-09 Michael Natterer <mitch@gimp.org>
* app/undo.c: should set the fs.backing_store TileManager pointer
to NULL after deleting it. Why the heck didn't this crash
before...?
* app/core/Makefile.am
* app/core/gimpdrawable-blend.[ch]: the blend stuff taken from
the blend tool.
* app/core/core-types.h: added the blend enums.
* app/tools/gimpblendtool.[ch]: removed the stuff here.
* tools/pdbgen/pdb/tools.pdb: changed blend wrapper accordingly.
* app/pdb/tools_cmds.c: regenerated.
* tools/pdbgen/Makefile.am: don't scan tools/gimpblendtool.c.
* tools/pdbgen/enums.pl: regenerated.
* app/tools/gimpbucketfilltool.c: fixed crash caused by my last
change.
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.c: removed lots of uglyness by
using GtkImages for the qmask and navigation buttons. Don't realize
anything before the shell is shown. Connect the realize
callback and do stuff there. Don't call the realize callback
from gimp_display_shell_canvas_events() any more.
* pixmaps/navbutton.xpm
* pixmaps/qmasknosel.xpm
* pixmaps/qmasksel.xpm: removed.
* themes/Default/Makefile.am
* themes/Default/images/Makefile.am
* themes/Default/images/stock-menu-navigation.png
* themes/Default/images/stock-menu-qmask-off.png
* themes/Default/images/stock-menu-qmask-on.png: new PNGs instead.
* libgimpwidgets/gimpstock.[ch]: register them as stock icons.
2001-11-09 Sven Neumann <sven@gimp.org>
* app/gui/file-open-dialog.c: merged fix for bug #63880 from stable
......
......@@ -48,6 +48,8 @@ libappcore_a_sources = @STRIP_BEGIN@ \
gimpdocuments.h \
gimpdrawable.c \
gimpdrawable.h \
gimpdrawable-blend.c \
gimpdrawable-blend.h \
gimpdrawable-bucket-fill.c \
gimpdrawable-bucket-fill.h \
gimpdrawable-desaturate.c \
......
......@@ -163,6 +163,36 @@ typedef enum
PATTERN_BUCKET_FILL
} BucketFillMode;
typedef enum
{
LINEAR,
BILINEAR,
RADIAL,
SQUARE,
CONICAL_SYMMETRIC,
CONICAL_ASYMMETRIC,
SHAPEBURST_ANGULAR,
SHAPEBURST_SPHERICAL,
SHAPEBURST_DIMPLED,
SPIRAL_CLOCKWISE,
SPIRAL_ANTICLOCKWISE
} GradientType;
typedef enum /*< chop=_MODE >*/
{
FG_BG_RGB_MODE,
FG_BG_HSV_MODE,
FG_TRANS_MODE,
CUSTOM_MODE
} BlendMode;
typedef enum
{
REPEAT_NONE,
REPEAT_SAWTOOTH,
REPEAT_TRIANGULAR
} RepeatMode;
/* base objects */
......
This diff is collapsed.
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* 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.
*/
#ifndef __GIMP_DRAWABLE_BLEND_H__
#define __GIMP_DRAWABLE_BLEND_H__
void gimp_drawable_blend (GimpDrawable *drawable,
BlendMode blend_mode,
gint paint_mode,
GradientType gradient_type,
gdouble opacity,
gdouble offset,
RepeatMode repeat,
gint supersample,
gint max_depth,
gdouble threshold,
gdouble startx,
gdouble starty,
gdouble endx,
gdouble endy,
GimpProgressFunc progress_callback,
gpointer progress_data);
#endif /* __GIMP_DRAWABLE_BLEND_H__ */
......@@ -45,9 +45,7 @@
#include "core/gimpparasite.h"
#include "core/gimpparasitelist.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h"
#include "display/gimpdisplayshell.h"
#include "tools/gimpbycolorselecttool.h"
#include "tools/gimptool.h"
......@@ -2029,6 +2027,7 @@ undo_push_fs_to_layer (GimpImage *gimage,
else
{
tile_manager_destroy (fsu->layer->fs.backing_store);
fsu->layer->fs.backing_store = NULL;
g_free (fsu);
return FALSE;
}
......@@ -2109,7 +2108,11 @@ undo_free_fs_to_layer (UndoState state,
fsu = (FStoLayerUndo *) fsu_ptr;
if (state == UNDO)
tile_manager_destroy (fsu->layer->fs.backing_store);
{
tile_manager_destroy (fsu->layer->fs.backing_store);
fsu->layer->fs.backing_store = NULL;
}
g_free (fsu);
}
......
......@@ -173,6 +173,8 @@ gdisplay_new (GimpImage *gimage,
/* create the shell for the image */
gdisp->shell = gimp_display_shell_new (gdisp);
gtk_widget_show (gdisp->shell);
return gdisp;
}
......
......@@ -173,6 +173,8 @@ gdisplay_new (GimpImage *gimage,
/* create the shell for the image */
gdisp->shell = gimp_display_shell_new (gdisp);
gtk_widget_show (gdisp->shell);
return gdisp;
}
......
......@@ -166,6 +166,13 @@ gimp_display_shell_canvas_realize (GtkWidget *canvas,
gdisp = shell->gdisp;
gtk_widget_grab_focus (shell->canvas);
gdk_window_set_back_pixmap (shell->canvas->window, NULL, FALSE);
gimp_display_shell_resize_cursor_label (shell);
gimp_display_shell_update_title (shell);
/* create the selection object */
gdisp->select = selection_create (canvas->window,
gdisp,
......@@ -190,6 +197,12 @@ gimp_display_shell_canvas_realize (GtkWidget *canvas,
/* setup scale properly */
gimp_display_shell_scale_setup (shell);
/* set the initial cursor */
gimp_display_shell_install_tool_cursor (shell,
GDK_TOP_LEFT_ARROW,
GIMP_TOOL_CURSOR_NONE,
GIMP_CURSOR_MODIFIER_NONE);
}
static void
......@@ -290,7 +303,7 @@ gimp_display_shell_canvas_events (GtkWidget *canvas,
if (! canvas->window)
{
g_warning ("imp_display_shell_canvas_events(): called unrealized");
g_warning ("gimp_display_shell_canvas_events(): called unrealized");
return FALSE;
}
......@@ -298,12 +311,6 @@ gimp_display_shell_canvas_events (GtkWidget *canvas,
active_tool = tool_manager_get_active (gdisp->gimage->gimp);
/* FIXME */
if (! gdisp->select)
{
gimp_display_shell_canvas_realize (shell->canvas, shell);
}
/* Find out what device the event occurred upon */
if (! gdisp->gimage->gimp->busy && devices_check_change (event))
gimp_display_shell_check_device_cursor (shell);
......
......@@ -66,10 +66,6 @@
#include "gdisplay_color.h"
#endif /* DISPLAY_FILTERS */
#include "pixmaps/qmasksel.xpm"
#include "pixmaps/qmasknosel.xpm"
#include "pixmaps/navbutton.xpm"
#include "libgimp/gimpintl.h"
#include "pixmaps/wilber.xpm"
......@@ -321,33 +317,23 @@ gimp_display_shell_delete_event (GtkWidget *widget,
GtkWidget *
gimp_display_shell_new (GimpDisplay *gdisp)
{
static GdkPixmap *qmasksel_pixmap = NULL;
static GdkBitmap *qmasksel_mask = NULL;
static GdkPixmap *qmasknosel_pixmap = NULL;
static GdkBitmap *qmasknosel_mask = NULL;
static GdkPixmap *navbutton_pixmap = NULL;
static GdkBitmap *navbutton_mask = NULL;
GimpDisplayShell *shell;
GtkWidget *main_vbox;
GtkWidget *disp_vbox;
GtkWidget *upper_hbox;
GtkWidget *lower_hbox;
GtkWidget *inner_table;
GtkWidget *status_hbox;
GtkWidget *arrow;
GtkWidget *pixmap;
GtkWidget *label_frame;
GtkWidget *nav_ebox;
GSList *group = NULL;
gint image_width, image_height;
gint n_width, n_height;
gint s_width, s_height;
gint scalesrc, scaledest;
gint contextid;
GtkWidget *main_vbox;
GtkWidget *disp_vbox;
GtkWidget *upper_hbox;
GtkWidget *lower_hbox;
GtkWidget *inner_table;
GtkWidget *status_hbox;
GtkWidget *arrow;
GtkWidget *image;
GtkWidget *label_frame;
GtkWidget *nav_ebox;
GSList *group = NULL;
gint image_width, image_height;
gint n_width, n_height;
gint s_width, s_height;
gint scalesrc, scaledest;
gint contextid;
g_return_val_if_fail (GIMP_IS_DISPLAY (gdisp), NULL);
......@@ -594,14 +580,9 @@ gimp_display_shell_new (GimpDisplay *gdisp)
gtk_widget_set_extension_events (shell->canvas, GDK_EXTENSION_EVENTS_ALL);
GTK_WIDGET_SET_FLAGS (shell->canvas, GTK_CAN_FOCUS);
#if 0
FIXME
g_signal_connect (G_OBJECT (shell->canvas), "realize",
G_CALLBACK (gimp_display_shell_canvas_events),
G_CALLBACK (gimp_display_shell_canvas_realize),
shell);
#endif
/* set the active display before doing any other canvas event processing */
g_signal_connect (G_OBJECT (shell->canvas), "event",
......@@ -617,25 +598,36 @@ gimp_display_shell_new (GimpDisplay *gdisp)
/* the qmask buttons */
shell->qmaskoff = gtk_radio_button_new (group);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (shell->qmaskoff));
gtk_widget_set_usize (GTK_WIDGET (shell->qmaskoff), 15, 15);
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (shell->qmaskoff), FALSE);
GTK_WIDGET_UNSET_FLAGS (shell->qmaskoff, GTK_CAN_FOCUS);
g_signal_connect (G_OBJECT (shell->qmaskoff), "toggled",
G_CALLBACK (qmask_deactivate_callback),
gdisp);
g_signal_connect (G_OBJECT (shell->qmaskoff), "button_press_event",
G_CALLBACK (qmask_button_press_callback),
gdisp);
image = gtk_image_new_from_stock (GIMP_STOCK_QMASK_OFF, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (shell->qmaskoff), image);
gtk_widget_show (image);
gimp_help_set_help_data (shell->qmaskoff, NULL, "#qmask_off_button");
shell->qmaskon = gtk_radio_button_new (group);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (shell->qmaskon));
gtk_widget_set_usize (GTK_WIDGET (shell->qmaskon), 15, 15);
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (shell->qmaskon), FALSE);
GTK_WIDGET_UNSET_FLAGS (shell->qmaskon, GTK_CAN_FOCUS);
image = gtk_image_new_from_stock (GIMP_STOCK_QMASK_ON, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (shell->qmaskon), image);
gtk_widget_show (image);
if (gdisp->gimage->qmask_state)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shell->qmaskon), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shell->qmaskoff), TRUE);
g_signal_connect (G_OBJECT (shell->qmaskoff), "toggled",
G_CALLBACK (qmask_deactivate_callback),
gdisp);
g_signal_connect (G_OBJECT (shell->qmaskoff), "button_press_event",
G_CALLBACK (qmask_button_press_callback),
gdisp);
g_signal_connect (G_OBJECT (shell->qmaskon), "toggled",
G_CALLBACK (qmask_activate_callback),
gdisp);
......@@ -645,49 +637,19 @@ gimp_display_shell_new (GimpDisplay *gdisp)
gimp_help_set_help_data (shell->qmaskon, NULL, "#qmask_on_button");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shell->qmaskoff), TRUE);
/* the navigation window button */
nav_ebox = gtk_event_box_new ();
image = gtk_image_new_from_stock (GIMP_STOCK_NAVIGATION, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (nav_ebox), image);
gtk_widget_show (image);
g_signal_connect (G_OBJECT (nav_ebox), "button_press_event",
G_CALLBACK (nav_popup_click_handler),
gdisp);
gimp_help_set_help_data (nav_ebox, NULL, "#nav_window_button");
/* We need to realize the shell so that we have a GdkWindow for
* the pixmap creation.
*/
/* EEK */ gdisp->shell = GTK_WIDGET (shell);
gtk_widget_realize (GTK_WIDGET (shell));
/* create the pixmaps ****************************************************/
if (! qmasksel_pixmap)
{
GtkStyle *style;
style = gtk_widget_get_style (GTK_WIDGET (shell));
qmasksel_pixmap =
gdk_pixmap_create_from_xpm_d (GTK_WIDGET (shell)->window,
&qmasksel_mask,
&style->bg[GTK_STATE_NORMAL],
qmasksel_xpm);
qmasknosel_pixmap =
gdk_pixmap_create_from_xpm_d (GTK_WIDGET (shell)->window,
&qmasknosel_mask,
&style->bg[GTK_STATE_NORMAL],
qmasknosel_xpm);
navbutton_pixmap =
gdk_pixmap_create_from_xpm_d (GTK_WIDGET (shell)->window,
&navbutton_mask,
&style->bg[GTK_STATE_NORMAL],
navbutton_xpm);
}
/* Icon stuff */
g_signal_connect (G_OBJECT (gdisp->gimage), "invalidate_preview",
G_CALLBACK (gimp_display_shell_update_icon_scheduler),
......@@ -695,19 +657,6 @@ gimp_display_shell_new (GimpDisplay *gdisp)
gimp_display_shell_update_icon_scheduler (gdisp->gimage, shell);
/* create the GtkPixmaps */
pixmap = gtk_pixmap_new (qmasksel_pixmap, qmasksel_mask);
gtk_container_add (GTK_CONTAINER (shell->qmaskon), pixmap);
gtk_widget_show (pixmap);
pixmap = gtk_pixmap_new (qmasknosel_pixmap, qmasknosel_mask);
gtk_container_add (GTK_CONTAINER (shell->qmaskoff), pixmap);
gtk_widget_show (pixmap);
pixmap = gtk_pixmap_new (navbutton_pixmap, navbutton_mask);
gtk_container_add (GTK_CONTAINER (nav_ebox), pixmap);
gtk_widget_show (pixmap);
/* create the contents of the status area *********************************/
/* the cursor label */
......@@ -791,32 +740,7 @@ gimp_display_shell_new (GimpDisplay *gdisp)
gtk_widget_show (shell->statusarea);
}
gtk_widget_realize (shell->canvas);
gdk_window_set_back_pixmap (shell->canvas->window, NULL, FALSE);
/* we need to realize the cursor_label widget here, so the size gets
* computed correctly
*/
gtk_widget_realize (shell->cursor_label);
gimp_display_shell_resize_cursor_label (shell);
gtk_widget_show (main_vbox);
gtk_widget_show (GTK_WIDGET (shell));
/* set the focus to the canvas area */
gtk_widget_grab_focus (shell->canvas);
/* update the title */
gimp_display_shell_update_title (shell);
/* set the qmask buttons */
qmask_buttons_update (gdisp);
/* set the current tool cursor */
gimp_display_shell_install_tool_cursor (shell,
GDK_TOP_LEFT_ARROW,
GIMP_TOOL_CURSOR_NONE,
GIMP_CURSOR_MODIFIER_NONE);
return GTK_WIDGET (shell);
}
......
......@@ -66,10 +66,6 @@
#include "gdisplay_color.h"
#endif /* DISPLAY_FILTERS */
#include "pixmaps/qmasksel.xpm"
#include "pixmaps/qmasknosel.xpm"
#include "pixmaps/navbutton.xpm"
#include "libgimp/gimpintl.h"
#include "pixmaps/wilber.xpm"
......@@ -321,33 +317,23 @@ gimp_display_shell_delete_event (GtkWidget *widget,
GtkWidget *
gimp_display_shell_new (GimpDisplay *gdisp)
{
static GdkPixmap *qmasksel_pixmap = NULL;
static GdkBitmap *qmasksel_mask = NULL;
static GdkPixmap *qmasknosel_pixmap = NULL;
static GdkBitmap *qmasknosel_mask = NULL;
static GdkPixmap *navbutton_pixmap = NULL;
static GdkBitmap *navbutton_mask = NULL;
GimpDisplayShell *shell;
GtkWidget *main_vbox;
GtkWidget *disp_vbox;
GtkWidget *upper_hbox;
GtkWidget *lower_hbox;
GtkWidget *inner_table;
GtkWidget *status_hbox;
GtkWidget *arrow;
GtkWidget *pixmap;
GtkWidget *label_frame;
GtkWidget *nav_ebox;
GSList *group = NULL;
gint image_width, image_height;
gint n_width, n_height;
gint s_width, s_height;
gint scalesrc, scaledest;
gint contextid;
GtkWidget *main_vbox;
GtkWidget *disp_vbox;
GtkWidget *upper_hbox;
GtkWidget *lower_hbox;
GtkWidget *inner_table;
GtkWidget *status_hbox;
GtkWidget *arrow;
GtkWidget *image;
GtkWidget *label_frame;
GtkWidget *nav_ebox;
GSList *group = NULL;
gint image_width, image_height;
gint n_width, n_height;
gint s_width, s_height;
gint scalesrc, scaledest;
gint contextid;
g_return_val_if_fail (GIMP_IS_DISPLAY (gdisp), NULL);
......@@ -594,14 +580,9 @@ gimp_display_shell_new (GimpDisplay *gdisp)
gtk_widget_set_extension_events (shell->canvas, GDK_EXTENSION_EVENTS_ALL);
GTK_WIDGET_SET_FLAGS (shell->canvas, GTK_CAN_FOCUS);
#if 0
FIXME
g_signal_connect (G_OBJECT (shell->canvas), "realize",
G_CALLBACK (gimp_display_shell_canvas_events),
G_CALLBACK (gimp_display_shell_canvas_realize),
shell);
#endif
/* set the active display before doing any other canvas event processing */
g_signal_connect (G_OBJECT (shell->canvas), "event",
......@@ -617,25 +598,36 @@ gimp_display_shell_new (GimpDisplay *gdisp)
/* the qmask buttons */
shell->qmaskoff = gtk_radio_button_new (group);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (shell->qmaskoff));
gtk_widget_set_usize (GTK_WIDGET (shell->qmaskoff), 15, 15);
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (shell->qmaskoff), FALSE);
GTK_WIDGET_UNSET_FLAGS (shell->qmaskoff, GTK_CAN_FOCUS);
g_signal_connect (G_OBJECT (shell->qmaskoff), "toggled",
G_CALLBACK (qmask_deactivate_callback),
gdisp);
g_signal_connect (G_OBJECT (shell->qmaskoff), "button_press_event",
G_CALLBACK (qmask_button_press_callback),
gdisp);
image = gtk_image_new_from_stock (GIMP_STOCK_QMASK_OFF, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (shell->qmaskoff), image);
gtk_widget_show (image);
gimp_help_set_help_data (shell->qmaskoff, NULL, "#qmask_off_button");
shell->qmaskon = gtk_radio_button_new (group);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (shell->qmaskon));
gtk_widget_set_usize (GTK_WIDGET (shell->qmaskon), 15, 15);
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (shell->qmaskon), FALSE);
GTK_WIDGET_UNSET_FLAGS (shell->qmaskon, GTK_CAN_FOCUS);
image = gtk_image_new_from_stock (GIMP_STOCK_QMASK_ON, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (shell->qmaskon), image);
gtk_widget_show (image);
if (gdisp->gimage->qmask_state)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shell->qmaskon), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shell->qmaskoff), TRUE);
g_signal_connect (G_OBJECT (shell->qmaskoff), "toggled",
G_CALLBACK (qmask_deactivate_callback),
gdisp);
g_signal_connect (G_OBJECT (shell->qmaskoff), "button_press_event",
G_CALLBACK (qmask_button_press_callback),
gdisp);
g_signal_connect (G_OBJECT (shell->qmaskon), "toggled",
G_CALLBACK (qmask_activate_callback),
gdisp);
......@@ -645,49 +637,19 @@ gimp_display_shell_new (GimpDisplay *gdisp)
gimp_help_set_help_data (shell->qmaskon, NULL, "#qmask_on_button");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shell->qmaskoff), TRUE);
/* the navigation window button */
nav_ebox = gtk_event_box_new ();
image = gtk_image_new_from_stock (GIMP_STOCK_NAVIGATION, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (nav_ebox), image);
gtk_widget_show (image);
g_signal_connect (G_OBJECT (nav_ebox), "button_press_event",
G_CALLBACK (nav_popup_click_handler),
gdisp);
gimp_help_set_help_data (nav_ebox, NULL, "#nav_window_button");
/* We need to realize the shell so that we have a GdkWindow for
* the pixmap creation.
*/
/* EEK */ gdisp->shell = GTK_WIDGET (shell);
gtk_widget_realize (GTK_WIDGET (shell));
/* create the pixmaps ****************************************************/