diff options
author | Xan Lopez <xan@igalia.com> | 2012-10-07 22:37:57 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-10-07 22:37:57 +0800 |
commit | 899960fd491389cb3b4bdcbd52837c55061453e2 (patch) | |
tree | adfa3bef0f60e6b16c89f31e93cc8d1843084881 /src/window-commands.c | |
parent | 771f05be192dac3d9f393219191192345165589e (diff) | |
download | gsoc2013-epiphany-899960fd491389cb3b4bdcbd52837c55061453e2.tar gsoc2013-epiphany-899960fd491389cb3b4bdcbd52837c55061453e2.tar.gz gsoc2013-epiphany-899960fd491389cb3b4bdcbd52837c55061453e2.tar.bz2 gsoc2013-epiphany-899960fd491389cb3b4bdcbd52837c55061453e2.tar.lz gsoc2013-epiphany-899960fd491389cb3b4bdcbd52837c55061453e2.tar.xz gsoc2013-epiphany-899960fd491389cb3b4bdcbd52837c55061453e2.tar.zst gsoc2013-epiphany-899960fd491389cb3b4bdcbd52837c55061453e2.zip |
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
Diffstat (limited to 'src/window-commands.c')
-rw-r--r-- | src/window-commands.c | 63 |
1 files changed, 63 insertions, 0 deletions
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" @@ -718,6 +719,22 @@ window_cmd_file_close_window (GtkAction *action, } 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) { @@ -930,6 +947,52 @@ window_cmd_edit_find_prev (GtkAction *action, } 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) { |