X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=shell%2Fev-window.c;h=085f60ab9a9e9d98ca043e311273f8b6fb26ba92;hb=f7510970589ab3a687023b127803ae6d11d41aca;hp=2475de0af289d86378e74ce2ffd9ce9abe8370f8;hpb=ba8b43149d216ed8737107ed0525dd367166b8dc;p=evince.git diff --git a/shell/ev-window.c b/shell/ev-window.c index 2475de0a..085f60ab 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -55,6 +55,7 @@ #include "ev-application.h" #include "ev-stock-icons.h" #include "ev-file-helpers.h" +#include #include #include @@ -1921,16 +1922,46 @@ ev_window_sizing_mode_changed_cb (EvView *view, GParamSpec *pspec, update_sizing_buttons (ev_window); } +static char * +build_comments_string (void) +{ + PopplerBackend backend; + const char *backend_name; + const char *version; + + backend = poppler_get_backend (); + version = poppler_get_version (); + switch (backend) { + case POPPLER_BACKEND_CAIRO: + backend_name = "cairo"; + break; + case POPPLER_BACKEND_SPLASH: + backend_name = "splash"; + break; + default: + backend_name = "unknown"; + break; + } + + return g_strdup_printf (_("PostScript and PDF File Viewer.\n" + "Using poppler %s (%s)"), + version, backend_name); +} + static void ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window) { const char *authors[] = { - N_("Many..."), + "Martin Kretzschmar ", + "Jonathan Blandford ", + "Marco Pesenti Gritti ", + "Nickolay V. Shmyrev ", + "Bryan Clark ", NULL }; const char *documenters[] = { - N_("Not so many..."), + "Nickolay V. Shmyrev ", NULL }; @@ -1949,6 +1980,7 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window) }; char *license_trans; + char *comments; #ifdef ENABLE_NLS const char **p; @@ -1962,6 +1994,7 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window) license_trans = g_strconcat (_(license[0]), "\n", _(license[1]), "\n", _(license[2]), "\n", NULL); + comments = build_comments_string (); gtk_show_about_dialog ( GTK_WINDOW (ev_window), @@ -1971,12 +2004,13 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window) _("\xc2\xa9 1996-2004 The Evince authors"), "license", license_trans, "website", "http://www.gnome.org/projects/evince", - "comments", _("PostScript and PDF File Viewer."), + "comments", comments, "authors", authors, "documenters", documenters, "translator-credits", _("translator-credits"), NULL); + g_free (comments); g_free (license_trans); } @@ -2436,6 +2470,25 @@ drag_data_received_cb (GtkWidget *widget, GdkDragContext *context, } } +static void +activate_link_cb (EvPageAction *page_action, EvLink *link, EvWindow *window) +{ + g_return_if_fail (EV_IS_WINDOW (window)); + + ev_page_cache_set_link (window->priv->page_cache, link); + gtk_widget_grab_focus (window->priv->view); +} + +static gboolean +activate_label_cb (EvPageAction *page_action, char *label, EvWindow *window) +{ + g_return_val_if_fail (EV_IS_WINDOW (window), FALSE); + + gtk_widget_grab_focus (window->priv->view); + + return ev_page_cache_set_page_label (window->priv->page_cache, label); +} + static void register_custom_actions (EvWindow *window, GtkActionGroup *group) { @@ -2447,6 +2500,10 @@ register_custom_actions (EvWindow *window, GtkActionGroup *group) "tooltip", _("Select Page"), "visible_overflown", FALSE, NULL); + g_signal_connect (action, "activate_link", + G_CALLBACK (activate_link_cb), window); + g_signal_connect (action, "activate_label", + G_CALLBACK (activate_label_cb), window); gtk_action_group_add_action (group, action); g_object_unref (action);