]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-window.c
Updated Czech translation.
[evince.git] / shell / ev-window.c
index 8dd0d6f927d24bebdb77a51dd9cec041befcc705..68940d5a640bea26edc30e63d4432a6e3519a0db 100644 (file)
@@ -183,6 +183,7 @@ update_action_sensitivity (EvWindow *ev_window)
        EvDocument *document;
        EvWindowPageMode page_mode;
        EvView *view;
+       gboolean sensitive;
 
        document = ev_window->priv->document;
        page_mode = ev_window->priv->page_mode;
@@ -195,8 +196,10 @@ update_action_sensitivity (EvWindow *ev_window)
        /* "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));
@@ -1658,6 +1661,19 @@ ev_window_cmd_leave_fullscreen (GtkAction *action, EvWindow *window)
        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)
 {
@@ -2152,9 +2168,12 @@ static GtkActionEntry entries[] = {
          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 */
@@ -2230,10 +2249,27 @@ set_action_properties (GtkActionGroup *action_group)
        /*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);