From 899960fd491389cb3b4bdcbd52837c55061453e2 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sun, 7 Oct 2012 10:37:57 -0400 Subject: Merge the app menu into the gear menu when we are not in the Shell Gets rid of the ugly menubar with a single menu. https://bugzilla.gnome.org/show_bug.cgi?id=673054 --- src/window-commands.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'src/window-commands.c') diff --git a/src/window-commands.c b/src/window-commands.c index 4b4fcb23a..81ba0f0bb 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -43,6 +43,7 @@ #include "ephy-notebook.h" #include "ephy-prefs.h" #include "ephy-private.h" +#include "ephy-session.h" #include "ephy-settings.h" #include "ephy-shell.h" #include "ephy-state.h" @@ -717,6 +718,22 @@ window_cmd_file_close_window (GtkAction *action, g_signal_emit_by_name (notebook, "tab-close-request", embed); } +void +window_cmd_file_quit (GtkAction *action, + EphyWindow *window) +{ + if (ephy_session_close_all_windows (EPHY_SESSION (ephy_shell_get_session (ephy_shell)))) + g_application_quit (g_application_get_default ()); +} + +void +window_cmd_file_new_window (GtkAction *action, + EphyWindow *window) +{ + ephy_shell_new_tab (ephy_shell, NULL, NULL, NULL, + EPHY_NEW_TAB_IN_NEW_WINDOW | EPHY_NEW_TAB_HOME_PAGE); +} + void window_cmd_edit_undo (GtkAction *action, EphyWindow *window) @@ -929,6 +946,52 @@ window_cmd_edit_find_prev (GtkAction *action, ephy_find_toolbar_find_previous (toolbar); } +void +window_cmd_edit_bookmarks (GtkAction *action, + EphyWindow *window) +{ + GtkWidget *bwindow; + + bwindow = ephy_shell_get_bookmarks_editor (ephy_shell); + gtk_window_present (GTK_WINDOW (bwindow)); +} + +void +window_cmd_edit_history (GtkAction *action, + EphyWindow *window) +{ + GtkWidget *hwindow; + + hwindow = ephy_shell_get_history_window (ephy_shell); + gtk_window_present (GTK_WINDOW (hwindow)); +} + +void +window_cmd_edit_preferences (GtkAction *action, + EphyWindow *window) +{ + EphyDialog *dialog; + + dialog = EPHY_DIALOG (ephy_shell_get_prefs_dialog (ephy_shell)); + + ephy_dialog_show (dialog); +} + +void +window_cmd_edit_personal_data (GtkAction *action, + EphyWindow *window) +{ + PdmDialog *dialog; + + dialog = EPHY_PDM_DIALOG (ephy_shell_get_pdm_dialog (ephy_shell)); + /* FIXME?: pdm_dialog_open is supposed to scroll to the host passed + * as second parameters in the cookies tab. Honestly I think this + * has been broken for a while. In any case it's probably not + * relevant here, although we could get the host of the last active + * ephy window, I guess. */ + pdm_dialog_open (dialog, NULL); +} + void window_cmd_view_fullscreen (GtkAction *action, EphyWindow *window) -- cgit v1.2.3