diff options
-rw-r--r-- | shell/ChangeLog | 11 | ||||
-rw-r--r-- | shell/e-shell-about-box.c | 36 | ||||
-rw-r--r-- | shell/e-shell-about-box.h | 1 | ||||
-rw-r--r-- | shell/e-shell-view-menu.c | 6 |
4 files changed, 24 insertions, 30 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 57328b9bdb..3b6b1f0969 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,5 +1,16 @@ 2002-11-04 Ettore Perazzoli <ettore@ximian.com> + * e-shell-about-box.c (impl_destroy): Removed. + (impl_finalize): New. + (class_init): Install finalize handler, not destroy. + + * e-shell-view-menu.c (command_about_box): Use a GtkWindow again. + Set the GTK_WINDOW_TYPE_HINT_DIALOG hint. + + * e-shell-about-box.c (e_shell_about_box_construct): Removed. + +2002-11-04 Ettore Perazzoli <ettore@ximian.com> + * e-shell-folder-commands.c (e_shell_command_copy_folder): Pass TRUE for arg allow_creation to e_shell_folder_selection_dialog_new(). diff --git a/shell/e-shell-about-box.c b/shell/e-shell-about-box.c index 22dd0a7829..49382cdf99 100644 --- a/shell/e-shell-about-box.c +++ b/shell/e-shell-about-box.c @@ -206,10 +206,10 @@ timeout_callback (void *data) } -/* GtkObject methods. */ +/* GObject methods. */ static void -impl_destroy (GtkObject *object) +impl_finalize (GObject *object) { EShellAboutBox *about_box; EShellAboutBoxPrivate *priv; @@ -217,31 +217,23 @@ impl_destroy (GtkObject *object) about_box = E_SHELL_ABOUT_BOX (object); priv = about_box->priv; - if (priv->pixmap != NULL) { + if (priv->pixmap != NULL) gdk_pixmap_unref (priv->pixmap); - priv->pixmap = NULL; - } - if (priv->text_background_pixmap != NULL) { + if (priv->text_background_pixmap != NULL) gdk_pixmap_unref (priv->text_background_pixmap); - priv->text_background_pixmap = NULL; - } - if (priv->clipped_gc != NULL) { + if (priv->clipped_gc != NULL) gdk_gc_unref (priv->clipped_gc); - priv->clipped_gc = NULL; - } - if (priv->timeout_id != -1) { + if (priv->timeout_id != -1) g_source_remove (priv->timeout_id); - priv->timeout_id = -1; - } g_free (priv->permuted_text); g_free (priv); - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + (* G_OBJECT_CLASS (parent_class)->finalize) (object); } @@ -349,13 +341,13 @@ impl_expose_event (GtkWidget *widget, static void -class_init (GtkObjectClass *object_class) +class_init (GObjectClass *object_class) { GtkWidgetClass *widget_class; parent_class = gtk_type_class (PARENT_TYPE); - object_class->destroy = impl_destroy; + object_class->finalize = impl_finalize; widget_class = GTK_WIDGET_CLASS (object_class); widget_class->size_request = impl_size_request; @@ -388,22 +380,12 @@ init (EShellAboutBox *shell_about_box) } -void -e_shell_about_box_construct (EShellAboutBox *about_box) -{ - g_return_if_fail (about_box != NULL); - g_return_if_fail (E_IS_SHELL_ABOUT_BOX (about_box)); - - /* Nothing to do here. */ -} - GtkWidget * e_shell_about_box_new (void) { EShellAboutBox *about_box; about_box = gtk_type_new (e_shell_about_box_get_type ()); - e_shell_about_box_construct (about_box); return GTK_WIDGET (about_box); } diff --git a/shell/e-shell-about-box.h b/shell/e-shell-about-box.h index fc00c8e5e2..301120c190 100644 --- a/shell/e-shell-about-box.h +++ b/shell/e-shell-about-box.h @@ -53,7 +53,6 @@ struct _EShellAboutBoxClass { GtkType e_shell_about_box_get_type (void); -void e_shell_about_box_construct (EShellAboutBox *about_box); GtkWidget *e_shell_about_box_new (void); #ifdef __cplusplus diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index 768d11dbf1..9d9177666a 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -47,7 +47,7 @@ #include <gtk/gtksignal.h> #include <gtk/gtkmain.h> -#include <gtk/gtkdialog.h> +#include <gtk/gtkwindow.h> #include <libgnome/gnome-exec.h> #include <libgnome/gnome-help.h> @@ -232,7 +232,9 @@ command_about_box (BonoboUIComponent *uih, about_box = e_shell_about_box_new (); gtk_widget_show (about_box); - about_box_window = gtk_dialog_new (); + about_box_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_type_hint (GTK_WINDOW (about_box_window), GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_window_set_policy (GTK_WINDOW (about_box_window), FALSE, FALSE, FALSE); g_signal_connect (about_box_window, "key_press_event", G_CALLBACK (about_box_event_callback), &about_box_window); |