Merge lp:~larsu/evince/port-popup-menu-to-gmenumodel into lp:~ubuntu-desktop/evince/ubuntu

Proposed by Lars Karlitski on 2014-03-03
Status: Merged
Merged at revision: 237
Proposed branch: lp:~larsu/evince/port-popup-menu-to-gmenumodel
Merge into: lp:~ubuntu-desktop/evince/ubuntu
Diff against target: 1739 lines (+811/-171)
1 file modified
debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch (+811/-171)
To merge this branch: bzr merge lp:~larsu/evince/port-popup-menu-to-gmenumodel
Reviewer Review Type Date Requested Status
Sebastien Bacher 2014-03-03 Approve on 2014-03-04
Review via email: mp+209068@code.launchpad.net

Commit message

menubar patch: port popup menus to GMenuModel

Description of the change

menubar patch: port popup menus to GMenuModel

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

Thanks, that works fine, I noticed that some menu items are missing (compared to the old/upstream version)

- copy
- select all
- open parent folder

Did you mean to drop those? Having at least the "copy" one seems like useful

review: Needs Information
Lars Karlitski (larsu) wrote :

> Thanks, that works fine, I noticed that some menu items are missing (compared
> to the old/upstream version)
>
> - copy
> - select all
> - open parent folder
>
> Did you mean to drop those? Having at least the "copy" one seems like useful

Ah thanks. I've overlooked them. Added them back in r238.

238. By Lars Karlitski on 2014-03-04

menubar patch: add missing items to popup menus

Sebastien Bacher (seb128) wrote :

