EvDocument *document;
EvWindowPageMode page_mode;
EvView *view;
+ gboolean sensitive;
document = ev_window->priv->document;
page_mode = ev_window->priv->page_mode;
/* "FileCloseWindow": always sensitive */
/* Edit menu */
- set_action_sensitive (ev_window, "EditCopy", document!=NULL);
- set_action_sensitive (ev_window, "EditSelectAll", document!=NULL);
+
+ sensitive = document && ev_document_can_get_text (document);
+ set_action_sensitive (ev_window, "EditCopy", sensitive);
+ set_action_sensitive (ev_window, "EditSelectAll", sensitive);
if (document)
set_action_sensitive (ev_window, "EditFind", EV_IS_DOCUMENT_FIND (document));
gtk_window_unfullscreen (GTK_WINDOW (window));
}
+static void
+ev_window_cmd_escape (GtkAction *action, EvWindow *window)
+{
+ GtkWidget *widget;
+
+ widget = gtk_window_get_focus (GTK_WINDOW (window));
+ if (widget && gtk_widget_get_ancestor (widget, EGG_TYPE_FIND_BAR)) {
+ update_chrome_flag (window, EV_CHROME_FINDBAR, NULL, FALSE);
+ } else {
+ gtk_window_unfullscreen (GTK_WINDOW (window));
+ }
+}
+
static void
update_view_size (EvWindow *window)
{
G_CALLBACK (ev_window_cmd_help_about) },
/* Toolbar-only */
- { "LeaveFullscreen", EV_STOCK_LEAVE_FULLSCREEN, N_("Leave Fullscreen"), "Escape",
+ { "LeaveFullscreen", EV_STOCK_LEAVE_FULLSCREEN, N_("Leave Fullscreen"), NULL,
N_("Leave fullscreen mode"),
- G_CALLBACK (ev_window_cmd_leave_fullscreen) }
+ G_CALLBACK (ev_window_cmd_leave_fullscreen) },
+
+ { "Escape", NULL, N_("Selection Caret"), "Escape", "",
+ G_CALLBACK (ev_window_cmd_escape) }
};
/* Toggle items */
/*translators: this is the label for toolbar button*/
g_object_set (action, "short_label", _("Previous"), NULL);
g_object_set (action, "is-important", TRUE, NULL);
+
action = gtk_action_group_get_action (action_group, "GoNextPage");
- /*translators: this is the label for toolbar button*/
g_object_set (action, "is-important", TRUE, NULL);
+ /*translators: this is the label for toolbar button*/
g_object_set (action, "short_label", _("Next"), NULL);
+
+ action = gtk_action_group_get_action (action_group, "ViewZoomIn");
+ /*translators: this is the label for toolbar button*/
+ g_object_set (action, "short_label", _("Zoom In"), NULL);
+ action = gtk_action_group_get_action (action_group, "ViewZoomIn");
+
+ action = gtk_action_group_get_action (action_group, "ViewZoomOut");
+ /*translators: this is the label for toolbar button*/
+ g_object_set (action, "short_label", _("Zoom Out"), NULL);
+ action = gtk_action_group_get_action (action_group, "ViewZoomIn");
+
+ action = gtk_action_group_get_action (action_group, "ViewBestFit");
+ /*translators: this is the label for toolbar button*/
+ g_object_set (action, "short_label", _("Best Fit"), NULL);
+ action = gtk_action_group_get_action (action_group, "ViewZoomIn");
+
action = gtk_action_group_get_action (action_group, "ViewPageWidth");
/*translators: this is the label for toolbar button*/
g_object_set (action, "short_label", _("Fit Width"), NULL);