diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-08-21 06:24:48 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-08-21 06:24:48 +0800 |
commit | 6e5f92630e7efd2f871bbeb592c1a2c096b17829 (patch) | |
tree | 2c73a2d2523ab25ca5acd5da6e4cb4766366d22f /src | |
parent | 79755c0056e7777fc5786f771e7ecf07be77bfef (diff) | |
download | gsoc2013-epiphany-6e5f92630e7efd2f871bbeb592c1a2c096b17829.tar gsoc2013-epiphany-6e5f92630e7efd2f871bbeb592c1a2c096b17829.tar.gz gsoc2013-epiphany-6e5f92630e7efd2f871bbeb592c1a2c096b17829.tar.bz2 gsoc2013-epiphany-6e5f92630e7efd2f871bbeb592c1a2c096b17829.tar.lz gsoc2013-epiphany-6e5f92630e7efd2f871bbeb592c1a2c096b17829.tar.xz gsoc2013-epiphany-6e5f92630e7efd2f871bbeb592c1a2c096b17829.tar.zst gsoc2013-epiphany-6e5f92630e7efd2f871bbeb592c1a2c096b17829.zip |
Use class closure for delete event instead of signal handler.
2005-08-21 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-window.c: (ephy_window_delete_event),
(ephy_window_class_init), (ephy_window_init):
Use class closure for delete event instead of signal handler.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-window.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 538d6eddc..3a1a6821e 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -776,8 +776,11 @@ ephy_window_key_press_event (GtkWidget *widget, } static gboolean -ephy_window_delete_event_cb (GtkWidget *widget, GdkEvent *event, EphyWindow *window) +ephy_window_delete_event (GtkWidget *widget, + GdkEvent *event) { + EphyWindow *window = EPHY_WINDOW (widget); + EphyWindowPrivate *priv = window->priv; EphyTab *modified_tab = NULL; GList *tabs, *l; gboolean modified = FALSE; @@ -785,7 +788,7 @@ ephy_window_delete_event_cb (GtkWidget *widget, GdkEvent *event, EphyWindow *win /* Workaround a crash when closing a window while in print preview mode. See * mozilla bug #241809 */ - if (window->priv->ppv_mode) + if (priv->ppv_mode) { EphyEmbed *embed; @@ -831,6 +834,11 @@ ephy_window_delete_event_cb (GtkWidget *widget, GdkEvent *event, EphyWindow *win gtk_widget_hide (widget); /* proceed with window close */ + if (GTK_WIDGET_CLASS (parent_class)->delete_event) + { + return GTK_WIDGET_CLASS (parent_class)->delete_event (widget, event); + } + return FALSE; } @@ -2600,6 +2608,7 @@ ephy_window_class_init (EphyWindowClass *klass) widget_class->focus_in_event = ephy_window_focus_in_event; widget_class->focus_out_event = ephy_window_focus_out_event; widget_class->window_state_event = ephy_window_state_event; + widget_class->delete_event = ephy_window_delete_event; g_object_class_install_property (object_class, PROP_ACTIVE_TAB, @@ -2868,10 +2877,6 @@ ephy_window_init (EphyWindow *window) egg_editable_toolbar_set_model (EGG_EDITABLE_TOOLBAR (window->priv->toolbar), model); - g_signal_connect (window, "delete-event", - G_CALLBACK (ephy_window_delete_event_cb), - window); - /* other notifiers */ browse_with_caret_notifier (NULL, 0, NULL, window); window->priv->browse_with_caret_notifier_id = eel_gconf_notification_add |