great

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch'
--- debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch 2014-03-03 11:19:48 +0000
+++ debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch 2014-03-04 13:05:00 +0000
@@ -30,8 +30,8 @@
3030
31Index: evince-3.10.3/shell/Makefile.am31Index: evince-3.10.3/shell/Makefile.am
32===================================================================32===================================================================
33--- evince-3.10.3.orig/shell/Makefile.am 2014-03-03 12:17:53.199442435 +010033--- evince-3.10.3.orig/shell/Makefile.am 2014-03-04 14:02:21.045143557 +0100
34+++ evince-3.10.3/shell/Makefile.am 2014-03-03 12:17:53.183442435 +010034+++ evince-3.10.3/shell/Makefile.am 2014-03-04 14:02:21.029143557 +0100
35@@ -75,6 +75,8 @@35@@ -75,6 +75,8 @@
36 ev-sidebar-page.h \36 ev-sidebar-page.h \
37 ev-sidebar-thumbnails.c \37 ev-sidebar-thumbnails.c \
@@ -41,13 +41,13 @@
41 main.c41 main.c
42 42
43 nodist_evince_SOURCES = \43 nodist_evince_SOURCES = \
44@@ -172,12 +174,13 @@44@@ -172,12 +174,12 @@
45 45
46 EXTRA_DIST = \46 EXTRA_DIST = \
47 evince.css \47 evince.css \
48- evince-appmenu.ui \48- evince-appmenu.ui \
49 evince-icon.rc \49 evince-icon.rc \
50 evince-ui.xml \50- evince-ui.xml \
51 evince.gresource.xml \51 evince.gresource.xml \
52 ev-gdbus.xml \52 ev-gdbus.xml \
53- ev-daemon-gdbus.xml53- ev-daemon-gdbus.xml
@@ -59,8 +59,8 @@
59 $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate-source --c-name ev $<59 $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate-source --c-name ev $<
60Index: evince-3.10.3/shell/ev-application.c60Index: evince-3.10.3/shell/ev-application.c
61===================================================================61===================================================================
62--- evince-3.10.3.orig/shell/ev-application.c 2014-03-03 12:17:53.199442435 +010062--- evince-3.10.3.orig/shell/ev-application.c 2014-03-04 14:02:21.045143557 +0100
63+++ evince-3.10.3/shell/ev-application.c 2014-03-03 12:18:09.000000000 +010063+++ evince-3.10.3/shell/ev-application.c 2014-03-04 14:02:24.000000000 +0100
64@@ -42,6 +42,9 @@64@@ -42,6 +42,9 @@
65 #include "ev-application.h"65 #include "ev-application.h"
66 #include "ev-file-helpers.h"66 #include "ev-file-helpers.h"
@@ -447,8 +447,8 @@
447+}447+}
448Index: evince-3.10.3/shell/ev-application.h448Index: evince-3.10.3/shell/ev-application.h
449===================================================================449===================================================================
450--- evince-3.10.3.orig/shell/ev-application.h 2014-03-03 12:17:53.199442435 +0100450--- evince-3.10.3.orig/shell/ev-application.h 2014-03-04 14:02:21.045143557 +0100
451+++ evince-3.10.3/shell/ev-application.h 2014-03-03 12:17:53.183442435 +0100451+++ evince-3.10.3/shell/ev-application.h 2014-03-04 14:02:21.033143557 +0100
452@@ -81,6 +81,14 @@452@@ -81,6 +81,14 @@
453 GdkScreen *screen,453 GdkScreen *screen,
454 const char *topic);454 const char *topic);
@@ -466,8 +466,8 @@
466 #endif /* !EV_APPLICATION_H */466 #endif /* !EV_APPLICATION_H */
467Index: evince-3.10.3/shell/ev-bookmarks.c467Index: evince-3.10.3/shell/ev-bookmarks.c
468===================================================================468===================================================================
469--- evince-3.10.3.orig/shell/ev-bookmarks.c 2014-03-03 12:17:53.199442435 +0100469--- evince-3.10.3.orig/shell/ev-bookmarks.c 2014-03-04 14:02:21.045143557 +0100
470+++ evince-3.10.3/shell/ev-bookmarks.c 2014-03-03 12:17:53.183442435 +0100470+++ evince-3.10.3/shell/ev-bookmarks.c 2014-03-04 14:02:21.033143557 +0100
471@@ -224,6 +224,14 @@471@@ -224,6 +224,14 @@
472 return g_list_copy (bookmarks->items);472 return g_list_copy (bookmarks->items);
473 }473 }
@@ -485,8 +485,8 @@
485 EvBookmark *bookmark)485 EvBookmark *bookmark)
486Index: evince-3.10.3/shell/ev-bookmarks.h486Index: evince-3.10.3/shell/ev-bookmarks.h
487===================================================================487===================================================================
488--- evince-3.10.3.orig/shell/ev-bookmarks.h 2014-03-03 12:17:53.199442435 +0100488--- evince-3.10.3.orig/shell/ev-bookmarks.h 2014-03-04 14:02:21.045143557 +0100
489+++ evince-3.10.3/shell/ev-bookmarks.h 2014-03-03 12:17:53.183442435 +0100489+++ evince-3.10.3/shell/ev-bookmarks.h 2014-03-04 14:02:21.033143557 +0100
490@@ -43,6 +43,7 @@490@@ -43,6 +43,7 @@
491 GType ev_bookmarks_get_type (void) G_GNUC_CONST;491 GType ev_bookmarks_get_type (void) G_GNUC_CONST;
492 EvBookmarks *ev_bookmarks_new (EvMetadata *metadata);492 EvBookmarks *ev_bookmarks_new (EvMetadata *metadata);
@@ -498,7 +498,7 @@
498Index: evince-3.10.3/shell/ev-recent-menu-model.c498Index: evince-3.10.3/shell/ev-recent-menu-model.c
499===================================================================499===================================================================
500--- /dev/null 1970-01-01 00:00:00.000000000 +0000500--- /dev/null 1970-01-01 00:00:00.000000000 +0000
501+++ evince-3.10.3/shell/ev-recent-menu-model.c 2014-03-03 12:17:53.183442435 +0100501+++ evince-3.10.3/shell/ev-recent-menu-model.c 2014-03-04 14:02:21.033143557 +0100
502@@ -0,0 +1,108 @@502@@ -0,0 +1,108 @@
503+/*503+/*
504+ * Copyright 2014 Canonical Ltd504+ * Copyright 2014 Canonical Ltd
@@ -611,7 +611,7 @@
611Index: evince-3.10.3/shell/ev-recent-menu-model.h611Index: evince-3.10.3/shell/ev-recent-menu-model.h
612===================================================================612===================================================================
613--- /dev/null 1970-01-01 00:00:00.000000000 +0000613--- /dev/null 1970-01-01 00:00:00.000000000 +0000
614+++ evince-3.10.3/shell/ev-recent-menu-model.h 2014-03-03 12:17:53.183442435 +0100614+++ evince-3.10.3/shell/ev-recent-menu-model.h 2014-03-04 14:02:21.033143557 +0100
615@@ -0,0 +1,30 @@615@@ -0,0 +1,30 @@
616+/*616+/*
617+ * Copyright 2014 Canonical Ltd617+ * Copyright 2014 Canonical Ltd
@@ -645,8 +645,8 @@
645+#endif645+#endif
646Index: evince-3.10.3/shell/ev-sidebar-bookmarks.c646Index: evince-3.10.3/shell/ev-sidebar-bookmarks.c
647===================================================================647===================================================================
648--- evince-3.10.3.orig/shell/ev-sidebar-bookmarks.c 2014-03-03 12:17:53.199442435 +0100648--- evince-3.10.3.orig/shell/ev-sidebar-bookmarks.c 2014-03-04 14:02:21.045143557 +0100
649+++ evince-3.10.3/shell/ev-sidebar-bookmarks.c 2014-03-03 12:17:53.187442435 +0100649+++ evince-3.10.3/shell/ev-sidebar-bookmarks.c 2014-03-04 14:02:21.037143557 +0100
650@@ -40,11 +40,6 @@650@@ -40,11 +40,6 @@
651 N_COLUMNS651 N_COLUMNS
652 };652 };
@@ -716,8 +716,8 @@
716 GtkWidget *716 GtkWidget *
717Index: evince-3.10.3/shell/ev-toolbar.c717Index: evince-3.10.3/shell/ev-toolbar.c
718===================================================================718===================================================================
719--- evince-3.10.3.orig/shell/ev-toolbar.c 2014-03-03 12:17:53.199442435 +0100719--- evince-3.10.3.orig/shell/ev-toolbar.c 2014-03-04 14:02:21.045143557 +0100
720+++ evince-3.10.3/shell/ev-toolbar.c 2014-03-03 12:17:53.187442435 +0100720+++ evince-3.10.3/shell/ev-toolbar.c 2014-03-04 14:02:21.037143557 +0100
721@@ -24,9 +24,12 @@721@@ -24,9 +24,12 @@
722 722
723 #include "ev-toolbar.h"723 #include "ev-toolbar.h"
@@ -984,8 +984,8 @@
984 static void984 static void
985Index: evince-3.10.3/shell/ev-utils.c985Index: evince-3.10.3/shell/ev-utils.c
986===================================================================986===================================================================
987--- evince-3.10.3.orig/shell/ev-utils.c 2014-03-03 12:17:53.199442435 +0100987--- evince-3.10.3.orig/shell/ev-utils.c 2014-03-04 14:02:21.045143557 +0100
988+++ evince-3.10.3/shell/ev-utils.c 2014-03-03 12:17:53.187442435 +0100988+++ evince-3.10.3/shell/ev-utils.c 2014-03-04 14:02:21.037143557 +0100
989@@ -22,6 +22,7 @@989@@ -22,6 +22,7 @@
990 990
991 #include "ev-utils.h"991 #include "ev-utils.h"
@@ -1087,8 +1087,8 @@
1087+}1087+}
1088Index: evince-3.10.3/shell/ev-utils.h1088Index: evince-3.10.3/shell/ev-utils.h
1089===================================================================1089===================================================================
1090--- evince-3.10.3.orig/shell/ev-utils.h 2014-03-03 12:17:53.199442435 +01001090--- evince-3.10.3.orig/shell/ev-utils.h 2014-03-04 14:02:21.045143557 +0100
1091+++ evince-3.10.3/shell/ev-utils.h 2014-03-03 12:17:53.187442435 +01001091+++ evince-3.10.3/shell/ev-utils.h 2014-03-04 14:02:21.037143557 +0100
1092@@ -42,6 +42,13 @@1092@@ -42,6 +42,13 @@
1093 void file_chooser_dialog_add_writable_pixbuf_formats (GtkFileChooser *chooser);1093 void file_chooser_dialog_add_writable_pixbuf_formats (GtkFileChooser *chooser);
1094 GdkPixbufFormat* get_gdk_pixbuf_format_by_extension (const gchar *uri);1094 GdkPixbufFormat* get_gdk_pixbuf_format_by_extension (const gchar *uri);
@@ -1105,8 +1105,8 @@
1105 #endif /* __EV_VIEW_H__ */1105 #endif /* __EV_VIEW_H__ */
1106Index: evince-3.10.3/shell/ev-window.c1106Index: evince-3.10.3/shell/ev-window.c
1107===================================================================1107===================================================================
1108--- evince-3.10.3.orig/shell/ev-window.c 2014-03-03 12:17:53.199442435 +01001108--- evince-3.10.3.orig/shell/ev-window.c 2014-03-04 14:02:21.045143557 +0100
1109+++ evince-3.10.3/shell/ev-window.c 2014-03-03 12:18:34.127444106 +01001109+++ evince-3.10.3/shell/ev-window.c 2014-03-04 14:02:45.629144561 +0100
1110@@ -87,10 +87,10 @@1110@@ -87,10 +87,10 @@
1111 #include "ev-print-operation.h"1111 #include "ev-print-operation.h"
1112 #include "ev-progress-message-area.h"1112 #include "ev-progress-message-area.h"
@@ -1119,8 +1119,12 @@
1119 1119
1120 #ifdef ENABLE_DBUS1120 #ifdef ENABLE_DBUS
1121 #include "ev-gdbus-generated.h"1121 #include "ev-gdbus-generated.h"
1122@@ -175,8 +175,6 @@1122@@ -171,24 +171,26 @@
1123 GtkActionGroup *attachment_popup_action_group;1123
1124 /* UI Builders */
1125 GtkActionGroup *action_group;
1126- GtkActionGroup *view_popup_action_group;
1127- GtkActionGroup *attachment_popup_action_group;
1124 GtkActionGroup *zoom_selector_popup_action_group;1128 GtkActionGroup *zoom_selector_popup_action_group;
1125 GtkRecentManager *recent_manager;1129 GtkRecentManager *recent_manager;
1126- GtkActionGroup *recent_action_group;1130- GtkActionGroup *recent_action_group;
@@ -1128,7 +1132,27 @@
1128 GtkActionGroup *bookmarks_action_group;1132 GtkActionGroup *bookmarks_action_group;
1129 guint bookmarks_ui_id;1133 guint bookmarks_ui_id;
1130 GtkUIManager *ui_manager;1134 GtkUIManager *ui_manager;
1131@@ -206,6 +204,7 @@1135
1136 /* Popup view */
1137- GtkWidget *view_popup;
1138 EvLink *link;
1139 EvImage *image;
1140 EvAnnotation *annot;
1141
1142+ GMenuModel *document_view_menu;
1143+ GMenuModel *external_link_section;
1144+ GMenuModel *internal_link_section;
1145+ GMenuModel *image_section;
1146+ GMenuModel *attachment_section;
1147+ GMenuModel *annotation_section;
1148+ GtkWidget *popup_menu;
1149+
1150 /* Popup attachment */
1151- GtkWidget *attachment_popup;
1152 GList *attach_list;
1153
1154 /* Document */
1155@@ -206,6 +208,7 @@
1132 EvWindowTitle *title;1156 EvWindowTitle *title;
1133 EvMetadata *metadata;1157 EvMetadata *metadata;
1134 EvBookmarks *bookmarks;1158 EvBookmarks *bookmarks;
@@ -1136,7 +1160,7 @@
1136 1160
1137 /* Load params */1161 /* Load params */
1138 EvLinkDest *dest;1162 EvLinkDest *dest;
1139@@ -262,8 +261,6 @@1163@@ -262,8 +265,6 @@
1140 #define GS_OVERRIDE_RESTRICTIONS "override-restrictions"1164 #define GS_OVERRIDE_RESTRICTIONS "override-restrictions"
1141 #define GS_PAGE_CACHE_SIZE "page-cache-size"1165 #define GS_PAGE_CACHE_SIZE "page-cache-size"
1142 #define GS_AUTO_RELOAD "auto-reload"1166 #define GS_AUTO_RELOAD "auto-reload"
@@ -1145,7 +1169,7 @@
1145 1169
1146 #define SIDEBAR_DEFAULT_SIZE 1321170 #define SIDEBAR_DEFAULT_SIZE 132
1147 #define LINKS_SIDEBAR_ID "links"1171 #define LINKS_SIDEBAR_ID "links"
1148@@ -328,13 +325,9 @@1172@@ -328,29 +329,9 @@
1149 static void ev_window_run_fullscreen (EvWindow *window);1173 static void ev_window_run_fullscreen (EvWindow *window);
1150 static void ev_window_stop_fullscreen (EvWindow *window,1174 static void ev_window_stop_fullscreen (EvWindow *window,
1151 gboolean unfullscreen_window);1175 gboolean unfullscreen_window);
@@ -1156,10 +1180,26 @@
1156 gboolean unfullscreen_window);1180 gboolean unfullscreen_window);
1157-static void ev_window_cmd_view_presentation (GtkAction *action,1181-static void ev_window_cmd_view_presentation (GtkAction *action,
1158- EvWindow *window);1182- EvWindow *window);
1159 static void ev_view_popup_cmd_open_link (GtkAction *action,1183-static void ev_view_popup_cmd_open_link (GtkAction *action,
1160 EvWindow *window);1184- EvWindow *window);
1161 static void ev_view_popup_cmd_open_link_new_window (GtkAction *action,1185-static void ev_view_popup_cmd_open_link_new_window (GtkAction *action,
1162@@ -361,8 +354,6 @@1186- EvWindow *window);
1187-static void ev_view_popup_cmd_copy_link_address (GtkAction *action,
1188- EvWindow *window);
1189-static void ev_view_popup_cmd_save_image_as (GtkAction *action,
1190- EvWindow *window);
1191-static void ev_view_popup_cmd_copy_image (GtkAction *action,
1192- EvWindow *window);
1193-static void ev_view_popup_cmd_annot_properties (GtkAction *action,
1194- EvWindow *window);
1195-static void ev_attachment_popup_cmd_open_attachment (GtkAction *action,
1196- EvWindow *window);
1197-static void ev_attachment_popup_cmd_save_attachment_as (GtkAction *action,
1198- EvWindow *window);
1199 static void ev_window_cmd_view_fit_page (GtkAction *action,
1200 EvWindow *ev_window);
1201 static void ev_window_cmd_view_fit_width (GtkAction *action,
1202@@ -361,8 +342,6 @@
1163 EvLink *link, 1203 EvLink *link,
1164 EvWindow *window);1204 EvWindow *window);
1165 static void ev_window_update_find_status_message (EvWindow *ev_window);1205 static void ev_window_update_find_status_message (EvWindow *ev_window);
@@ -1168,7 +1208,7 @@
1168 static void find_bar_search_changed_cb (EggFindBar *find_bar,1208 static void find_bar_search_changed_cb (EggFindBar *find_bar,
1169 GParamSpec *param,1209 GParamSpec *param,
1170 EvWindow *ev_window);1210 EvWindow *ev_window);
1171@@ -396,6 +387,17 @@1211@@ -396,6 +375,17 @@
1172 }1212 }
1173 1213
1174 static void1214 static void
@@ -1186,7 +1226,7 @@
1186 ev_window_set_action_sensitive (EvWindow *ev_window,1226 ev_window_set_action_sensitive (EvWindow *ev_window,
1187 const char *name,1227 const char *name,
1188 gboolean sensitive)1228 gboolean sensitive)
1189@@ -419,6 +421,7 @@1229@@ -419,6 +409,7 @@
1190 gboolean can_get_text = FALSE;1230 gboolean can_get_text = FALSE;
1191 gboolean has_pages = FALSE;1231 gboolean has_pages = FALSE;
1192 gboolean can_find = FALSE;1232 gboolean can_find = FALSE;
@@ -1194,7 +1234,7 @@
1194 1234
1195 if (document) {1235 if (document) {
1196 has_document = TRUE;1236 has_document = TRUE;
1197@@ -438,10 +441,8 @@1237@@ -438,10 +429,8 @@
1198 can_find = TRUE;1238 can_find = TRUE;
1199 }1239 }
1200 1240
@@ -1207,7 +1247,7 @@
1207 }1247 }
1208 1248
1209 if (!override_restrictions && info && info->fields_mask & EV_DOCUMENT_INFO_PERMISSIONS) {1249 if (!override_restrictions && info && info->fields_mask & EV_DOCUMENT_INFO_PERMISSIONS) {
1210@@ -463,33 +464,31 @@1250@@ -463,33 +452,31 @@
1211 }1251 }
1212 1252
1213 /* File menu */1253 /* File menu */
@@ -1260,7 +1300,7 @@
1260 has_pages && ev_window->priv->bookmarks);1300 has_pages && ev_window->priv->bookmarks);
1261 1301
1262 /* Toolbar-specific actions: */1302 /* Toolbar-specific actions: */
1263@@ -507,62 +506,58 @@1303@@ -507,62 +494,58 @@
1264 gboolean has_pages = FALSE;1304 gboolean has_pages = FALSE;
1265 gboolean presentation_mode;1305 gboolean presentation_mode;
1266 gboolean can_find_in_page = FALSE;1306 gboolean can_find_in_page = FALSE;
@@ -1351,7 +1391,7 @@
1351 }1391 }
1352 1392
1353 static void1393 static void
1354@@ -593,6 +588,8 @@1394@@ -593,6 +576,8 @@
1355 set_widget_visibility (priv->toolbar, toolbar);1395 set_widget_visibility (priv->toolbar, toolbar);
1356 set_widget_visibility (priv->find_bar, findbar);1396 set_widget_visibility (priv->find_bar, findbar);
1357 set_widget_visibility (priv->sidebar, sidebar);1397 set_widget_visibility (priv->sidebar, sidebar);
@@ -1360,7 +1400,7 @@
1360 }1400 }
1361 1401
1362 static void1402 static void
1363@@ -892,7 +889,7 @@1403@@ -892,7 +877,7 @@
1364 view_selection_changed_cb (EvView *view,1404 view_selection_changed_cb (EvView *view,
1365 EvWindow *window)1405 EvWindow *window)
1366 {1406 {
@@ -1369,7 +1409,7 @@
1369 ev_view_get_has_selection (view));1409 ev_view_get_has_selection (view));
1370 }1410 }
1371 1411
1372@@ -1436,27 +1433,6 @@1412@@ -1436,27 +1421,6 @@
1373 }1413 }
1374 #endif1414 #endif
1375 1415
@@ -1397,7 +1437,7 @@
1397 static gboolean1437 static gboolean
1398 ev_window_setup_document (EvWindow *ev_window)1438 ev_window_setup_document (EvWindow *ev_window)
1399 {1439 {
1400@@ -1471,8 +1447,6 @@1440@@ -1471,8 +1435,6 @@
1401 ev_window_title_set_document (ev_window->priv->title, document);1441 ev_window_title_set_document (ev_window->priv->title, document);
1402 ev_window_title_set_uri (ev_window->priv->title, ev_window->priv->uri);1442 ev_window_title_set_uri (ev_window->priv->title, ev_window->priv->uri);
1403 1443
@@ -1406,7 +1446,7 @@
1406 #ifdef HAVE_DESKTOP_SCHEMAS1446 #ifdef HAVE_DESKTOP_SCHEMAS
1407 if (!ev_window->priv->lockdown_settings) {1447 if (!ev_window->priv->lockdown_settings) {
1408 ev_window->priv->lockdown_settings = g_settings_new (GS_LOCKDOWN_SCHEMA_NAME);1448 ev_window->priv->lockdown_settings = g_settings_new (GS_LOCKDOWN_SCHEMA_NAME);
1409@@ -1563,8 +1537,9 @@1449@@ -1563,8 +1525,9 @@
1410 ev_window_document_changed (EvWindow *ev_window,1450 ev_window_document_changed (EvWindow *ev_window,
1411 gpointer user_data)1451 gpointer user_data)
1412 {1452 {
@@ -1418,7 +1458,7 @@
1418 ev_window_reload_document (ev_window, NULL);1458 ev_window_reload_document (ev_window, NULL);
1419 }1459 }
1420 1460
1421@@ -2410,124 +2385,10 @@1461@@ -2410,124 +2373,10 @@
1422 }1462 }
1423 }1463 }
1424 1464
@@ -1544,7 +1584,7 @@
1544 }1584 }
1545 1585
1546 static void1586 static void
1547@@ -2545,26 +2406,13 @@1587@@ -2545,26 +2394,13 @@
1548 }1588 }
1549 1589
1550 static void1590 static void
@@ -1576,7 +1616,7 @@
1576 }1616 }
1577 1617
1578 static void1618 static void
1579@@ -2583,185 +2431,6 @@1619@@ -2583,185 +2419,6 @@
1580 gtk_recent_manager_add_item (window->priv->recent_manager, filename);1620 gtk_recent_manager_add_item (window->priv->recent_manager, filename);
1581 }1621 }
1582 1622
@@ -1762,7 +1802,7 @@
1762 static gboolean 1802 static gboolean
1763 show_saving_progress (GFile *dst)1803 show_saving_progress (GFile *dst)
1764 {1804 {
1765@@ -2952,8 +2621,8 @@1805@@ -2952,8 +2609,8 @@
1766 return;1806 return;
1767 }1807 }
1768 1808
@@ -1773,7 +1813,7 @@
1773 1813
1774 uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc));1814 uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc));
1775 1815
1776@@ -2975,7 +2644,7 @@1816@@ -2975,7 +2632,7 @@
1777 }1817 }
1778 1818
1779 static void1819 static void
@@ -1782,7 +1822,7 @@
1782 {1822 {
1783 GtkWidget *fc;1823 GtkWidget *fc;
1784 gchar *base_name;1824 gchar *base_name;
1785@@ -3003,9 +2672,9 @@1825@@ -3003,9 +2660,9 @@
1786 g_object_unref (file);1826 g_object_unref (file);
1787 g_free (base_name);1827 g_free (base_name);
1788 1828
@@ -1795,7 +1835,7 @@
1795 1835
1796 g_signal_connect (fc, "response",1836 g_signal_connect (fc, "response",
1797 G_CALLBACK (file_save_dialog_response_cb),1837 G_CALLBACK (file_save_dialog_response_cb),
1798@@ -3015,9 +2684,21 @@1838@@ -3015,9 +2672,21 @@
1799 }1839 }
1800 1840
1801 static void1841 static void
@@ -1819,7 +1859,7 @@
1819 GAppInfo *app_info;1859 GAppInfo *app_info;
1820 gchar *command;1860 gchar *command;
1821 const char *uri;1861 const char *uri;
1822@@ -3052,8 +2733,11 @@1862@@ -3052,8 +2721,11 @@
1823 }1863 }
1824 1864
1825 static void1865 static void
@@ -1832,7 +1872,7 @@
1832 GtkWidget *ev_window_widget;1872 GtkWidget *ev_window_widget;
1833 GFile *file;1873 GFile *file;
1834 GFile *parent;1874 GFile *parent;
1835@@ -3589,14 +3273,22 @@1875@@ -3589,14 +3261,22 @@
1836 }1876 }
1837 1877
1838 static void1878 static void
@@ -1857,7 +1897,7 @@
1857 if (ev_window->priv->properties == NULL) {1897 if (ev_window->priv->properties == NULL) {
1858 ev_window->priv->properties = ev_properties_dialog_new ();1898 ev_window->priv->properties = ev_properties_dialog_new ();
1859 ev_properties_dialog_set_document (EV_PROPERTIES_DIALOG (ev_window->priv->properties),1899 ev_properties_dialog_set_document (EV_PROPERTIES_DIALOG (ev_window->priv->properties),
1860@@ -3622,7 +3314,7 @@1900@@ -3622,7 +3302,7 @@
1861 1901
1862 switch (response) {1902 switch (response) {
1863 case GTK_RESPONSE_YES:1903 case GTK_RESPONSE_YES:
@@ -1866,7 +1906,7 @@
1866 break;1906 break;
1867 case GTK_RESPONSE_NO:1907 case GTK_RESPONSE_NO:
1868 gtk_widget_destroy (GTK_WIDGET (ev_window));1908 gtk_widget_destroy (GTK_WIDGET (ev_window));
1869@@ -3823,64 +3515,81 @@1909@@ -3823,64 +3503,81 @@
1870 }1910 }
1871 1911
1872 static void1912 static void
@@ -1972,7 +2012,7 @@
1972 }2012 }
1973 2013
1974 static void2014 static void
1975@@ -3897,9 +3606,27 @@2015@@ -3897,9 +3594,27 @@
1976 }2016 }
1977 2017
1978 static void2018 static void
@@ -2003,7 +2043,7 @@
2003 }2043 }
2004 2044
2005 static void2045 static void
2006@@ -3916,12 +3643,6 @@2046@@ -3916,12 +3631,6 @@
2007 }2047 }
2008 2048
2009 static void2049 static void
@@ -2016,7 +2056,7 @@
2016 ev_window_cmd_view_zoom_automatic (GtkAction *action,2056 ev_window_cmd_view_zoom_automatic (GtkAction *action,
2017 EvWindow *ev_window)2057 EvWindow *ev_window)
2018 {2058 {
2019@@ -3957,29 +3678,28 @@2059@@ -3957,29 +3666,28 @@
2020 }2060 }
2021 2061
2022 static void2062 static void
@@ -2056,7 +2096,7 @@
2056 }2096 }
2057 2097
2058 static void2098 static void
2059@@ -4004,8 +3724,11 @@2099@@ -4004,8 +3712,11 @@
2060 }2100 }
2061 2101
2062 static void2102 static void
@@ -2069,7 +2109,7 @@
2069 gboolean find_bar_hidden;2109 gboolean find_bar_hidden;
2070 2110
2071 if (EV_WINDOW_IS_PRESENTATION (ev_window))2111 if (EV_WINDOW_IS_PRESENTATION (ev_window))
2072@@ -4029,8 +3752,11 @@2112@@ -4029,8 +3740,11 @@
2073 }2113 }
2074 2114
2075 static void2115 static void
@@ -2082,7 +2122,7 @@
2082 gboolean find_bar_hidden;2122 gboolean find_bar_hidden;
2083 2123
2084 if (EV_WINDOW_IS_PRESENTATION (ev_window))2124 if (EV_WINDOW_IS_PRESENTATION (ev_window))
2085@@ -4047,9 +3773,11 @@2125@@ -4047,9 +3761,11 @@
2086 }2126 }
2087 2127
2088 static void2128 static void
@@ -2096,7 +2136,7 @@
2096 2136
2097 ev_view_copy (EV_VIEW (ev_window->priv->view));2137 ev_view_copy (EV_VIEW (ev_window->priv->view));
2098 }2138 }
2099@@ -4067,15 +3795,12 @@2139@@ -4067,15 +3783,12 @@
2100 static void2140 static void
2101 ev_window_update_fullscreen_action (EvWindow *window)2141 ev_window_update_fullscreen_action (EvWindow *window)
2102 {2142 {
@@ -2117,7 +2157,7 @@
2117 }2157 }
2118 2158
2119 static void2159 static void
2120@@ -4292,16 +4017,19 @@2160@@ -4292,16 +4005,19 @@
2121 }2161 }
2122 2162
2123 static void2163 static void
@@ -2141,7 +2181,7 @@
2141 }2181 }
2142 2182
2143 static void2183 static void
2144@@ -4336,15 +4064,11 @@2184@@ -4336,15 +4052,11 @@
2145 static void2185 static void
2146 ev_window_update_presentation_action (EvWindow *window)2186 ev_window_update_presentation_action (EvWindow *window)
2147 {2187 {
@@ -2161,7 +2201,7 @@
2161 }2201 }
2162 2202
2163 static void2203 static void
2164@@ -4459,14 +4183,17 @@2204@@ -4459,14 +4171,17 @@
2165 }2205 }
2166 2206
2167 static void2207 static void
@@ -2183,7 +2223,7 @@
2183 }2223 }
2184 2224
2185 static gboolean2225 static gboolean
2186@@ -4530,10 +4257,12 @@2226@@ -4530,10 +4245,12 @@
2187 ev_window_update_actions_sensitivity (window);2227 ev_window_update_actions_sensitivity (window);
2188 }2228 }
2189 2229
@@ -2198,7 +2238,7 @@
2198 gint rotation;2238 gint rotation;
2199 2239
2200 if (EV_WINDOW_IS_PRESENTATION (ev_window)) {2240 if (EV_WINDOW_IS_PRESENTATION (ev_window)) {
2201@@ -4548,8 +4277,11 @@2241@@ -4548,8 +4265,11 @@
2202 }2242 }
2203 2243
2204 static void2244 static void
@@ -2211,7 +2251,7 @@
2211 gint rotation;2251 gint rotation;
2212 2252
2213 if (EV_WINDOW_IS_PRESENTATION (ev_window)) {2253 if (EV_WINDOW_IS_PRESENTATION (ev_window)) {
2214@@ -4564,16 +4296,23 @@2254@@ -4564,16 +4284,23 @@
2215 }2255 }
2216 2256
2217 static void2257 static void
@@ -2239,7 +2279,7 @@
2239 EvWindowPrivate *priv = ev_window->priv;2279 EvWindowPrivate *priv = ev_window->priv;
2240 EvDocumentModel *model = priv->model;2280 EvDocumentModel *model = priv->model;
2241 GSettings *settings = priv->default_settings;2281 GSettings *settings = priv->default_settings;
2242@@ -4582,7 +4321,7 @@2282@@ -4582,7 +4309,7 @@
2243 g_settings_set_boolean (settings, "continuous",2283 g_settings_set_boolean (settings, "continuous",
2244 ev_document_model_get_continuous (model));2284 ev_document_model_get_continuous (model));
2245 g_settings_set_boolean (settings, "dual-page",2285 g_settings_set_boolean (settings, "dual-page",
@@ -2248,7 +2288,7 @@
2248 g_settings_set_boolean (settings, "dual-page-odd-left",2288 g_settings_set_boolean (settings, "dual-page-odd-left",
2249 ev_document_model_get_dual_page_odd_pages_left (model));2289 ev_document_model_get_dual_page_odd_pages_left (model));
2250 g_settings_set_boolean (settings, "fullscreen",2290 g_settings_set_boolean (settings, "fullscreen",
2251@@ -4607,59 +4346,78 @@2291@@ -4607,59 +4334,78 @@
2252 }2292 }
2253 2293
2254 static void2294 static void
@@ -2345,7 +2385,7 @@
2345 int n_pages, current_page;2385 int n_pages, current_page;
2346 2386
2347 g_return_if_fail (EV_IS_WINDOW (ev_window));2387 g_return_if_fail (EV_IS_WINDOW (ev_window));
2348@@ -4673,11 +4431,14 @@2388@@ -4673,11 +4419,14 @@
2349 }2389 }
2350 2390
2351 static void2391 static void
@@ -2363,7 +2403,7 @@
2363 2403
2364 current_page = ev_document_model_get_page (ev_window->priv->model);2404 current_page = ev_document_model_get_page (ev_window->priv->model);
2365 2405
2366@@ -4686,15 +4447,6 @@2406@@ -4686,15 +4435,6 @@
2367 }2407 }
2368 }2408 }
2369 2409
@@ -2379,7 +2419,7 @@
2379 static gint2419 static gint
2380 compare_bookmarks (EvBookmark *a,2420 compare_bookmarks (EvBookmark *a,
2381 EvBookmark *b)2421 EvBookmark *b)
2382@@ -4705,59 +4457,33 @@2422@@ -4705,59 +4445,33 @@
2383 static void2423 static void
2384 ev_window_setup_bookmarks (EvWindow *window)2424 ev_window_setup_bookmarks (EvWindow *window)
2385 {2425 {
@@ -2407,27 +2447,27 @@
2407- window->priv->bookmarks_action_group = gtk_action_group_new ("BookmarksActions");2447- window->priv->bookmarks_action_group = gtk_action_group_new ("BookmarksActions");
2408- gtk_ui_manager_insert_action_group (window->priv->ui_manager,2448- gtk_ui_manager_insert_action_group (window->priv->ui_manager,
2409- window->priv->bookmarks_action_group, -1);2449- window->priv->bookmarks_action_group, -1);
2410-2450+ for (it = items; it; it = it->next) {
2451+ EvBookmark *bookmark = it->data;
2452+ GMenuItem *item;
2453
2411- items = ev_bookmarks_get_bookmarks (window->priv->bookmarks);2454- items = ev_bookmarks_get_bookmarks (window->priv->bookmarks);
2412- items = g_list_sort (items, (GCompareFunc)compare_bookmarks);2455- items = g_list_sort (items, (GCompareFunc)compare_bookmarks);
2413-2456+ item = g_menu_item_new (bookmark->title, NULL);
2457+ g_menu_item_set_action_and_target (item, "win.goto-bookmark", "u", bookmark->page);
2458+ g_menu_append_item (window->priv->bookmarks_menu, item);
2459
2414- for (l = items; l && l->data; l = g_list_next (l)) {2460- for (l = items; l && l->data; l = g_list_next (l)) {
2415- EvBookmark *bm = (EvBookmark *)l->data;2461- EvBookmark *bm = (EvBookmark *)l->data;
2416- GtkAction *action;2462- GtkAction *action;
2417+ for (it = items; it; it = it->next) {2463-
2418+ EvBookmark *bookmark = it->data;
2419+ GMenuItem *item;
2420
2421- action = ev_bookmark_action_new (bm);2464- action = ev_bookmark_action_new (bm);
2422- g_signal_connect (action, "activate",2465- g_signal_connect (action, "activate",
2423- G_CALLBACK (ev_window_cmd_bookmark_activate),2466- G_CALLBACK (ev_window_cmd_bookmark_activate),
2424- window);2467- window);
2425- gtk_action_group_add_action (window->priv->bookmarks_action_group,2468- gtk_action_group_add_action (window->priv->bookmarks_action_group,
2426- action);2469- action);
2427+ item = g_menu_item_new (bookmark->title, NULL);2470-
2428+ g_menu_item_set_action_and_target (item, "win.goto-bookmark", "u", bookmark->page);
2429+ g_menu_append_item (window->priv->bookmarks_menu, item);
2430
2431- gtk_ui_manager_add_ui (window->priv->ui_manager,2471- gtk_ui_manager_add_ui (window->priv->ui_manager,
2432- window->priv->bookmarks_ui_id,2472- window->priv->bookmarks_ui_id,
2433- "/ActionMenu/BookmarksMenu/BookmarksItems",2473- "/ActionMenu/BookmarksMenu/BookmarksItems",
@@ -2454,7 +2494,7 @@
2454 EvBookmark bm;2494 EvBookmark bm;
2455 gchar *page_label;2495 gchar *page_label;
2456 2496
2457@@ -4771,32 +4497,41 @@2497@@ -4771,32 +4485,41 @@
2458 }2498 }
2459 2499
2460 static void2500 static void
@@ -2508,7 +2548,7 @@
2508 ev_view_autoscroll_stop (EV_VIEW (window->priv->view));2548 ev_view_autoscroll_stop (EV_VIEW (window->priv->view));
2509 2549
2510 if (gtk_widget_get_visible (window->priv->find_bar))2550 if (gtk_widget_get_visible (window->priv->find_bar))
2511@@ -4890,29 +4625,20 @@2551@@ -4890,29 +4613,20 @@
2512 }2552 }
2513 2553
2514 static void2554 static void
@@ -2546,7 +2586,7 @@
2546 }2586 }
2547 2587
2548 static void2588 static void
2549@@ -4930,27 +4656,16 @@2589@@ -4930,27 +4644,16 @@
2550 }2590 }
2551 2591
2552 static void2592 static void
@@ -2578,7 +2618,7 @@
2578 2618
2579 if (window->priv->metadata && !ev_window_is_empty (window))2619 if (window->priv->metadata && !ev_window_is_empty (window))
2580 ev_metadata_set_boolean (window->priv->metadata, "inverted-colors",2620 ev_metadata_set_boolean (window->priv->metadata, "inverted-colors",
2581@@ -4960,43 +4675,20 @@2621@@ -4960,43 +4663,20 @@
2582 }2622 }
2583 2623
2584 static void2624 static void
@@ -2629,7 +2669,7 @@
2629 }2669 }
2630 2670
2631 static void2671 static void
2632@@ -5004,119 +4696,36 @@2672@@ -5004,119 +4684,36 @@
2633 GParamSpec *pspec,2673 GParamSpec *pspec,
2634 EvWindow *ev_window)2674 EvWindow *ev_window)
2635 {2675 {
@@ -2675,7 +2715,8 @@
2675- "Christian Persch <chpe" "\100" "gnome.org>",2715- "Christian Persch <chpe" "\100" "gnome.org>",
2676- NULL2716- NULL
2677- };2717- };
2678-2718+ EvWindow *ev_window = user_data;
2719
2679- const char *documenters[] = {2720- const char *documenters[] = {
2680- "Nickolay V. Shmyrev <nshmyrev@yandex.ru>",2721- "Nickolay V. Shmyrev <nshmyrev@yandex.ru>",
2681- "Phil Bull <philbull@gmail.com>",2722- "Phil Bull <philbull@gmail.com>",
@@ -2705,8 +2746,7 @@
2705-2746-
2706- for (p = authors; *p; ++p)2747- for (p = authors; *p; ++p)
2707- *p = _(*p);2748- *p = _(*p);
2708+ EvWindow *ev_window = user_data;2749-
2709
2710- for (p = documenters; *p; ++p)2750- for (p = documenters; *p; ++p)
2711- *p = _(*p);2751- *p = _(*p);
2712-#endif2752-#endif
@@ -2764,7 +2804,7 @@
2764 update_chrome_visibility (ev_window);2804 update_chrome_visibility (ev_window);
2765 }2805 }
2766 2806
2767@@ -5137,14 +4746,11 @@2807@@ -5137,14 +4734,11 @@
2768 GParamSpec *pspec,2808 GParamSpec *pspec,
2769 EvWindow *ev_window)2809 EvWindow *ev_window)
2770 {2810 {
@@ -2781,7 +2821,263 @@
2781 2821
2782 if (ev_window->priv->metadata)2822 if (ev_window->priv->metadata)
2783 ev_metadata_set_boolean (ev_window->priv->metadata, "sidebar_visibility",2823 ev_metadata_set_boolean (ev_window->priv->metadata, "sidebar_visibility",
2784@@ -5542,21 +5148,6 @@2824@@ -5154,14 +4748,10 @@
2825 }
2826 }
2827
2828-static void
2829+static GMenuModel *
2830 view_menu_link_popup (EvWindow *ev_window,
2831 EvLink *link)
2832 {
2833- gboolean show_external = FALSE;
2834- gboolean show_internal = FALSE;
2835- GtkAction *action;
2836-
2837 if (ev_window->priv->link)
2838 g_object_unref (ev_window->priv->link);
2839
2840@@ -5178,42 +4768,23 @@
2841 switch (ev_link_action_get_action_type (ev_action)) {
2842 case EV_LINK_ACTION_TYPE_GOTO_DEST:
2843 case EV_LINK_ACTION_TYPE_GOTO_REMOTE:
2844- show_internal = TRUE;
2845- break;
2846+ return ev_window->priv->internal_link_section;
2847 case EV_LINK_ACTION_TYPE_EXTERNAL_URI:
2848 case EV_LINK_ACTION_TYPE_LAUNCH:
2849- show_external = TRUE;
2850- break;
2851- default:
2852- break;
2853+ return ev_window->priv->external_link_section;
2854+ default:
2855+ return NULL;
2856 }
2857 }
2858 }
2859-
2860- action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group,
2861- "OpenLink");
2862- gtk_action_set_visible (action, show_external);
2863-
2864- action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group,
2865- "CopyLinkAddress");
2866- gtk_action_set_visible (action, show_external);
2867-
2868- action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group,
2869- "GoLink");
2870- gtk_action_set_visible (action, show_internal);
2871-
2872- action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group,
2873- "OpenLinkNewWindow");
2874- gtk_action_set_visible (action, show_internal);
2875+
2876+ return NULL;
2877 }
2878
2879-static void
2880+static GMenuModel *
2881 view_menu_image_popup (EvWindow *ev_window,
2882 EvImage *image)
2883 {
2884- GtkAction *action;
2885- gboolean show_image = FALSE;
2886-
2887 if (ev_window->priv->image)
2888 g_object_unref (ev_window->priv->image);
2889
2890@@ -5222,38 +4793,22 @@
2891 else
2892 ev_window->priv->image = NULL;
2893
2894- show_image = (ev_window->priv->image != NULL);
2895-
2896- action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group,
2897- "SaveImageAs");
2898- gtk_action_set_visible (action, show_image);
2899-
2900- action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group,
2901- "CopyImage");
2902- gtk_action_set_visible (action, show_image);
2903+ return ev_window->priv->image != NULL ? ev_window->priv->image_section : NULL;
2904 }
2905
2906-static void
2907+static GMenuModel *
2908 view_menu_annot_popup (EvWindow *ev_window,
2909 EvAnnotation *annot)
2910 {
2911- GtkAction *action;
2912- gboolean show_annot = FALSE;
2913-
2914 if (ev_window->priv->annot)
2915 g_object_unref (ev_window->priv->annot);
2916 ev_window->priv->annot = (annot) ? g_object_ref (annot) : NULL;
2917
2918- action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group,
2919- "AnnotProperties");
2920- gtk_action_set_visible (action, (annot != NULL && EV_IS_ANNOTATION_MARKUP (annot)));
2921-
2922 if (annot && EV_IS_ANNOTATION_ATTACHMENT (annot)) {
2923 EvAttachment *attachment;
2924
2925 attachment = ev_annotation_attachment_get_attachment (EV_ANNOTATION_ATTACHMENT (annot));
2926 if (attachment) {
2927- show_annot = TRUE;
2928 if (ev_window->priv->attach_list) {
2929 g_list_foreach (ev_window->priv->attach_list,
2930 (GFunc) g_object_unref, NULL);
2931@@ -5263,16 +4818,43 @@
2932 ev_window->priv->attach_list =
2933 g_list_prepend (ev_window->priv->attach_list,
2934 g_object_ref (attachment));
2935+
2936+ return ev_window->priv->annotation_section;
2937 }
2938 }
2939
2940- action = gtk_action_group_get_action (ev_window->priv->attachment_popup_action_group,
2941- "OpenAttachment");
2942- gtk_action_set_visible (action, show_annot);
2943-
2944- action = gtk_action_group_get_action (ev_window->priv->attachment_popup_action_group,
2945- "SaveAttachmentAs");
2946- gtk_action_set_visible (action, show_annot);
2947+ return NULL;
2948+}
2949+
2950+static void
2951+popup_menu_detach (GtkWidget *attach_widget,
2952+ GtkMenu *menu)
2953+{
2954+ EvWindow *window = EV_WINDOW (attach_widget);
2955+
2956+ window->priv->popup_menu = NULL;
2957+}
2958+
2959+static GMenu *
2960+menu_new_copy (GMenuModel *source)
2961+{
2962+ GMenu *menu;
2963+ gint n_items;
2964+ gint i;
2965+
2966+ menu = g_menu_new ();
2967+
2968+ n_items = g_menu_model_get_n_items (source);
2969+ for (i = 0; i < n_items; i++) {
2970+ GMenuItem *item;
2971+
2972+ item = g_menu_item_new_from_model (source, i);
2973+ g_menu_append_item (menu, item);
2974+
2975+ g_object_unref (item);
2976+ }
2977+
2978+ return menu;
2979 }
2980
2981 static gboolean
2982@@ -5280,34 +4862,44 @@
2983 GList *items,
2984 EvWindow *ev_window)
2985 {
2986- GList *l;
2987- gboolean has_link = FALSE;
2988- gboolean has_image = FALSE;
2989- gboolean has_annot = FALSE;
2990+ GList *l;
2991+ GMenu *popup;
2992+
2993+ if (ev_window->priv->popup_menu) {
2994+ gtk_widget_destroy (ev_window->priv->popup_menu);
2995+ ev_window->priv->popup_menu = NULL;
2996+ }
2997+
2998+ /* make a deep copy of the base menu to append the optionally
2999+ * visible sections to */
3000+ popup = menu_new_copy (ev_window->priv->document_view_menu);
3001
3002 for (l = items; l; l = g_list_next (l)) {
3003 if (EV_IS_LINK (l->data)) {
3004- view_menu_link_popup (ev_window, EV_LINK (l->data));
3005- has_link = TRUE;
3006+ GMenuModel *section = view_menu_link_popup (ev_window, EV_LINK (l->data));
3007+ if (section)
3008+ g_menu_prepend_section (popup, NULL, section);
3009 } else if (EV_IS_IMAGE (l->data)) {
3010- view_menu_image_popup (ev_window, EV_IMAGE (l->data));
3011- has_image = TRUE;
3012+ GMenuModel *section = view_menu_image_popup (ev_window, EV_IMAGE (l->data));
3013+ if (section)
3014+ g_menu_append_section (popup, NULL, section);
3015 } else if (EV_IS_ANNOTATION (l->data)) {
3016- view_menu_annot_popup (ev_window, EV_ANNOTATION (l->data));
3017- has_annot = TRUE;
3018+ GMenuModel *section = view_menu_annot_popup (ev_window, EV_ANNOTATION (l->data));
3019+ if (section)
3020+ g_menu_append_section (popup, NULL, section);
3021 }
3022 }
3023
3024- if (!has_link)
3025- view_menu_link_popup (ev_window, NULL);
3026- if (!has_image)
3027- view_menu_image_popup (ev_window, NULL);
3028- if (!has_annot)
3029- view_menu_annot_popup (ev_window, NULL);
3030+ if (g_menu_model_get_n_items (G_MENU_MODEL (popup)) > 0) {
3031+ ev_window->priv->popup_menu = gtk_menu_new_from_model (G_MENU_MODEL (popup));
3032+ gtk_menu_attach_to_widget (GTK_MENU (ev_window->priv->popup_menu),
3033+ GTK_WIDGET (ev_window), popup_menu_detach);
3034
3035- gtk_menu_popup (GTK_MENU (ev_window->priv->view_popup),
3036- NULL, NULL, NULL, NULL,
3037- 3, gtk_get_current_event_time ());
3038+ gtk_menu_popup (GTK_MENU (ev_window->priv->popup_menu), NULL, NULL, NULL, NULL,
3039+ 3, gtk_get_current_event_time ());
3040+ }
3041+
3042+ g_object_unref (popup);
3043 return TRUE;
3044 }
3045
3046@@ -5316,8 +4908,6 @@
3047 GList *attach_list,
3048 EvWindow *ev_window)
3049 {
3050- GtkWidget *popup;
3051-
3052 g_assert (attach_list != NULL);
3053
3054 if (ev_window->priv->attach_list) {
3055@@ -5325,13 +4915,19 @@
3056 (GFunc) g_object_unref, NULL);
3057 g_list_free (ev_window->priv->attach_list);
3058 }
3059-
3060+
3061 ev_window->priv->attach_list = attach_list;
3062-
3063- popup = ev_window->priv->attachment_popup;
3064
3065- gtk_menu_popup (GTK_MENU (popup), NULL, NULL,
3066- NULL, NULL,
3067+ if (ev_window->priv->popup_menu) {
3068+ gtk_widget_destroy (ev_window->priv->popup_menu);
3069+ ev_window->priv->popup_menu = NULL;
3070+ }
3071+
3072+ ev_window->priv->popup_menu = gtk_menu_new_from_model (ev_window->priv->attachment_section);
3073+ gtk_menu_attach_to_widget (GTK_MENU (ev_window->priv->popup_menu),
3074+ GTK_WIDGET (ev_window), popup_menu_detach);
3075+
3076+ gtk_menu_popup (GTK_MENU (ev_window->priv->popup_menu), NULL, NULL, NULL, NULL,
3077 3, gtk_get_current_event_time ());
3078
3079 return TRUE;
3080@@ -5542,21 +5138,6 @@
2785 }3081 }
2786 3082
2787 static void3083 static void
@@ -2803,7 +3099,7 @@
2803 ev_window_show_find_bar (EvWindow *ev_window)3099 ev_window_show_find_bar (EvWindow *ev_window)
2804 {3100 {
2805 if (gtk_widget_get_visible (ev_window->priv->find_bar)) {3101 if (gtk_widget_get_visible (ev_window->priv->find_bar)) {
2806@@ -5583,7 +5174,7 @@3102@@ -5583,7 +5164,7 @@
2807 update_chrome_flag (ev_window, EV_CHROME_FINDBAR, TRUE);3103 update_chrome_flag (ev_window, EV_CHROME_FINDBAR, TRUE);
2808 update_chrome_visibility (ev_window);3104 update_chrome_visibility (ev_window);
2809 gtk_widget_grab_focus (ev_window->priv->find_bar);3105 gtk_widget_grab_focus (ev_window->priv->find_bar);
@@ -2812,7 +3108,7 @@
2812 }3108 }
2813 3109
2814 static void3110 static void
2815@@ -5601,7 +5192,7 @@3111@@ -5601,7 +5182,7 @@
2816 update_chrome_flag (ev_window, EV_CHROME_FINDBAR, FALSE);3112 update_chrome_flag (ev_window, EV_CHROME_FINDBAR, FALSE);
2817 update_chrome_visibility (ev_window);3113 update_chrome_visibility (ev_window);
2818 gtk_widget_grab_focus (ev_window->priv->view);3114 gtk_widget_grab_focus (ev_window->priv->view);
@@ -2821,7 +3117,7 @@
2821 3117
2822 ev_history_thaw (ev_window->priv->history);3118 ev_history_thaw (ev_window->priv->history);
2823 }3119 }
2824@@ -5651,10 +5242,15 @@3120@@ -5651,10 +5232,15 @@
2825 ev_window_set_caret_navigation_enabled (EvWindow *window,3121 ev_window_set_caret_navigation_enabled (EvWindow *window,
2826 gboolean enabled)3122 gboolean enabled)
2827 {3123 {
@@ -2837,7 +3133,7 @@
2837 }3133 }
2838 3134
2839 static void3135 static void
2840@@ -5668,7 +5264,7 @@3136@@ -5668,7 +5254,7 @@
2841 3137
2842 /* Turn the confirmation dialog off if the user has requested not to show it again */3138 /* Turn the confirmation dialog off if the user has requested not to show it again */
2843 if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (window->priv->ask_caret_navigation_check))) {3139 if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (window->priv->ask_caret_navigation_check))) {
@@ -2846,7 +3142,7 @@
2846 g_settings_apply (window->priv->settings);3142 g_settings_apply (window->priv->settings);
2847 }3143 }
2848 3144
2849@@ -5678,9 +5274,11 @@3145@@ -5678,9 +5264,11 @@
2850 }3146 }
2851 3147
2852 static void3148 static void
@@ -2860,7 +3156,7 @@
2860 GtkWidget *message_area;3156 GtkWidget *message_area;
2861 GtkWidget *box;3157 GtkWidget *box;
2862 GtkWidget *hbox;3158 GtkWidget *hbox;
2863@@ -5689,7 +5287,7 @@3159@@ -5689,7 +5277,7 @@
2864 /* Don't ask for user confirmation to turn the caret navigation off when it is active,3160 /* Don't ask for user confirmation to turn the caret navigation off when it is active,
2865 * or to turn it on when the confirmation dialog is not to be shown per settings */3161 * or to turn it on when the confirmation dialog is not to be shown per settings */
2866 enabled = ev_view_is_caret_navigation_enabled (EV_VIEW (window->priv->view));3162 enabled = ev_view_is_caret_navigation_enabled (EV_VIEW (window->priv->view));
@@ -2869,7 +3165,25 @@
2869 ev_window_set_caret_navigation_enabled (window, !enabled);3165 ev_window_set_caret_navigation_enabled (window, !enabled);
2870 return;3166 return;
2871 }3167 }
2872@@ -5805,28 +5403,15 @@3168@@ -5793,40 +5381,24 @@
3169 priv->action_group = NULL;
3170 }
3171
3172- if (priv->view_popup_action_group) {
3173- g_object_unref (priv->view_popup_action_group);
3174- priv->view_popup_action_group = NULL;
3175- }
3176-
3177- if (priv->attachment_popup_action_group) {
3178- g_object_unref (priv->attachment_popup_action_group);
3179- priv->attachment_popup_action_group = NULL;
3180- }
3181+ g_clear_object (&priv->document_view_menu);
3182+ g_clear_object (&priv->external_link_section);
3183+ g_clear_object (&priv->internal_link_section);
3184+ g_clear_object (&priv->image_section);
3185+ g_clear_object (&priv->attachment_section);
3186+ g_clear_object (&priv->annotation_section);
2873 3187
2874 g_clear_object (&priv->zoom_selector_popup_action_group);3188 g_clear_object (&priv->zoom_selector_popup_action_group);
2875 3189
@@ -2898,7 +3212,7 @@
2898 if (priv->default_settings) {3212 if (priv->default_settings) {
2899 g_settings_apply (priv->default_settings);3213 g_settings_apply (priv->default_settings);
2900 g_object_unref (priv->default_settings);3214 g_object_unref (priv->default_settings);
2901@@ -5838,8 +5423,6 @@3215@@ -5838,8 +5410,6 @@
2902 priv->lockdown_settings = NULL;3216 priv->lockdown_settings = NULL;
2903 }3217 }
2904 3218
@@ -2907,7 +3221,7 @@
2907 if (priv->model) {3221 if (priv->model) {
2908 g_signal_handlers_disconnect_by_func (priv->model,3222 g_signal_handlers_disconnect_by_func (priv->model,
2909 ev_window_page_changed_cb,3223 ev_window_page_changed_cb,
2910@@ -5955,7 +5538,6 @@3224@@ -5955,7 +5525,6 @@
2911 G_OBJECT_CLASS (ev_window_parent_class)->dispose (object);3225 G_OBJECT_CLASS (ev_window_parent_class)->dispose (object);
2912 }3226 }
2913 3227
@@ -2915,7 +3229,7 @@
2915 /*3229 /*
2916 * GtkWindow catches keybindings for the menu items _before_ passing them to3230 * GtkWindow catches keybindings for the menu items _before_ passing them to
2917 * the focused widget. This is unfortunate and means that pressing Ctrl+a,3231 * the focused widget. This is unfortunate and means that pressing Ctrl+a,
2918@@ -6012,184 +5594,10 @@3232@@ -6012,206 +5581,6 @@
2919 g_type_class_add_private (g_object_class, sizeof (EvWindowPrivate));3233 g_type_class_add_private (g_object_class, sizeof (EvWindowPrivate));
2920 }3234 }
2921 3235
@@ -3093,24 +3407,36 @@
3093- G_CALLBACK (ev_window_cmd_toggle_find) },3407- G_CALLBACK (ev_window_cmd_toggle_find) },
3094-};3408-};
3095-3409-
3096 /* Popups specific items */3410-/* Popups specific items */
3097 static const GtkActionEntry view_popup_entries [] = {3411-static const GtkActionEntry view_popup_entries [] = {
3098 /* Links */3412- /* Links */
3099- { "OpenLink", GTK_STOCK_OPEN, N_("_Open Link"), NULL,3413- { "OpenLink", GTK_STOCK_OPEN, N_("_Open Link"), NULL,
3100+ { "OpenLink", NULL, N_("_Open Link"), NULL,3414- NULL, G_CALLBACK (ev_view_popup_cmd_open_link) },
3101 NULL, G_CALLBACK (ev_view_popup_cmd_open_link) },3415- { "GoLink", GTK_STOCK_GO_FORWARD, N_("_Go To"), NULL,
3102 { "GoLink", GTK_STOCK_GO_FORWARD, N_("_Go To"), NULL,3416- NULL, G_CALLBACK (ev_view_popup_cmd_open_link) },
3103 NULL, G_CALLBACK (ev_view_popup_cmd_open_link) },3417- { "OpenLinkNewWindow", NULL, N_("Open in New _Window"), NULL,
3104@@ -6206,7 +5614,7 @@3418- NULL, G_CALLBACK (ev_view_popup_cmd_open_link_new_window) },
3105 };3419- { "CopyLinkAddress", NULL, N_("_Copy Link Address"), NULL,
3106 3420- NULL, G_CALLBACK (ev_view_popup_cmd_copy_link_address) },
3107 static const GtkActionEntry attachment_popup_entries [] = {3421- { "SaveImageAs", NULL, N_("_Save Image As…"), NULL,
3422- NULL, G_CALLBACK (ev_view_popup_cmd_save_image_as) },
3423- { "CopyImage", NULL, N_("Copy _Image"), NULL,
3424- NULL, G_CALLBACK (ev_view_popup_cmd_copy_image) },
3425- { "AnnotProperties", NULL, N_("Annotation Properties…"), NULL,
3426- NULL, G_CALLBACK (ev_view_popup_cmd_annot_properties) }
3427-};
3428-
3429-static const GtkActionEntry attachment_popup_entries [] = {
3108- { "OpenAttachment", GTK_STOCK_OPEN, N_("_Open Attachment"), NULL,3430- { "OpenAttachment", GTK_STOCK_OPEN, N_("_Open Attachment"), NULL,
3109+ { "OpenAttachment", NULL, N_("_Open Attachment"), NULL,3431- NULL, G_CALLBACK (ev_attachment_popup_cmd_open_attachment) },
3110 NULL, G_CALLBACK (ev_attachment_popup_cmd_open_attachment) },3432- { "SaveAttachmentAs", GTK_STOCK_SAVE_AS, N_("_Save Attachment As…"), NULL,
3111 { "SaveAttachmentAs", GTK_STOCK_SAVE_AS, N_("_Save Attachment As…"), NULL,3433- NULL, G_CALLBACK (ev_attachment_popup_cmd_save_attachment_as) },
3112 NULL, G_CALLBACK (ev_attachment_popup_cmd_save_attachment_as) },3434-};
3113@@ -6276,13 +5684,6 @@3435-
3436 static const GtkToggleActionEntry zoom_selector_popup_actions[] = {
3437 { "ViewFitPage", EV_STOCK_ZOOM_PAGE, N_("Fit Pa_ge"), NULL,
3438 N_("Make the current document fill the window"),
3439@@ -6276,13 +5645,6 @@
3114 }3440 }
3115 3441
3116 static void3442 static void
@@ -3124,7 +3450,7 @@
3124 zoom_action_activated_cb (EvZoomAction *action,3450 zoom_action_activated_cb (EvZoomAction *action,
3125 EvWindow *window)3451 EvWindow *window)
3126 {3452 {
3127@@ -6378,42 +5779,6 @@3453@@ -6378,42 +5740,6 @@
3128 }3454 }
3129 3455
3130 static void3456 static void
@@ -3167,7 +3493,7 @@
3167 sidebar_widget_model_set (EvSidebarLinks *ev_sidebar_links,3493 sidebar_widget_model_set (EvSidebarLinks *ev_sidebar_links,
3168 GParamSpec *pspec,3494 GParamSpec *pspec,
3169 EvWindow *ev_window)3495 EvWindow *ev_window)
3170@@ -6647,21 +6012,21 @@3496@@ -6647,21 +5973,21 @@
3171 const gchar *name = ev_link_action_get_name (action);3497 const gchar *name = ev_link_action_get_name (action);
3172 3498
3173 if (g_ascii_strcasecmp (name, "FirstPage") == 0) {3499 if (g_ascii_strcasecmp (name, "FirstPage") == 0) {
@@ -3197,7 +3523,44 @@
3197 } else {3523 } else {
3198 g_warning ("Unimplemented named action: %s, please post a "3524 g_warning ("Unimplemented named action: %s, please post a "
3199 "bug report in Evince bugzilla "3525 "bug report in Evince bugzilla "
3200@@ -6782,8 +6147,8 @@3526@@ -6702,14 +6028,21 @@
3527 }
3528
3529 static void
3530-ev_view_popup_cmd_open_link (GtkAction *action, EvWindow *window)
3531+ev_window_activate_open_link_action (GSimpleAction *action,
3532+ GVariant *parameter,
3533+ gpointer user_data)
3534 {
3535+ EvWindow *window = user_data;
3536+
3537 ev_view_handle_link (EV_VIEW (window->priv->view), window->priv->link);
3538 }
3539
3540 static void
3541-ev_view_popup_cmd_open_link_new_window (GtkAction *action, EvWindow *window)
3542+ev_window_activate_open_link_in_new_window_action (GSimpleAction *action,
3543+ GVariant *parameter,
3544+ gpointer user_data)
3545 {
3546+ EvWindow *window = user_data;
3547 EvLinkAction *ev_action = NULL;
3548 EvLinkDest *dest;
3549
3550@@ -6725,8 +6058,11 @@
3551 }
3552
3553 static void
3554-ev_view_popup_cmd_copy_link_address (GtkAction *action, EvWindow *window)
3555+ev_window_activate_copy_link_address_action (GSimpleAction *action,
3556+ GVariant *parameter,
3557+ gpointer user_data)
3558 {
3559+ EvWindow *window = user_data;
3560 EvLinkAction *ev_action;
3561
3562 ev_action = ev_link_get_action (window->priv->link);
3563@@ -6782,8 +6118,8 @@
3201 return;3564 return;
3202 }3565 }
3203 3566
@@ -3208,7 +3571,20 @@
3208 3571
3209 uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc));3572 uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc));
3210 filter = gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (fc));3573 filter = gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (fc));
3211@@ -6887,9 +6252,9 @@3574@@ -6862,8 +6198,11 @@
3575 }
3576
3577 static void
3578-ev_view_popup_cmd_save_image_as (GtkAction *action, EvWindow *window)
3579+ev_window_activate_save_image_action (GSimpleAction *action,
3580+ GVariant *parameter,
3581+ gpointer user_data)
3582 {
3583+ EvWindow *window = user_data;
3584 GtkWidget *fc;
3585
3586 if (!window->priv->image)
3587@@ -6887,9 +6226,9 @@
3212 gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (fc), TRUE);3588 gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (fc), TRUE);
3213 3589
3214 file_chooser_dialog_add_writable_pixbuf_formats (GTK_FILE_CHOOSER (fc));3590 file_chooser_dialog_add_writable_pixbuf_formats (GTK_FILE_CHOOSER (fc));
@@ -3221,7 +3597,47 @@
3221 3597
3222 g_signal_connect (fc, "response",3598 g_signal_connect (fc, "response",
3223 G_CALLBACK (image_save_dialog_response_cb),3599 G_CALLBACK (image_save_dialog_response_cb),
3224@@ -7023,8 +6388,8 @@3600@@ -6899,8 +6238,11 @@
3601 }
3602
3603 static void
3604-ev_view_popup_cmd_copy_image (GtkAction *action, EvWindow *window)
3605+ev_window_activate_copy_image_action (GSimpleAction *action,
3606+ GVariant *parameter,
3607+ gpointer user_data)
3608 {
3609+ EvWindow *window = user_data;
3610 GtkClipboard *clipboard;
3611 GdkPixbuf *pixbuf;
3612
3613@@ -6919,9 +6261,11 @@
3614 }
3615
3616 static void
3617-ev_view_popup_cmd_annot_properties (GtkAction *action,
3618- EvWindow *window)
3619+ev_window_activate_show_annotation_properties_action (GSimpleAction *action,
3620+ GVariant *parameter,
3621+ gpointer user_data)
3622 {
3623+ EvWindow *window = user_data;
3624 const gchar *author;
3625 GdkRGBA rgba;
3626 gdouble opacity;
3627@@ -6980,8 +6324,11 @@
3628 }
3629
3630 static void
3631-ev_attachment_popup_cmd_open_attachment (GtkAction *action, EvWindow *window)
3632+ev_window_activate_open_attachment_action (GSimpleAction *action,
3633+ GVariant *parameter,
3634+ gpointer user_data)
3635 {
3636+ EvWindow *window = user_data;
3637 GList *l;
3638 GdkScreen *screen;
3639
3640@@ -7023,8 +6370,8 @@
3225 return;3641 return;
3226 }3642 }
3227 3643
@@ -3232,7 +3648,20 @@
3232 3648
3233 uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc));3649 uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc));
3234 target_file = g_file_new_for_uri (uri);3650 target_file = g_file_new_for_uri (uri);
3235@@ -7122,8 +6487,8 @@3651@@ -7089,8 +6436,11 @@
3652 }
3653
3654 static void
3655-ev_attachment_popup_cmd_save_attachment_as (GtkAction *action, EvWindow *window)
3656+ev_window_activate_save_attachment_action (GSimpleAction *action,
3657+ GVariant *parameter,
3658+ gpointer user_data)
3659 {
3660+ EvWindow *window = user_data;
3661 GtkWidget *fc;
3662 EvAttachment *attachment = NULL;
3663
3664@@ -7122,8 +6472,8 @@
3236 gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (fc),3665 gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (fc),
3237 ev_attachment_get_name (attachment));3666 ev_attachment_get_name (attachment));
3238 3667
@@ -3243,7 +3672,7 @@
3243 3672
3244 g_signal_connect (fc, "response",3673 g_signal_connect (fc, "response",
3245 G_CALLBACK (attachment_save_dialog_response_cb),3674 G_CALLBACK (attachment_save_dialog_response_cb),
3246@@ -7154,16 +6519,16 @@3675@@ -7154,16 +6504,16 @@
3247 if (EV_WINDOW_IS_PRESENTATION (window))3676 if (EV_WINDOW_IS_PRESENTATION (window))
3248 ev_view_presentation_previous_page (EV_VIEW_PRESENTATION (window->priv->presentation_view));3677 ev_view_presentation_previous_page (EV_VIEW_PRESENTATION (window->priv->presentation_view));
3249 else3678 else
@@ -3264,7 +3693,7 @@
3264 }3693 }
3265 }3694 }
3266 3695
3267@@ -7278,8 +6643,72 @@3696@@ -7278,11 +6628,84 @@
3268 }3697 }
3269 3698
3270 static void3699 static void
@@ -3332,12 +3761,24 @@
3332+ { "escape", ev_window_activate_escape_action, NULL, NULL, NULL },3761+ { "escape", ev_window_activate_escape_action, NULL, NULL, NULL },
3333+ { "open-menu", ev_window_activate_open_menu_command, NULL, NULL, NULL },3762+ { "open-menu", ev_window_activate_open_menu_command, NULL, NULL, NULL },
3334+ { "caret-navigation", activate_toggle_action, NULL, "false", ev_window_change_caret_navigation_action_state },3763+ { "caret-navigation", activate_toggle_action, NULL, "false", ev_window_change_caret_navigation_action_state },
3764+ { "open-link", ev_window_activate_open_link_action, NULL, NULL, NULL },
3765+ { "open-link-in-new-window", ev_window_activate_open_link_in_new_window_action, NULL, NULL, NULL },
3766+ { "save-image", ev_window_activate_save_image_action, NULL, NULL, NULL },
3767+ { "copy-image", ev_window_activate_copy_image_action, NULL, NULL, NULL },
3768+ { "show-annotation-properties", ev_window_activate_show_annotation_properties_action, NULL, NULL, NULL },
3769+ { "copy-link-address", ev_window_activate_copy_link_address_action, NULL, NULL, NULL },
3770+ { "open-attachment", ev_window_activate_open_attachment_action, NULL, NULL, NULL },
3771+ { "save-attachment", ev_window_activate_save_attachment_action, NULL, NULL, NULL },
3335+ };3772+ };
3336+3773+
3337 GtkActionGroup *action_group;3774 GtkActionGroup *action_group;
3338 GtkAccelGroup *accel_group;3775 GtkAccelGroup *accel_group;
3339 GtkCssProvider *css_provider;3776 GtkCssProvider *css_provider;
3340@@ -7343,6 +6772,8 @@3777+ GtkBuilder *builder;
3778 GError *error = NULL;
3779 GtkWidget *sidebar_widget;
3780 GtkWidget *overlay;
3781@@ -7343,6 +6766,8 @@
3341 G_CALLBACK (activate_link_cb),3782 G_CALLBACK (activate_link_cb),
3342 ev_window);3783 ev_window);
3343 3784
@@ -3346,7 +3787,7 @@
3346 app_info = g_app_info_get_default_for_uri_scheme ("mailto");3787 app_info = g_app_info_get_default_for_uri_scheme ("mailto");
3347 ev_window->priv->has_mailto_handler = app_info != NULL;3788 ev_window->priv->has_mailto_handler = app_info != NULL;
3348 g_clear_object (&app_info);3789 g_clear_object (&app_info);
3349@@ -7351,15 +6782,13 @@3790@@ -7351,15 +6776,13 @@
3350 gtk_container_add (GTK_CONTAINER (ev_window), ev_window->priv->main_box);3791 gtk_container_add (GTK_CONTAINER (ev_window), ev_window->priv->main_box);
3351 gtk_widget_show (ev_window->priv->main_box);3792 gtk_widget_show (ev_window->priv->main_box);
3352 3793
@@ -3366,7 +3807,44 @@
3366 register_custom_actions (ev_window, action_group);3807 register_custom_actions (ev_window, action_group);
3367 3808
3368 ev_window->priv->ui_manager = gtk_ui_manager_new ();3809 ev_window->priv->ui_manager = gtk_ui_manager_new ();
3369@@ -7415,12 +6844,6 @@3810@@ -7370,24 +6793,6 @@
3811 gtk_ui_manager_get_accel_group (ev_window->priv->ui_manager);
3812 gtk_window_add_accel_group (GTK_WINDOW (ev_window), accel_group);
3813
3814- action_group = gtk_action_group_new ("ViewPopupActions");
3815- ev_window->priv->view_popup_action_group = action_group;
3816- gtk_action_group_set_translation_domain (action_group, NULL);
3817- gtk_action_group_add_actions (action_group, view_popup_entries,
3818- G_N_ELEMENTS (view_popup_entries),
3819- ev_window);
3820- gtk_ui_manager_insert_action_group (ev_window->priv->ui_manager,
3821- action_group, 0);
3822-
3823- action_group = gtk_action_group_new ("AttachmentPopupActions");
3824- ev_window->priv->attachment_popup_action_group = action_group;
3825- gtk_action_group_set_translation_domain (action_group, NULL);
3826- gtk_action_group_add_actions (action_group, attachment_popup_entries,
3827- G_N_ELEMENTS (attachment_popup_entries),
3828- ev_window);
3829- gtk_ui_manager_insert_action_group (ev_window->priv->ui_manager,
3830- action_group, 0);
3831-
3832 action_group = gtk_action_group_new ("ZoomSelectorPopupActions");
3833 ev_window->priv->zoom_selector_popup_action_group = action_group;
3834 gtk_action_group_set_translation_domain (action_group, NULL);
3835@@ -7397,11 +6802,6 @@
3836 gtk_ui_manager_insert_action_group (ev_window->priv->ui_manager,
3837 action_group, 0);
3838
3839- gtk_ui_manager_add_ui_from_resource (ev_window->priv->ui_manager,
3840- "/org/gnome/evince/shell/ui/evince.xml",
3841- &error);
3842- g_assert_no_error (error);
3843-
3844 ev_window_register_zoom_selector_popup_actions (ev_window);
3845
3846 css_provider = gtk_css_provider_new ();
3847@@ -7415,12 +6815,6 @@
3370 g_object_unref (css_provider);3848 g_object_unref (css_provider);
3371 3849
3372 ev_window->priv->recent_manager = gtk_recent_manager_get_default ();3850 ev_window->priv->recent_manager = gtk_recent_manager_get_default ();
@@ -3379,7 +3857,7 @@
3379 3857
3380 ev_window->priv->toolbar = ev_toolbar_new (ev_window);3858 ev_window->priv->toolbar = ev_toolbar_new (ev_window);
3381 gtk_widget_set_no_show_all (ev_window->priv->toolbar, TRUE);3859 gtk_widget_set_no_show_all (ev_window->priv->toolbar, TRUE);
3382@@ -7526,10 +6949,6 @@3860@@ -7526,10 +6920,6 @@
3383 3861
3384 sidebar_widget = ev_sidebar_bookmarks_new ();3862 sidebar_widget = ev_sidebar_bookmarks_new ();
3385 ev_window->priv->sidebar_bookmarks = sidebar_widget;3863 ev_window->priv->sidebar_bookmarks = sidebar_widget;
@@ -3390,7 +3868,7 @@
3390 gtk_widget_show (sidebar_widget);3868 gtk_widget_show (sidebar_widget);
3391 ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),3869 ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
3392 sidebar_widget);3870 sidebar_widget);
3393@@ -7565,7 +6984,7 @@3871@@ -7565,7 +6955,7 @@
3394 g_object_set(ev_window->priv->view, "enable-gestures",3872 g_object_set(ev_window->priv->view, "enable-gestures",
3395 _oif_ev_application_get_gestures_enabled (EV_APP), NULL);3873 _oif_ev_application_get_gestures_enabled (EV_APP), NULL);
3396 #endif3874 #endif
@@ -3399,7 +3877,30 @@
3399 GS_PAGE_CACHE_SIZE);3877 GS_PAGE_CACHE_SIZE);
3400 ev_view_set_page_cache_size (EV_VIEW (ev_window->priv->view),3878 ev_view_set_page_cache_size (EV_VIEW (ev_window->priv->view),
3401 page_cache_mb * 1024 * 1024);3879 page_cache_mb * 1024 * 1024);
3402@@ -7731,9 +7150,6 @@3880@@ -7707,13 +7097,17 @@
3881 G_CALLBACK (find_bar_visibility_changed_cb),
3882 ev_window);
3883
3884+ builder = gtk_builder_new_from_resource ("/org/gnome/evince/shell/ui/popup-menus.ui");
3885+
3886 /* Popups */
3887- ev_window->priv->view_popup = gtk_ui_manager_get_widget (ev_window->priv->ui_manager,
3888- "/DocumentPopup");
3889- ev_window->priv->link = NULL;
3890+ ev_window->priv->document_view_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "document-view-menu"));
3891+ ev_window->priv->external_link_section = G_MENU_MODEL (gtk_builder_get_object (builder, "external-link-menu"));
3892+ ev_window->priv->internal_link_section = G_MENU_MODEL (gtk_builder_get_object (builder, "internal-link-menu"));
3893+ ev_window->priv->image_section = G_MENU_MODEL (gtk_builder_get_object (builder, "image-menu"));
3894+ ev_window->priv->attachment_section = G_MENU_MODEL (gtk_builder_get_object (builder, "attachment-menu"));
3895+ ev_window->priv->annotation_section = G_MENU_MODEL (gtk_builder_get_object (builder, "annotation-menu"));
3896
3897- ev_window->priv->attachment_popup = gtk_ui_manager_get_widget (ev_window->priv->ui_manager,
3898- "/AttachmentPopup");
3899+ ev_window->priv->link = NULL;
3900 ev_window->priv->attach_list = NULL;
3901
3902 /* Media player keys */
3903@@ -7731,9 +7125,6 @@
3403 g_settings_delay (ev_window->priv->default_settings);3904 g_settings_delay (ev_window->priv->default_settings);
3404 ev_window_setup_default (ev_window);3905 ev_window_setup_default (ev_window);
3405 3906
@@ -3409,7 +3910,16 @@
3409 gtk_window_set_default_size (GTK_WINDOW (ev_window), 600, 600);3910 gtk_window_set_default_size (GTK_WINDOW (ev_window), 600, 600);
3410 3911
3411 ev_window_sizing_mode_changed_cb (ev_window->priv->model, NULL, ev_window);3912 ev_window_sizing_mode_changed_cb (ev_window->priv->model, NULL, ev_window);
3412@@ -7762,7 +7178,6 @@3913@@ -7745,6 +7136,8 @@
3914 NULL, 0,
3915 GDK_ACTION_COPY);
3916 gtk_drag_dest_add_uri_targets (GTK_WIDGET (ev_window));
3917+
3918+ g_object_unref (builder);
3919 }
3920
3921 /**
3922@@ -7762,7 +7155,6 @@
3413 ev_window = GTK_WIDGET (g_object_new (EV_TYPE_WINDOW,3923 ev_window = GTK_WIDGET (g_object_new (EV_TYPE_WINDOW,
3414 "type", GTK_WINDOW_TOPLEVEL,3924 "type", GTK_WINDOW_TOPLEVEL,
3415 "application", g_application_get_default (),3925 "application", g_application_get_default (),
@@ -3417,7 +3927,7 @@
3417 NULL));3927 NULL));
3418 3928
3419 return ev_window;3929 return ev_window;
3420@@ -7801,3 +7216,11 @@3930@@ -7801,3 +7193,11 @@
3421 3931
3422 return ev_window->priv->zoom_selector_popup_action_group;3932 return ev_window->priv->zoom_selector_popup_action_group;
3423 }3933 }
@@ -3431,8 +3941,8 @@
3431+}3941+}
3432Index: evince-3.10.3/shell/ev-window.h3942Index: evince-3.10.3/shell/ev-window.h
3433===================================================================3943===================================================================
3434--- evince-3.10.3.orig/shell/ev-window.h 2014-03-03 12:17:53.199442435 +01003944--- evince-3.10.3.orig/shell/ev-window.h 2014-03-04 14:02:21.045143557 +0100
3435+++ evince-3.10.3/shell/ev-window.h 2014-03-03 12:17:53.191442435 +01003945+++ evince-3.10.3/shell/ev-window.h 2014-03-04 14:02:21.041143557 +0100
3436@@ -89,7 +89,7 @@3946@@ -89,7 +89,7 @@
3437 GtkUIManager *ev_window_get_ui_manager (EvWindow *ev_window);3947 GtkUIManager *ev_window_get_ui_manager (EvWindow *ev_window);
3438 GtkActionGroup *ev_window_get_main_action_group (EvWindow *ev_window);3948 GtkActionGroup *ev_window_get_main_action_group (EvWindow *ev_window);
@@ -3444,8 +3954,8 @@
3444 3954
3445Index: evince-3.10.3/shell/evince-appmenu.ui3955Index: evince-3.10.3/shell/evince-appmenu.ui
3446===================================================================3956===================================================================
3447--- evince-3.10.3.orig/shell/evince-appmenu.ui 2014-03-03 12:17:53.199442435 +01003957--- evince-3.10.3.orig/shell/evince-appmenu.ui 2014-03-04 14:02:21.045143557 +0100
3448+++ evince-3.10.3/shell/evince-appmenu.ui 2014-03-03 12:17:53.191442435 +01003958+++ evince-3.10.3/shell/evince-appmenu.ui 2014-03-04 14:02:21.041143557 +0100
3449@@ -20,6 +20,16 @@3959@@ -20,6 +20,16 @@
3450 <menu id="appmenu">3960 <menu id="appmenu">
3451 <section>3961 <section>
@@ -3465,10 +3975,10 @@
3465 <attribute name="accel">F1</attribute>3975 <attribute name="accel">F1</attribute>
3466Index: evince-3.10.3/shell/evince-ui.xml3976Index: evince-3.10.3/shell/evince-ui.xml
3467===================================================================3977===================================================================
3468--- evince-3.10.3.orig/shell/evince-ui.xml 2014-03-03 12:17:53.199442435 +01003978--- evince-3.10.3.orig/shell/evince-ui.xml 2014-03-04 14:02:21.045143557 +0100
3469+++ evince-3.10.3/shell/evince-ui.xml 2014-03-03 12:17:53.191442435 +01003979+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
3470@@ -1,70 +1,10 @@3980@@ -1,118 +0,0 @@
3471 <ui>3981-<ui>
3472- <popup name="ActionMenu" accelerators="true">3982- <popup name="ActionMenu" accelerators="true">
3473- <menuitem name="FileOpenMenu" action="FileOpen"/>3983- <menuitem name="FileOpenMenu" action="FileOpen"/>
3474- <menuitem name="FileOpenCopyMenu" action="FileOpenCopy"/>3984- <menuitem name="FileOpenCopyMenu" action="FileOpenCopy"/>
@@ -3521,12 +4031,12 @@
3521- <menuitem name="ViewReload" action="ViewReload"/>4031- <menuitem name="ViewReload" action="ViewReload"/>
3522- </popup>4032- </popup>
3523-4033-
3524 <popup name="DocumentPopup" action="DocumentPopupAction">4034- <popup name="DocumentPopup" action="DocumentPopupAction">
3525 <menuitem name="OpenLink" action="OpenLink"/>4035- <menuitem name="OpenLink" action="OpenLink"/>
3526 <menuitem name="CopyLinkAddress" action="CopyLinkAddress"/>4036- <menuitem name="CopyLinkAddress" action="CopyLinkAddress"/>
3527 <menuitem name="GoLink" action="GoLink"/>4037- <menuitem name="GoLink" action="GoLink"/>
3528 <menuitem name="OpenLinkNewWindow" action="OpenLinkNewWindow"/>4038- <menuitem name="OpenLinkNewWindow" action="OpenLinkNewWindow"/>
3529 <separator/>4039- <separator/>
3530- <menuitem name="GoPreviousPage" action="GoPreviousPage"/>4040- <menuitem name="GoPreviousPage" action="GoPreviousPage"/>
3531- <menuitem name="GoNextPage" action="GoNextPage"/>4041- <menuitem name="GoNextPage" action="GoNextPage"/>
3532- <menuitem name="ViewReload" action="ViewReload"/>4042- <menuitem name="ViewReload" action="ViewReload"/>
@@ -3535,21 +4045,29 @@
3535- <menuitem name="EditCopy" action="EditCopy"/>4045- <menuitem name="EditCopy" action="EditCopy"/>
3536- <menuitem name="EditSelectAllPopup" action="EditSelectAll"/>4046- <menuitem name="EditSelectAllPopup" action="EditSelectAll"/>
3537- <separator/>4047- <separator/>
3538 <menuitem name="SaveImageAs" action="SaveImageAs"/>4048- <menuitem name="SaveImageAs" action="SaveImageAs"/>
3539 <menuitem name="CopyImage" action="CopyImage"/>4049- <menuitem name="CopyImage" action="CopyImage"/>
3540 <separator/>4050- <separator/>
3541@@ -72,7 +12,6 @@4051- <menuitem name="OpenAttachment" action="OpenAttachment"/>
3542 <menuitem name="SaveAttachmentAs" action="SaveAttachmentAs"/>4052- <menuitem name="SaveAttachmentAs" action="SaveAttachmentAs"/>
3543 <separator/>4053- <separator/>
3544 <menuitem name="AnnotProperties" action="AnnotProperties"/>4054- <menuitem name="AnnotProperties" action="AnnotProperties"/>
3545- <menuitem name="FileOpenContainingFolder" action="FileOpenContainingFolder"/>4055- <menuitem name="FileOpenContainingFolder" action="FileOpenContainingFolder"/>
3546 </popup>4056- </popup>
3547 4057-
3548 <popup name="AttachmentPopup" action="AttachmentPopupAction">4058- <popup name="AttachmentPopup" action="AttachmentPopupAction">
3549@@ -88,31 +27,4 @@4059- <menuitem name="OpenAttachment" action="OpenAttachment"/>
3550 <separator/>4060- <separator/>
3551 <placeholder name="ViewZoomItems"/>4061- <menuitem name="SaveAttachmentAs" action="SaveAttachmentAs"/>
3552 </popup>4062- </popup>
4063-
4064- <popup name="ZoomSelectorPopup">
4065- <menuitem name="ViewFitPage" action="ViewFitPage"/>
4066- <menuitem name="ViewFitWidth" action="ViewFitWidth"/>
4067- <menuitem name="ViewZoomAutomatic" action="ViewZoomAutomatic"/>
4068- <separator/>
4069- <placeholder name="ViewZoomItems"/>
4070- </popup>
3553-4071-
3554- <accelerator name="PageDownAccel" action="PageDown"/>4072- <accelerator name="PageDownAccel" action="PageDown"/>
3555- <accelerator name="PageUpAccel" action="PageUp"/>4073- <accelerator name="PageUpAccel" action="PageUp"/>
@@ -3577,24 +4095,27 @@
3577- <accelerator name="FitWidthAccel" action ="FitWidth" />4095- <accelerator name="FitWidthAccel" action ="FitWidth" />
3578- <accelerator name="F10Accel" action="F10" />4096- <accelerator name="F10Accel" action="F10" />
3579- <accelerator name="F7Accel" action="F7" />4097- <accelerator name="F7Accel" action="F7" />
3580 </ui>4098-</ui>
3581Index: evince-3.10.3/shell/evince.gresource.xml4099Index: evince-3.10.3/shell/evince.gresource.xml
3582===================================================================4100===================================================================
3583--- evince-3.10.3.orig/shell/evince.gresource.xml 2014-03-03 12:17:53.199442435 +01004101--- evince-3.10.3.orig/shell/evince.gresource.xml 2014-03-04 14:02:21.045143557 +0100
3584+++ evince-3.10.3/shell/evince.gresource.xml 2014-03-03 12:17:53.195442435 +01004102+++ evince-3.10.3/shell/evince.gresource.xml 2014-03-04 14:02:21.041143557 +0100
3585@@ -19,6 +19,7 @@4103@@ -17,8 +17,9 @@
4104 -->
4105 <gresources>
3586 <gresource prefix="/org/gnome/evince/shell">4106 <gresource prefix="/org/gnome/evince/shell">
3587 <file alias="ui/evince.xml" compressed="true" preprocess="xml-stripblanks">evince-ui.xml</file>4107- <file alias="ui/evince.xml" compressed="true" preprocess="xml-stripblanks">evince-ui.xml</file>
3588 <file alias="ui/evince.css" compressed="true">evince.css</file>4108 <file alias="ui/evince.css" compressed="true">evince.css</file>
3589- <file alias="ui/appmenu.ui" compressed="true" preprocess="xml-stripblanks">evince-appmenu.ui</file>4109- <file alias="ui/appmenu.ui" compressed="true" preprocess="xml-stripblanks">evince-appmenu.ui</file>
3590+ <file alias="ui/menus.ui" compressed="true" preprocess="xml-stripblanks">menus.ui</file>4110+ <file alias="ui/menus.ui" compressed="true" preprocess="xml-stripblanks">menus.ui</file>
3591+ <file alias="ui/traditional-menus.ui" compressed="true" preprocess="xml-stripblanks">traditional-menus.ui</file>4111+ <file alias="ui/traditional-menus.ui" compressed="true" preprocess="xml-stripblanks">traditional-menus.ui</file>
4112+ <file alias="ui/popup-menus.ui" compressed="true" preprocess="xml-stripblanks">popup-menus.ui</file>
3592 </gresource>4113 </gresource>
3593 </gresources>4114 </gresources>
3594Index: evince-3.10.3/shell/menus.ui4115Index: evince-3.10.3/shell/menus.ui
3595===================================================================4116===================================================================
3596--- /dev/null 1970-01-01 00:00:00.000000000 +00004117--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3597+++ evince-3.10.3/shell/menus.ui 2014-03-03 12:18:09.000000000 +01004118+++ evince-3.10.3/shell/menus.ui 2014-03-04 14:02:24.000000000 +0100
3598@@ -0,0 +1,188 @@4119@@ -0,0 +1,188 @@
3599+<?xml version="1.0" encoding="UTF-8"?>4120+<?xml version="1.0" encoding="UTF-8"?>
3600+<!--4121+<!--
@@ -3787,7 +4308,7 @@
3787Index: evince-3.10.3/shell/traditional-menus.ui4308Index: evince-3.10.3/shell/traditional-menus.ui
3788===================================================================4309===================================================================
3789--- /dev/null 1970-01-01 00:00:00.000000000 +00004310--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3790+++ evince-3.10.3/shell/traditional-menus.ui 2014-03-03 12:17:53.195442435 +01004311+++ evince-3.10.3/shell/traditional-menus.ui 2014-03-04 14:02:21.041143557 +0100
3791@@ -0,0 +1,230 @@4312@@ -0,0 +1,230 @@
3792+<?xml version="1.0" encoding="UTF-8"?>4313+<?xml version="1.0" encoding="UTF-8"?>
3793+<!--4314+<!--
@@ -4021,8 +4542,8 @@
4021+</interface>4542+</interface>
4022Index: evince-3.10.3/po/POTFILES.in4543Index: evince-3.10.3/po/POTFILES.in
4023===================================================================4544===================================================================
4024--- evince-3.10.3.orig/po/POTFILES.in 2014-03-03 12:17:53.199442435 +01004545--- evince-3.10.3.orig/po/POTFILES.in 2014-03-04 14:02:21.045143557 +0100
4025+++ evince-3.10.3/po/POTFILES.in 2014-03-03 12:17:53.195442435 +01004546+++ evince-3.10.3/po/POTFILES.in 2014-03-04 14:02:21.041143557 +0100
4026@@ -56,3 +56,6 @@4547@@ -56,3 +56,6 @@
4027 shell/ev-window-title.c4548 shell/ev-window-title.c
4028 shell/main.c4549 shell/main.c
@@ -4030,3 +4551,122 @@
4030+[type: gettext/glade]shell/menus.ui4551+[type: gettext/glade]shell/menus.ui
4031+[type: gettext/glade]shell/traditional-menus.ui4552+[type: gettext/glade]shell/traditional-menus.ui
4032+shell/ev-toolbar.c4553+shell/ev-toolbar.c
4554Index: evince-3.10.3/shell/popup-menus.ui
4555===================================================================
4556--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4557+++ evince-3.10.3/shell/popup-menus.ui 2014-03-04 14:02:45.629144561 +0100
4558@@ -0,0 +1,114 @@
4559+<?xml version="1.0" encoding="UTF-8"?>
4560+<!--
4561+ Copyright © 2013 Canonical Ltd.
4562+
4563+ This program is free software; you can redistribute it and/or modify
4564+ it under the terms of the GNU General Public License as published by
4565+ the Free Software Foundation; either version 3, or (at your option)
4566+ any later version.
4567+
4568+ This program is distributed in the hope conf it will be useful,
4569+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4570+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4571+ GNU General Public License for more details.
4572+
4573+ You should have received a copy of the GNU General Public License
4574+ along with this program; if not, write to the Free Software
4575+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4576+
4577+ Author: Lars Uebernickel <lars.uebernickel@canonical.com>
4578+-->
4579+<interface>
4580+ <menu id="document-view-menu">
4581+ <section>
4582+ <item>
4583+ <attribute name="label" translatable="yes">_Previous Page</attribute>
4584+ <attribute name="action">win.go-previous-page</attribute>
4585+ </item>
4586+ <item>
4587+ <attribute name="label" translatable="yes">_Next Page</attribute>
4588+ <attribute name="action">win.go-next-page</attribute>
4589+ </item>
4590+ <item>
4591+ <attribute name="label" translatable="yes">_Reload</attribute>
4592+ <attribute name="action">win.reload</attribute>
4593+ </item>
4594+ <item>
4595+ <attribute name="label" translatable="yes">Auto_scroll</attribute>
4596+ <attribute name="action">win.auto-scroll</attribute>
4597+ </item>
4598+ </section>
4599+ <section>
4600+ <item>
4601+ <attribute name="label" translatable="yes">_Copy</attribute>
4602+ <attribute name="action">win.copy</attribute>
4603+ </item>
4604+ <item>
4605+ <attribute name="label" translatable="yes">Select _All</attribute>
4606+ <attribute name="action">win.select-all</attribute>
4607+ </item>
4608+ </section>
4609+ <section>
4610+ <item>
4611+ <attribute name="label" translatable="yes">Open Containing _Folder</attribute>
4612+ <attribute name="action">win.open-containing-folder</attribute>
4613+ </item>
4614+ </section>
4615+ </menu>
4616+ <menu id="external-link-menu">
4617+ <section>
4618+ <item>
4619+ <attribute name="label" translatable="yes">_Open Link</attribute>
4620+ <attribute name="action">win.open-link</attribute>
4621+ </item>
4622+ <item>
4623+ <attribute name="label" translatable="yes">_Copy Link Address</attribute>
4624+ <attribute name="action">win.copy-link-address</attribute>
4625+ </item>
4626+ </section>
4627+ </menu>
4628+ <menu id="internal-link-menu">
4629+ <section>
4630+ <item>
4631+ <attribute name="label" translatable="yes">_Go To</attribute>
4632+ <attribute name="action">win.open-link</attribute>
4633+ </item>
4634+ <item>
4635+ <attribute name="label" translatable="yes">Open in New _Window</attribute>
4636+ <attribute name="action">win.open-link-in-new-window</attribute>
4637+ </item>
4638+ </section>
4639+ </menu>
4640+ <menu id="image-menu">
4641+ <section>
4642+ <item>
4643+ <attribute name="label" translatable="yes">_Save Image As…</attribute>
4644+ <attribute name="action">win.save-image</attribute>
4645+ </item>
4646+ <item>
4647+ <attribute name="label" translatable="yes">Copy _Image</attribute>
4648+ <attribute name="action">win.copy-image</attribute>
4649+ </item>
4650+ </section>
4651+ </menu>
4652+ <menu id="attachment-menu">
4653+ <section>
4654+ <item>
4655+ <attribute name="label" translatable="yes">_Open Attachment</attribute>
4656+ <attribute name="action">win.open-attachment</attribute>
4657+ </item>
4658+ <item>
4659+ <attribute name="label" translatable="yes">_Save Attachment As…</attribute>
4660+ <attribute name="action">win.save-attachment</attribute>
4661+ </item>
4662+ </section>
4663+ </menu>
4664+ <menu id="annotation-menu">
4665+ <section>
4666+ <item>
4667+ <attribute name="label" translatable="yes">Annotation Properties…</attribute>
4668+ <attribute name="action">win.show-annotation-properties</attribute>
4669+ </item>
4670+ </section>
4671+ </menu>
4672+</interface>

Subscribers

People subscribed via source and target branches

to all changes: