Removed. (impl_finalize): New. (class_init): Install finalize handler, not
* 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. svn path=/trunk/; revision=18534
This commit is contained in:
@ -1,3 +1,14 @@
|
||||
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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user