aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-commands.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-02-24 02:12:56 +0800
committerChristian Persch <chpe@src.gnome.org>2006-02-24 02:12:56 +0800
commit6adeef32a02be322003fc19d77da410f31d8b5b3 (patch)
tree46d8fca893313217949e03c37f9423678b9fcc30 /src/window-commands.c
parent073edc0cbfc5b9eb332c15fa0b294a113e753080 (diff)
downloadgsoc2013-epiphany-6adeef32a02be322003fc19d77da410f31d8b5b3.tar.gz
gsoc2013-epiphany-6adeef32a02be322003fc19d77da410f31d8b5b3.tar.zst
gsoc2013-epiphany-6adeef32a02be322003fc19d77da410f31d8b5b3.zip
Use the same machanism for Ctrl-W as clicking the tab's close button.
2006-02-23 Christian Persch <chpe@cvs.gnome.org> * src/window-commands.c: (window_cmd_file_close_window), (window_cmd_help_about): Use the same machanism for Ctrl-W as clicking the tab's close button. Fixes bug #319530.
Diffstat (limited to 'src/window-commands.c')
-rw-r--r--src/window-commands.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/window-commands.c b/src/window-commands.c
index 214b81793..e8e1fdc28 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -332,18 +332,21 @@ void
window_cmd_file_close_window (GtkAction *action,
EphyWindow *window)
{
- EphyEmbed *embed;
+ GtkWidget *notebook;
+ EphyTab *tab;
+
+ notebook = ephy_window_get_notebook (window);
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_QUIT) &&
- gtk_notebook_get_n_pages (GTK_NOTEBOOK (ephy_window_get_notebook (window))) == 1)
+ gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) == 1)
{
return;
}
- embed = ephy_window_get_active_embed (window);
- g_return_if_fail (embed != NULL);
+ tab = ephy_window_get_active_tab (window);
+ g_return_if_fail (tab != NULL);
- ephy_embed_close (embed);
+ g_signal_emit_by_name (notebook, "tab-close-request", tab);
}
void
@@ -753,8 +756,11 @@ window_cmd_help_about (GtkAction *action,
comments = g_strdup_printf (_("Using ā€œ%sā€ backend"),
ephy_embed_single_get_backend_name (single));
- licence = g_strdup_printf ("%s\n\n%s\n\n%s",
- _(licence_part[0]), _(licence_part[1]), _(licence_part[2]));
+ licence = g_strjoin ("\n\n",
+ _(licence_part[0]),
+ _(licence_part[1]),
+ _(licence_part[2]),
+ NULL);
gtk_show_about_dialog (GTK_WINDOW (window),
"name", _("GNOME Web Browser"),