[evince] Show the action menu when F10 is pressed
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] Show the action menu when F10 is pressed
- Date: Sat, 2 Feb 2013 14:30:57 +0000 (UTC)
commit 98511ff3e7ed9ed38ea7c65e9a5a7d798dec788b
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sat Feb 2 15:29:41 2013 +0100
Show the action menu when F10 is pressed
https://bugzilla.gnome.org/show_bug.cgi?id=692909
shell/ev-toolbar.c | 9 +++++++++
shell/ev-toolbar.h | 1 +
shell/ev-window.c | 8 ++++++++
shell/evince-ui.xml | 1 +
4 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index ef39514..20d3aca 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -316,3 +316,12 @@ ev_toolbar_has_visible_popups (EvToolbar *ev_toolbar)
return FALSE;
}
+
+void
+ev_toolbar_action_menu_popup (EvToolbar *ev_toolbar)
+{
+ g_return_if_fail (EV_IS_TOOLBAR (ev_toolbar));
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ev_toolbar->priv->action_menu_button),
+ TRUE);
+}
diff --git a/shell/ev-toolbar.h b/shell/ev-toolbar.h
index 71d30ee..0c54932 100644
--- a/shell/ev-toolbar.h
+++ b/shell/ev-toolbar.h
@@ -50,6 +50,7 @@ struct _EvToolbarClass {
GType ev_toolbar_get_type (void);
GtkWidget *ev_toolbar_new (EvWindow *window);
gboolean ev_toolbar_has_visible_popups (EvToolbar *ev_toolbar);
+void ev_toolbar_action_menu_popup (EvToolbar *ev_toolbar);
G_END_DECLS
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 047e5b3..603b681 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -4984,6 +4984,12 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window)
}
static void
+ev_window_cmd_action_menu (GtkAction *action, EvWindow *ev_window)
+{
+ ev_toolbar_action_menu_popup (EV_TOOLBAR (ev_window->priv->toolbar));
+}
+
+static void
ev_window_view_sidebar_cb (GtkAction *action, EvWindow *ev_window)
{
if (EV_WINDOW_IS_PRESENTATION (ev_window))
@@ -5903,6 +5909,8 @@ static const GtkActionEntry entries[] = {
G_CALLBACK (ev_window_cmd_fit_page) },
{ "FitWidth", EV_STOCK_ZOOM_WIDTH, NULL, "w", NULL,
G_CALLBACK (ev_window_cmd_fit_width) },
+ { "F10", NULL, "", "F10", NULL,
+ G_CALLBACK (ev_window_cmd_action_menu) },
};
/* Toggle items */
diff --git a/shell/evince-ui.xml b/shell/evince-ui.xml
index feecef0..b791b53 100644
--- a/shell/evince-ui.xml
+++ b/shell/evince-ui.xml
@@ -111,4 +111,5 @@
<accelerator name="CtrlInsertAccel" action="CtrlInsert" />
<accelerator name="FitPageAccel" action ="FitPage" />
<accelerator name="FitWidthAccel" action ="FitWidth" />
+ <accelerator name="F10Accel" action="F10" />
</ui>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]