Merge lp:~larsu/eog/menubar into lp:~ubuntu-desktop/eog/ubuntu
- menubar
- Merge into ubuntu
Proposed by
Lars Karlitski
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 168 | ||||
Proposed branch: | lp:~larsu/eog/menubar | ||||
Merge into: | lp:~ubuntu-desktop/eog/ubuntu | ||||
Diff against target: |
750 lines (+513/-180) 8 files modified
debian/changelog (+8/-2) debian/control (+2/-1) debian/control.in (+2/-1) debian/patches/0001-Add-a-traditional-menu-bar.patch (+360/-0) debian/patches/0002-Show-traditional-title-bar-in-unity.patch (+139/-0) debian/patches/disable-appmenu-when-not-needed.patch (+0/-33) debian/patches/series (+2/-3) debian/patches/unity_traditional_titlebar.patch (+0/-140) |
||||
To merge this branch: | bzr merge lp:~larsu/eog/menubar | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Desktop | Pending | ||
Review via email: mp+272724@code.launchpad.net |
Commit message
* Add debian/
* Update debian/
update to make work with menubar patch and use GActionGroup's signals
Description of the change
* Add debian/
* Update debian/
update to make work with menubar patch and use GActionGroup's signals
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2015-09-21 10:57:41 +0000 | |||
3 | +++ debian/changelog 2015-09-29 10:38:28 +0000 | |||
4 | @@ -1,8 +1,14 @@ | |||
6 | 1 | eog (3.16.3-1ubuntu2) UNRELEASED; urgency=medium | 1 | eog (3.16.3-1ubuntu4) UNRELEASED; urgency=medium |
7 | 2 | 2 | ||
8 | 3 | [ Iain Lane ] | ||
9 | 3 | * Make the toolbar hide in fullscreen. | 4 | * Make the toolbar hide in fullscreen. |
10 | 4 | 5 | ||
12 | 5 | -- Iain Lane <iain.lane@canonical.com> Mon, 21 Sep 2015 11:53:13 +0100 | 6 | [ Lars Uebernickel ] |
13 | 7 | * Add debian/patches/0001-Add-a-traditional-menu-bar.patch | ||
14 | 8 | * Update debian/patches/0002-Show-traditional-title-bar-in-unity.patch: | ||
15 | 9 | update to make work with menubar patch and use GActionGroup's signals | ||
16 | 10 | |||
17 | 11 | -- Lars Uebernickel <lars.uebernickel@ubuntu.com> Tue, 29 Sep 2015 12:30:46 +0200 | ||
18 | 6 | 12 | ||
19 | 7 | eog (3.16.3-1ubuntu1) wily; urgency=low | 13 | eog (3.16.3-1ubuntu1) wily; urgency=low |
20 | 8 | 14 | ||
21 | 9 | 15 | ||
22 | === modified file 'debian/control' | |||
23 | --- debian/control 2015-09-21 10:53:08 +0000 | |||
24 | +++ debian/control 2015-09-29 10:38:28 +0000 | |||
25 | @@ -5,7 +5,8 @@ | |||
26 | 5 | Source: eog | 5 | Source: eog |
27 | 6 | Section: gnome | 6 | Section: gnome |
28 | 7 | Priority: optional | 7 | Priority: optional |
30 | 8 | Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> | 8 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
31 | 9 | XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> | ||
32 | 9 | Uploaders: Andreas Henriksson <andreas@fatal.se>, Iain Lane <laney@debian.org>, Michael Biebl <biebl@debian.org>, Sjoerd Simons <sjoerd@debian.org> | 10 | Uploaders: Andreas Henriksson <andreas@fatal.se>, Iain Lane <laney@debian.org>, Michael Biebl <biebl@debian.org>, Sjoerd Simons <sjoerd@debian.org> |
33 | 10 | Standards-Version: 3.9.6 | 11 | Standards-Version: 3.9.6 |
34 | 11 | Homepage: https://wiki.gnome.org/Apps/EyeOfGnome | 12 | Homepage: https://wiki.gnome.org/Apps/EyeOfGnome |
35 | 12 | 13 | ||
36 | === modified file 'debian/control.in' | |||
37 | --- debian/control.in 2015-05-27 16:03:38 +0000 | |||
38 | +++ debian/control.in 2015-09-29 10:38:28 +0000 | |||
39 | @@ -1,7 +1,8 @@ | |||
40 | 1 | Source: eog | 1 | Source: eog |
41 | 2 | Section: gnome | 2 | Section: gnome |
42 | 3 | Priority: optional | 3 | Priority: optional |
44 | 4 | Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> | 4 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
45 | 5 | XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> | ||
46 | 5 | Uploaders: @GNOME_TEAM@ | 6 | Uploaders: @GNOME_TEAM@ |
47 | 6 | Standards-Version: 3.9.6 | 7 | Standards-Version: 3.9.6 |
48 | 7 | Homepage: https://wiki.gnome.org/Apps/EyeOfGnome | 8 | Homepage: https://wiki.gnome.org/Apps/EyeOfGnome |
49 | 8 | 9 | ||
50 | === added file 'debian/patches/0001-Add-a-traditional-menu-bar.patch' | |||
51 | --- debian/patches/0001-Add-a-traditional-menu-bar.patch 1970-01-01 00:00:00 +0000 | |||
52 | +++ debian/patches/0001-Add-a-traditional-menu-bar.patch 2015-09-29 10:38:28 +0000 | |||
53 | @@ -0,0 +1,360 @@ | |||
54 | 1 | From b7cf1b9c79f6c547ac8daec82d3fa851ceec839d Mon Sep 17 00:00:00 2001 | ||
55 | 2 | From: Lars Uebernickel <lars.uebernickel@canonical.com> | ||
56 | 3 | Date: Fri, 25 Sep 2015 10:27:24 +0200 | ||
57 | 4 | Subject: [PATCH 1/2] Add a traditional menu bar | ||
58 | 5 | |||
59 | 6 | --- | ||
60 | 7 | data/eog-menubar.xml | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
61 | 8 | src/eog-application.c | 39 +++++++--- | ||
62 | 9 | src/eog-window.c | 44 ++++++----- | ||
63 | 10 | src/eog.gresource.xml | 1 + | ||
64 | 11 | 4 files changed, 259 insertions(+), 30 deletions(-) | ||
65 | 12 | create mode 100644 data/eog-menubar.xml | ||
66 | 13 | |||
67 | 14 | diff --git a/data/eog-menubar.xml b/data/eog-menubar.xml | ||
68 | 15 | new file mode 100644 | ||
69 | 16 | index 0000000..cc99604 | ||
70 | 17 | --- /dev/null | ||
71 | 18 | +++ b/data/eog-menubar.xml | ||
72 | 19 | @@ -0,0 +1,205 @@ | ||
73 | 20 | +<?xml version="1.0" encoding="utf-8"?> | ||
74 | 21 | +<interface> | ||
75 | 22 | + <menu id="menubar"> | ||
76 | 23 | + <submenu> | ||
77 | 24 | + <attribute name="label" translatable="yes">_Image</attribute> | ||
78 | 25 | + <section> | ||
79 | 26 | + <item> | ||
80 | 27 | + <attribute name="label" translatable="yes">_Open…</attribute> | ||
81 | 28 | + <attribute name="action">win.open</attribute> | ||
82 | 29 | + <attribute name="accel"><Ctrl>o</attribute> | ||
83 | 30 | + </item> | ||
84 | 31 | + </section> | ||
85 | 32 | + <section> | ||
86 | 33 | + <item> | ||
87 | 34 | + <attribute name="label" translatable="yes">_Save</attribute> | ||
88 | 35 | + <attribute name="action">win.save</attribute> | ||
89 | 36 | + <attribute name="accel"><Ctrl>s</attribute> | ||
90 | 37 | + </item> | ||
91 | 38 | + <item> | ||
92 | 39 | + <attribute name="label" translatable="yes">_Save As…</attribute> | ||
93 | 40 | + <attribute name="action">win.save-as</attribute> | ||
94 | 41 | + <attribute name="accel"><Ctrl><Shift>s</attribute> | ||
95 | 42 | + </item> | ||
96 | 43 | + </section> | ||
97 | 44 | + <section> | ||
98 | 45 | + <item> | ||
99 | 46 | + <attribute name="label" translatable="yes">Print…</attribute> | ||
100 | 47 | + <attribute name="action">win.print</attribute> | ||
101 | 48 | + <attribute name="accel"><Ctrl>p</attribute> | ||
102 | 49 | + </item> | ||
103 | 50 | + </section> | ||
104 | 51 | + <section> | ||
105 | 52 | + <item> | ||
106 | 53 | + <attribute name="label" translatable="yes">Set as _Wallpaper</attribute> | ||
107 | 54 | + <attribute name="action">win.set-wallpaper</attribute> | ||
108 | 55 | + <attribute name="accel"><Ctrl>F8</attribute> | ||
109 | 56 | + </item> | ||
110 | 57 | + <item> | ||
111 | 58 | + <attribute name="label" translatable="yes">Show Containing _Folder</attribute> | ||
112 | 59 | + <attribute name="action">win.open-folder</attribute> | ||
113 | 60 | + </item> | ||
114 | 61 | + </section> | ||
115 | 62 | + <section> | ||
116 | 63 | + <item> | ||
117 | 64 | + <attribute name="label" translatable="yes">Image Properties</attribute> | ||
118 | 65 | + <attribute name="action">win.properties</attribute> | ||
119 | 66 | + <attribute name="accel"><Alt>Return</attribute> | ||
120 | 67 | + </item> | ||
121 | 68 | + </section> | ||
122 | 69 | + <section> | ||
123 | 70 | + <item> | ||
124 | 71 | + <attribute name="label" translatable="yes">_Close</attribute> | ||
125 | 72 | + <attribute name="action">win.close</attribute> | ||
126 | 73 | + <attribute name="accel"><Ctrl>w</attribute> | ||
127 | 74 | + </item> | ||
128 | 75 | + </section> | ||
129 | 76 | + </submenu> | ||
130 | 77 | + <submenu> | ||
131 | 78 | + <attribute name="label" translatable="yes">_Edit</attribute> | ||
132 | 79 | + <section> | ||
133 | 80 | + <item> | ||
134 | 81 | + <attribute name="label" translatable="yes">_Undo</attribute> | ||
135 | 82 | + <attribute name="action">win.undo</attribute> | ||
136 | 83 | + <attribute name="accel"><Ctrl>z</attribute> | ||
137 | 84 | + </item> | ||
138 | 85 | + </section> | ||
139 | 86 | + <section> | ||
140 | 87 | + <item> | ||
141 | 88 | + <attribute name="label" translatable="yes">_Copy Image</attribute> | ||
142 | 89 | + <attribute name="action">win.copy</attribute> | ||
143 | 90 | + <attribute name="accel"><Ctrl>c</attribute> | ||
144 | 91 | + </item> | ||
145 | 92 | + </section> | ||
146 | 93 | + <section> | ||
147 | 94 | + <item> | ||
148 | 95 | + <attribute name="label" translatable="yes">Flip _Horizontal</attribute> | ||
149 | 96 | + <attribute name="action">win.flip-horizontal</attribute> | ||
150 | 97 | + </item> | ||
151 | 98 | + <item> | ||
152 | 99 | + <attribute name="label" translatable="yes">Flip _Vertical</attribute> | ||
153 | 100 | + <attribute name="action">win.flip-vertical</attribute> | ||
154 | 101 | + </item> | ||
155 | 102 | + </section> | ||
156 | 103 | + <section> | ||
157 | 104 | + <item> | ||
158 | 105 | + <attribute name="label" translatable="yes">_Rotate Clockwise</attribute> | ||
159 | 106 | + <attribute name="action">win.rotate-90</attribute> | ||
160 | 107 | + <attribute name="accel"><Ctrl>r</attribute> | ||
161 | 108 | + </item> | ||
162 | 109 | + <item> | ||
163 | 110 | + <attribute name="label" translatable="yes">Rotate Counter_clockwise</attribute> | ||
164 | 111 | + <attribute name="action">win.rotate-270</attribute> | ||
165 | 112 | + <attribute name="accel"><Ctrl><Shift>r</attribute> | ||
166 | 113 | + </item> | ||
167 | 114 | + </section> | ||
168 | 115 | + <section> | ||
169 | 116 | + <item> | ||
170 | 117 | + <attribute name="label" translatable="yes">Move to _Trash</attribute> | ||
171 | 118 | + <attribute name="action">win.move-trash</attribute> | ||
172 | 119 | + <attribute name="accel">Delete</attribute> | ||
173 | 120 | + </item> | ||
174 | 121 | + <item> | ||
175 | 122 | + <attribute name="label" translatable="yes">_Delete</attribute> | ||
176 | 123 | + <attribute name="action">win.delete</attribute> | ||
177 | 124 | + <attribute name="accel"><Shift>Delete</attribute> | ||
178 | 125 | + </item> | ||
179 | 126 | + </section> | ||
180 | 127 | + <section> | ||
181 | 128 | + <item> | ||
182 | 129 | + <attribute name="label" translatable="yes">_Preferences</attribute> | ||
183 | 130 | + <attribute name="action">app.preferences</attribute> | ||
184 | 131 | + </item> | ||
185 | 132 | + </section> | ||
186 | 133 | + </submenu> | ||
187 | 134 | + <submenu> | ||
188 | 135 | + <attribute name="label" translatable="yes">_View</attribute> | ||
189 | 136 | + <section> | ||
190 | 137 | + <item> | ||
191 | 138 | + <attribute name="label" translatable="yes">_Statusbar</attribute> | ||
192 | 139 | + <attribute name="action">win.view-statusbar</attribute> | ||
193 | 140 | + </item> | ||
194 | 141 | + <item> | ||
195 | 142 | + <attribute name="label" translatable="yes">_Image Gallery</attribute> | ||
196 | 143 | + <attribute name="action">win.view-gallery</attribute> | ||
197 | 144 | + <attribute name="accel">F9</attribute> | ||
198 | 145 | + </item> | ||
199 | 146 | + <item> | ||
200 | 147 | + <attribute name="label" translatable="yes">Side _Pane</attribute> | ||
201 | 148 | + <attribute name="action">win.view-sidebar</attribute> | ||
202 | 149 | + <attribute name="accel"><Ctrl>F9</attribute> | ||
203 | 150 | + </item> | ||
204 | 151 | + </section> | ||
205 | 152 | + <section> | ||
206 | 153 | + <item> | ||
207 | 154 | + <attribute name="label" translatable="yes">Zoom _In</attribute> | ||
208 | 155 | + <attribute name="action">win.zoom-in</attribute> | ||
209 | 156 | + <attribute name="accel"><Ctrl>plus</attribute> | ||
210 | 157 | + </item> | ||
211 | 158 | + <item> | ||
212 | 159 | + <attribute name="label" translatable="yes">Zoom _Out</attribute> | ||
213 | 160 | + <attribute name="action">win.zoom-out</attribute> | ||
214 | 161 | + <attribute name="accel"><Ctrl>minus</attribute> | ||
215 | 162 | + </item> | ||
216 | 163 | + <item> | ||
217 | 164 | + <attribute name="label" translatable="yes">_Best Fit</attribute> | ||
218 | 165 | + <attribute name="action">win.toggle-zoom-fit</attribute> | ||
219 | 166 | + <attribute name="accel">F</attribute> | ||
220 | 167 | + </item> | ||
221 | 168 | + </section> | ||
222 | 169 | + <section> | ||
223 | 170 | + <item> | ||
224 | 171 | + <attribute name="label" translatable="yes">_Fullscreen</attribute> | ||
225 | 172 | + <attribute name="action">win.view-fullscreen</attribute> | ||
226 | 173 | + <attribute name="accel">F11</attribute> | ||
227 | 174 | + </item> | ||
228 | 175 | + <item> | ||
229 | 176 | + <attribute name="label" translatable="yes">Slide Show</attribute> | ||
230 | 177 | + <attribute name="action">win.view-slideshow</attribute> | ||
231 | 178 | + <attribute name="accel">F5</attribute> | ||
232 | 179 | + </item> | ||
233 | 180 | + </section> | ||
234 | 181 | + </submenu> | ||
235 | 182 | + <submenu> | ||
236 | 183 | + <attribute name="label" translatable="yes">_Go</attribute> | ||
237 | 184 | + <section> | ||
238 | 185 | + <item> | ||
239 | 186 | + <attribute name="label" translatable="yes">_Previous Image</attribute> | ||
240 | 187 | + <attribute name="action">win.go-previous</attribute> | ||
241 | 188 | + <attribute name="accel">Left</attribute> | ||
242 | 189 | + </item> | ||
243 | 190 | + <item> | ||
244 | 191 | + <attribute name="label" translatable="yes">_Next Image</attribute> | ||
245 | 192 | + <attribute name="action">win.go-next</attribute> | ||
246 | 193 | + <attribute name="accel">Right</attribute> | ||
247 | 194 | + </item> | ||
248 | 195 | + </section> | ||
249 | 196 | + <section> | ||
250 | 197 | + <item> | ||
251 | 198 | + <attribute name="label" translatable="yes">_First Image</attribute> | ||
252 | 199 | + <attribute name="action">win.go-first</attribute> | ||
253 | 200 | + <attribute name="accel"><Alt>Home</attribute> | ||
254 | 201 | + </item> | ||
255 | 202 | + <item> | ||
256 | 203 | + <attribute name="label" translatable="yes">_Last Image</attribute> | ||
257 | 204 | + <attribute name="action">win.go-last</attribute> | ||
258 | 205 | + <attribute name="accel"><Alt>End</attribute> | ||
259 | 206 | + </item> | ||
260 | 207 | + </section> | ||
261 | 208 | + </submenu> | ||
262 | 209 | + <submenu> | ||
263 | 210 | + <attribute name="label" translatable="yes">_Help</attribute> | ||
264 | 211 | + <section> | ||
265 | 212 | + <item> | ||
266 | 213 | + <attribute name="label" translatable="yes">_Manual</attribute> | ||
267 | 214 | + <attribute name="action">win.manual</attribute> | ||
268 | 215 | + <attribute name="accel"><Ctrl>F1</attribute> | ||
269 | 216 | + </item> | ||
270 | 217 | + <item> | ||
271 | 218 | + <attribute name="label" translatable="yes">_About</attribute> | ||
272 | 219 | + <attribute name="action">app.about</attribute> | ||
273 | 220 | + </item> | ||
274 | 221 | + </section> | ||
275 | 222 | + </submenu> | ||
276 | 223 | + </menu> | ||
277 | 224 | +</interface> | ||
278 | 225 | diff --git a/src/eog-application.c b/src/eog-application.c | ||
279 | 226 | index 785ae49..3de5265 100644 | ||
280 | 227 | --- a/src/eog-application.c | ||
281 | 228 | +++ b/src/eog-application.c | ||
282 | 229 | @@ -169,17 +169,34 @@ eog_application_init_app_menu (EogApplication *application) | ||
283 | 230 | application); | ||
284 | 231 | |||
285 | 232 | builder = gtk_builder_new (); | ||
286 | 233 | - gtk_builder_add_from_resource (builder, | ||
287 | 234 | - "/org/gnome/eog/ui/eog-app-menu.xml", | ||
288 | 235 | - &error); | ||
289 | 236 | - | ||
290 | 237 | - if (error == NULL) { | ||
291 | 238 | - gtk_application_set_app_menu (GTK_APPLICATION (application), | ||
292 | 239 | - G_MENU_MODEL (gtk_builder_get_object (builder, | ||
293 | 240 | - "app-menu"))); | ||
294 | 241 | - } else { | ||
295 | 242 | - g_critical ("Unable to add the application menu: %s\n", error->message); | ||
296 | 243 | - g_error_free (error); | ||
297 | 244 | + | ||
298 | 245 | + if (gtk_application_prefers_app_menu (GTK_APPLICATION (application))) { | ||
299 | 246 | + gtk_builder_add_from_resource (builder, | ||
300 | 247 | + "/org/gnome/eog/ui/eog-app-menu.xml", | ||
301 | 248 | + &error); | ||
302 | 249 | + | ||
303 | 250 | + if (error == NULL) { | ||
304 | 251 | + gtk_application_set_app_menu (GTK_APPLICATION (application), | ||
305 | 252 | + G_MENU_MODEL (gtk_builder_get_object (builder, | ||
306 | 253 | + "app-menu"))); | ||
307 | 254 | + } else { | ||
308 | 255 | + g_critical ("Unable to add the application menu: %s\n", error->message); | ||
309 | 256 | + g_error_free (error); | ||
310 | 257 | + } | ||
311 | 258 | + } | ||
312 | 259 | + else { | ||
313 | 260 | + gtk_builder_add_from_resource (builder, | ||
314 | 261 | + "/org/gnome/eog/ui/eog-menubar.xml", | ||
315 | 262 | + &error); | ||
316 | 263 | + | ||
317 | 264 | + if (error == NULL) { | ||
318 | 265 | + gtk_application_set_menubar (GTK_APPLICATION (application), | ||
319 | 266 | + G_MENU_MODEL (gtk_builder_get_object (builder, | ||
320 | 267 | + "menubar"))); | ||
321 | 268 | + } else { | ||
322 | 269 | + g_critical ("Unable to add the application menu: %s\n", error->message); | ||
323 | 270 | + g_error_free (error); | ||
324 | 271 | + } | ||
325 | 272 | } | ||
326 | 273 | |||
327 | 274 | action = g_action_map_lookup_action (G_ACTION_MAP (application), | ||
328 | 275 | diff --git a/src/eog-window.c b/src/eog-window.c | ||
329 | 276 | index 738213f..ff5762c 100644 | ||
330 | 277 | --- a/src/eog-window.c | ||
331 | 278 | +++ b/src/eog-window.c | ||
332 | 279 | @@ -4266,18 +4266,30 @@ eog_window_construct_ui (EogWindow *window) | ||
333 | 280 | priv->zoom_scale); | ||
334 | 281 | gtk_widget_show (priv->zoom_scale); | ||
335 | 282 | |||
336 | 283 | - menu_button = gtk_menu_button_new (); | ||
337 | 284 | - menu_image = gtk_image_new_from_icon_name ("open-menu-symbolic", | ||
338 | 285 | - GTK_ICON_SIZE_BUTTON); | ||
339 | 286 | - gtk_button_set_image (GTK_BUTTON (menu_button), menu_image); | ||
340 | 287 | + priv->open_with_menu = g_menu_new (); | ||
341 | 288 | + priv->appinfo = g_ptr_array_new_with_free_func (g_object_unref); | ||
342 | 289 | + | ||
343 | 290 | + if (gtk_application_prefers_app_menu (GTK_APPLICATION (EOG_APP))) { | ||
344 | 291 | + menu_button = gtk_menu_button_new (); | ||
345 | 292 | + menu_image = gtk_image_new_from_icon_name ("open-menu-symbolic", | ||
346 | 293 | + GTK_ICON_SIZE_BUTTON); | ||
347 | 294 | + gtk_button_set_image (GTK_BUTTON (menu_button), menu_image); | ||
348 | 295 | + | ||
349 | 296 | + builder = gtk_builder_new_from_resource ("/org/gnome/eog/ui/eog-gear-menu.ui"); | ||
350 | 297 | + builder_object = gtk_builder_get_object (builder, "gear-menu"); | ||
351 | 298 | + gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button), | ||
352 | 299 | + G_MENU_MODEL (builder_object)); | ||
353 | 300 | |||
354 | 301 | - builder = gtk_builder_new_from_resource ("/org/gnome/eog/ui/eog-gear-menu.ui"); | ||
355 | 302 | - builder_object = gtk_builder_get_object (builder, "gear-menu"); | ||
356 | 303 | - gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button), | ||
357 | 304 | - G_MENU_MODEL (builder_object)); | ||
358 | 305 | + gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), menu_button); | ||
359 | 306 | + gtk_widget_show (menu_button); | ||
360 | 307 | |||
361 | 308 | - gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), menu_button); | ||
362 | 309 | - gtk_widget_show (menu_button); | ||
363 | 310 | + builder_object = gtk_builder_get_object (builder, "open-with-menu"); | ||
364 | 311 | + g_menu_append_section (G_MENU (builder_object), | ||
365 | 312 | + NULL, | ||
366 | 313 | + G_MENU_MODEL (priv->open_with_menu)); | ||
367 | 314 | + priv->gear_menu_builder = builder; | ||
368 | 315 | + builder = NULL; | ||
369 | 316 | + } | ||
370 | 317 | |||
371 | 318 | fullscreen_button = gtk_button_new_from_icon_name ("view-fullscreen-symbolic", | ||
372 | 319 | GTK_ICON_SIZE_BUTTON); | ||
373 | 320 | @@ -4288,15 +4300,6 @@ eog_window_construct_ui (EogWindow *window) | ||
374 | 321 | gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), fullscreen_button); | ||
375 | 322 | gtk_widget_show (fullscreen_button); | ||
376 | 323 | |||
377 | 324 | - priv->open_with_menu = g_menu_new (); | ||
378 | 325 | - priv->appinfo = g_ptr_array_new_with_free_func (g_object_unref); | ||
379 | 326 | - builder_object = gtk_builder_get_object (builder, "open-with-menu"); | ||
380 | 327 | - g_menu_append_section (G_MENU (builder_object), | ||
381 | 328 | - NULL, | ||
382 | 329 | - G_MENU_MODEL (priv->open_with_menu)); | ||
383 | 330 | - priv->gear_menu_builder = builder; | ||
384 | 331 | - builder = NULL; | ||
385 | 332 | - | ||
386 | 333 | priv->cbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); | ||
387 | 334 | gtk_box_pack_start (GTK_BOX (priv->box), priv->cbox, TRUE, TRUE, 0); | ||
388 | 335 | gtk_widget_show (priv->cbox); | ||
389 | 336 | @@ -5241,6 +5244,9 @@ eog_window_get_gear_menu_section (EogWindow *window, const gchar *id) | ||
390 | 337 | GObject *object; | ||
391 | 338 | g_return_val_if_fail (EOG_IS_WINDOW (window), NULL); | ||
392 | 339 | |||
393 | 340 | + if (window->priv->gear_menu_builder == NULL) | ||
394 | 341 | + return NULL; | ||
395 | 342 | + | ||
396 | 343 | object = gtk_builder_get_object (window->priv->gear_menu_builder, id); | ||
397 | 344 | if (object == NULL || !G_IS_MENU (object)) | ||
398 | 345 | return NULL; | ||
399 | 346 | diff --git a/src/eog.gresource.xml b/src/eog.gresource.xml | ||
400 | 347 | index 0f69c90..9f6bc43 100644 | ||
401 | 348 | --- a/src/eog.gresource.xml | ||
402 | 349 | +++ b/src/eog.gresource.xml | ||
403 | 350 | @@ -3,6 +3,7 @@ | ||
404 | 351 | <gresource prefix="/org/gnome/eog/ui"> | ||
405 | 352 | <file>eog.css</file> | ||
406 | 353 | <file compressed="true" preprocess="xml-stripblanks">eog-app-menu.xml</file> | ||
407 | 354 | + <file compressed="true" preprocess="xml-stripblanks">eog-menubar.xml</file> | ||
408 | 355 | <file compressed="true" preprocess="xml-stripblanks">eog-gear-menu.ui</file> | ||
409 | 356 | <file compressed="true" preprocess="xml-stripblanks">eog-image-properties-dialog.ui</file> | ||
410 | 357 | <file compressed="true" preprocess="xml-stripblanks">eog-multiple-save-as-dialog.ui</file> | ||
411 | 358 | -- | ||
412 | 359 | 2.5.0 | ||
413 | 360 | |||
414 | 0 | 361 | ||
415 | === added file 'debian/patches/0002-Show-traditional-title-bar-in-unity.patch' | |||
416 | --- debian/patches/0002-Show-traditional-title-bar-in-unity.patch 1970-01-01 00:00:00 +0000 | |||
417 | +++ debian/patches/0002-Show-traditional-title-bar-in-unity.patch 2015-09-29 10:38:28 +0000 | |||
418 | @@ -0,0 +1,139 @@ | |||
419 | 1 | From fd12d0136bfd9abc8a121f47775c2200237e535f Mon Sep 17 00:00:00 2001 | ||
420 | 2 | From: Lars Uebernickel <lars.uebernickel@canonical.com> | ||
421 | 3 | Date: Tue, 29 Sep 2015 12:25:29 +0200 | ||
422 | 4 | Subject: [PATCH 2/2] Show traditional title bar in unity | ||
423 | 5 | |||
424 | 6 | Based on a patch by Sebastien Bacher <seb128@ubuntu.com> | ||
425 | 7 | --- | ||
426 | 8 | src/eog-window.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++---------- | ||
427 | 9 | 1 file changed, 55 insertions(+), 11 deletions(-) | ||
428 | 10 | |||
429 | 11 | diff --git a/src/eog-window.c b/src/eog-window.c | ||
430 | 12 | index ff5762c..4e3c716 100644 | ||
431 | 13 | --- a/src/eog-window.c | ||
432 | 14 | +++ b/src/eog-window.c | ||
433 | 15 | @@ -134,6 +134,7 @@ struct _EogWindowPrivate { | ||
434 | 16 | GtkWidget *zoom_revealer; | ||
435 | 17 | GtkWidget *zoom_scale; | ||
436 | 18 | GtkWidget *properties_dlg; | ||
437 | 19 | + GtkWidget *headerbar; | ||
438 | 20 | |||
439 | 21 | GMenu *open_with_menu; | ||
440 | 22 | GPtrArray *appinfo; | ||
441 | 23 | @@ -4196,6 +4197,43 @@ eog_window_zoom_button_toggled_cb (GtkToggleButton *button, gpointer user_data) | ||
442 | 24 | gtk_button_set_image (GTK_BUTTON (button), zoom_image); | ||
443 | 25 | } | ||
444 | 26 | |||
445 | 27 | +static gboolean | ||
446 | 28 | +in_desktop (const gchar *name) | ||
447 | 29 | +{ | ||
448 | 30 | + const gchar *desktop_name_list; | ||
449 | 31 | + gchar **names; | ||
450 | 32 | + gboolean in_list = FALSE; | ||
451 | 33 | + gint i; | ||
452 | 34 | + | ||
453 | 35 | + desktop_name_list = g_getenv ("XDG_CURRENT_DESKTOP"); | ||
454 | 36 | + if (!desktop_name_list) | ||
455 | 37 | + return FALSE; | ||
456 | 38 | + | ||
457 | 39 | + names = g_strsplit (desktop_name_list, ":", -1); | ||
458 | 40 | + for (i = 0; names[i] && !in_list; i++) | ||
459 | 41 | + if (strcmp (names[i], name) == 0) { | ||
460 | 42 | + in_list = TRUE; | ||
461 | 43 | + break; | ||
462 | 44 | + } | ||
463 | 45 | + g_strfreev (names); | ||
464 | 46 | + | ||
465 | 47 | + return in_list; | ||
466 | 48 | +} | ||
467 | 49 | + | ||
468 | 50 | +static void | ||
469 | 51 | +on_action_state_changed (GActionGroup *action_group, | ||
470 | 52 | + gchar *name, | ||
471 | 53 | + GVariant *value, | ||
472 | 54 | + gpointer user_data) | ||
473 | 55 | +{ | ||
474 | 56 | + EogWindow *window = user_data; | ||
475 | 57 | + EogWindowPrivate *priv = window->priv; | ||
476 | 58 | + | ||
477 | 59 | + gtk_widget_set_visible (GTK_WIDGET (priv->headerbar), | ||
478 | 60 | + priv->mode != EOG_WINDOW_MODE_FULLSCREEN && | ||
479 | 61 | + priv->mode != EOG_WINDOW_MODE_SLIDESHOW); | ||
480 | 62 | +} | ||
481 | 63 | + | ||
482 | 64 | static void | ||
483 | 65 | eog_window_construct_ui (EogWindow *window) | ||
484 | 66 | { | ||
485 | 67 | @@ -4207,7 +4245,6 @@ eog_window_construct_ui (EogWindow *window) | ||
486 | 68 | |||
487 | 69 | GtkWidget *popup_menu; | ||
488 | 70 | GtkWidget *hpaned; | ||
489 | 71 | - GtkWidget *headerbar; | ||
490 | 72 | GtkWidget *zoom_button; | ||
491 | 73 | GtkWidget *zoom_image; | ||
492 | 74 | GtkWidget *menu_button; | ||
493 | 75 | @@ -4222,12 +4259,19 @@ eog_window_construct_ui (EogWindow *window) | ||
494 | 76 | gtk_container_add (GTK_CONTAINER (window), priv->box); | ||
495 | 77 | gtk_widget_show (priv->box); | ||
496 | 78 | |||
497 | 79 | - headerbar = gtk_header_bar_new (); | ||
498 | 80 | - gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (headerbar), TRUE); | ||
499 | 81 | - gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar), | ||
500 | 82 | - g_get_application_name ()); | ||
501 | 83 | - gtk_window_set_titlebar (GTK_WINDOW (window), headerbar); | ||
502 | 84 | - gtk_widget_show (headerbar); | ||
503 | 85 | + priv->headerbar = gtk_header_bar_new (); | ||
504 | 86 | + if (!in_desktop ("Unity")) { | ||
505 | 87 | + gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (priv->headerbar), TRUE); | ||
506 | 88 | + gtk_header_bar_set_title (GTK_HEADER_BAR (priv->headerbar), g_get_application_name ()); | ||
507 | 89 | + gtk_window_set_titlebar (GTK_WINDOW (window), priv->headerbar); | ||
508 | 90 | + } else { | ||
509 | 91 | + gtk_container_add (GTK_CONTAINER (priv->box), priv->headerbar); | ||
510 | 92 | + | ||
511 | 93 | + /* Need to hide toolbar when fullscreen (slideshow or normal fullscreen) */ | ||
512 | 94 | + g_signal_connect (window, "action-state-changed", | ||
513 | 95 | + G_CALLBACK (on_action_state_changed), window); | ||
514 | 96 | + } | ||
515 | 97 | + gtk_widget_show (priv->headerbar); | ||
516 | 98 | |||
517 | 99 | zoom_button = gtk_toggle_button_new (); | ||
518 | 100 | zoom_image = gtk_image_new_from_icon_name ("zoom-in-symbolic", | ||
519 | 101 | @@ -4238,7 +4282,7 @@ eog_window_construct_ui (EogWindow *window) | ||
520 | 102 | g_signal_connect (zoom_button, "toggled", | ||
521 | 103 | G_CALLBACK (eog_window_zoom_button_toggled_cb), | ||
522 | 104 | window); | ||
523 | 105 | - gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), zoom_button); | ||
524 | 106 | + gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->headerbar), zoom_button); | ||
525 | 107 | /* disable zoom button if no image is loaded */ | ||
526 | 108 | g_object_bind_property (g_action_map_lookup_action (G_ACTION_MAP(window), | ||
527 | 109 | "zoom-normal"), | ||
528 | 110 | @@ -4249,7 +4293,7 @@ eog_window_construct_ui (EogWindow *window) | ||
529 | 111 | priv->zoom_revealer = gtk_revealer_new (); | ||
530 | 112 | gtk_revealer_set_transition_type (GTK_REVEALER (priv->zoom_revealer), | ||
531 | 113 | GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT); | ||
532 | 114 | - gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), | ||
533 | 115 | + gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->headerbar), | ||
534 | 116 | priv->zoom_revealer); | ||
535 | 117 | gtk_widget_show (priv->zoom_revealer); | ||
536 | 118 | |||
537 | 119 | @@ -4280,7 +4324,7 @@ eog_window_construct_ui (EogWindow *window) | ||
538 | 120 | gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button), | ||
539 | 121 | G_MENU_MODEL (builder_object)); | ||
540 | 122 | |||
541 | 123 | - gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), menu_button); | ||
542 | 124 | + gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->headerbar), menu_button); | ||
543 | 125 | gtk_widget_show (menu_button); | ||
544 | 126 | |||
545 | 127 | builder_object = gtk_builder_get_object (builder, "open-with-menu"); | ||
546 | 128 | @@ -4297,7 +4341,7 @@ eog_window_construct_ui (EogWindow *window) | ||
547 | 129 | "win.view-fullscreen"); | ||
548 | 130 | gtk_widget_set_tooltip_text(fullscreen_button, | ||
549 | 131 | _("Show the current image in fullscreen mode")); | ||
550 | 132 | - gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), fullscreen_button); | ||
551 | 133 | + gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->headerbar), fullscreen_button); | ||
552 | 134 | gtk_widget_show (fullscreen_button); | ||
553 | 135 | |||
554 | 136 | priv->cbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); | ||
555 | 137 | -- | ||
556 | 138 | 2.5.0 | ||
557 | 139 | |||
558 | 0 | 140 | ||
559 | === removed file 'debian/patches/disable-appmenu-when-not-needed.patch' | |||
560 | --- debian/patches/disable-appmenu-when-not-needed.patch 2015-09-21 10:53:08 +0000 | |||
561 | +++ debian/patches/disable-appmenu-when-not-needed.patch 1970-01-01 00:00:00 +0000 | |||
562 | @@ -1,33 +0,0 @@ | |||
563 | 1 | Description: Disables the application menu on platforms that show an app menu | ||
564 | 2 | and a menubar (such as unity). The menubar already contains all the actions of | ||
565 | 3 | the appmenu. Having both is redundant. | ||
566 | 4 | Forwarded: doesn't make sense upstream until eog is ported to GMenuModel | ||
567 | 5 | Author: Lars Uebernickel <lars.uebernickel@canonical.com> | ||
568 | 6 | Index: eog-3.16.3/src/eog-application.c | ||
569 | 7 | =================================================================== | ||
570 | 8 | --- eog-3.16.3.orig/src/eog-application.c 2015-08-20 23:52:05.472049295 +0200 | ||
571 | 9 | +++ eog-3.16.3/src/eog-application.c 2015-08-20 23:52:05.472049295 +0200 | ||
572 | 10 | @@ -291,6 +291,8 @@ | ||
573 | 11 | GFile *css_file; | ||
574 | 12 | GtkSettings *settings; | ||
575 | 13 | GtkCssProvider *provider; | ||
576 | 14 | + gboolean shows_app_menu; | ||
577 | 15 | + gboolean shows_menubar; | ||
578 | 16 | |||
579 | 17 | G_APPLICATION_CLASS (eog_application_parent_class)->startup (application); | ||
580 | 18 | |||
581 | 19 | @@ -330,7 +332,13 @@ | ||
582 | 20 | "gtk-application-prefer-dark-theme", TRUE, | ||
583 | 21 | NULL); | ||
584 | 22 | |||
585 | 23 | - eog_application_init_app_menu (app); | ||
586 | 24 | + g_object_get (gtk_settings_get_default (), | ||
587 | 25 | + "gtk-shell-shows-app-menu", &shows_app_menu, | ||
588 | 26 | + "gtk-shell-shows-menubar", &shows_menubar, | ||
589 | 27 | + NULL); | ||
590 | 28 | + | ||
591 | 29 | + if (shows_app_menu && !shows_menubar) | ||
592 | 30 | + eog_application_init_app_menu (EOG_APPLICATION (application)); | ||
593 | 31 | eog_application_init_accelerators (GTK_APPLICATION (app)); | ||
594 | 32 | |||
595 | 33 | app->priv->extensions = peas_extension_set_new ( | ||
596 | 34 | 0 | ||
597 | === modified file 'debian/patches/series' | |||
598 | --- debian/patches/series 2015-05-27 16:03:38 +0000 | |||
599 | +++ debian/patches/series 2015-09-29 10:38:28 +0000 | |||
600 | @@ -1,3 +1,2 @@ | |||
604 | 1 | disable-appmenu-when-not-needed.patch | 1 | 0001-Add-a-traditional-menu-bar.patch |
605 | 2 | unity_traditional_titlebar.patch | 2 | 0002-Show-traditional-title-bar-in-unity.patch |
603 | 3 | |||
606 | 4 | 3 | ||
607 | === removed file 'debian/patches/unity_traditional_titlebar.patch' | |||
608 | --- debian/patches/unity_traditional_titlebar.patch 2015-09-21 10:57:41 +0000 | |||
609 | +++ debian/patches/unity_traditional_titlebar.patch 1970-01-01 00:00:00 +0000 | |||
610 | @@ -1,140 +0,0 @@ | |||
611 | 1 | # Description: Show traditional titlebar under unity | ||
612 | 2 | # Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=749976 | ||
613 | 3 | # | ||
614 | 4 | Index: b/src/eog-window.c | ||
615 | 5 | =================================================================== | ||
616 | 6 | --- a/src/eog-window.c | ||
617 | 7 | +++ b/src/eog-window.c | ||
618 | 8 | @@ -130,6 +130,7 @@ | ||
619 | 9 | GtkWidget *thumbview; | ||
620 | 10 | GtkWidget *statusbar; | ||
621 | 11 | GtkWidget *nav; | ||
622 | 12 | + GtkWidget *headerbar; | ||
623 | 13 | GtkWidget *message_area; | ||
624 | 14 | GtkWidget *zoom_revealer; | ||
625 | 15 | GtkWidget *zoom_scale; | ||
626 | 16 | @@ -4196,6 +4197,42 @@ | ||
627 | 17 | gtk_button_set_image (GTK_BUTTON (button), zoom_image); | ||
628 | 18 | } | ||
629 | 19 | |||
630 | 20 | +static gboolean | ||
631 | 21 | +in_desktop (const gchar *name) | ||
632 | 22 | +{ | ||
633 | 23 | + const gchar *desktop_name_list; | ||
634 | 24 | + gchar **names; | ||
635 | 25 | + gboolean in_list = FALSE; | ||
636 | 26 | + gint i; | ||
637 | 27 | + | ||
638 | 28 | + desktop_name_list = g_getenv ("XDG_CURRENT_DESKTOP"); | ||
639 | 29 | + if (!desktop_name_list) | ||
640 | 30 | + return FALSE; | ||
641 | 31 | + | ||
642 | 32 | + names = g_strsplit (desktop_name_list, ":", -1); | ||
643 | 33 | + for (i = 0; names[i] && !in_list; i++) | ||
644 | 34 | + if (strcmp (names[i], name) == 0) { | ||
645 | 35 | + in_list = TRUE; | ||
646 | 36 | + break; | ||
647 | 37 | + } | ||
648 | 38 | + g_strfreev (names); | ||
649 | 39 | + | ||
650 | 40 | + return in_list; | ||
651 | 41 | +} | ||
652 | 42 | + | ||
653 | 43 | +static void | ||
654 | 44 | +on_action_state_changed (GObject *object G_GNUC_UNUSED, | ||
655 | 45 | + GParamSpec *pspec G_GNUC_UNUSED, | ||
656 | 46 | + gpointer user_data) | ||
657 | 47 | +{ | ||
658 | 48 | + EogWindow *window = EOG_WINDOW (user_data); | ||
659 | 49 | + EogWindowPrivate *priv = window->priv; | ||
660 | 50 | + | ||
661 | 51 | + gtk_widget_set_visible (GTK_WIDGET (priv->headerbar), | ||
662 | 52 | + priv->mode != EOG_WINDOW_MODE_FULLSCREEN && | ||
663 | 53 | + priv->mode != EOG_WINDOW_MODE_SLIDESHOW); | ||
664 | 54 | +} | ||
665 | 55 | + | ||
666 | 56 | static void | ||
667 | 57 | eog_window_construct_ui (EogWindow *window) | ||
668 | 58 | { | ||
669 | 59 | @@ -4207,7 +4244,6 @@ | ||
670 | 60 | |||
671 | 61 | GtkWidget *popup_menu; | ||
672 | 62 | GtkWidget *hpaned; | ||
673 | 63 | - GtkWidget *headerbar; | ||
674 | 64 | GtkWidget *zoom_button; | ||
675 | 65 | GtkWidget *zoom_image; | ||
676 | 66 | GtkWidget *menu_button; | ||
677 | 67 | @@ -4222,12 +4258,31 @@ | ||
678 | 68 | gtk_container_add (GTK_CONTAINER (window), priv->box); | ||
679 | 69 | gtk_widget_show (priv->box); | ||
680 | 70 | |||
681 | 71 | - headerbar = gtk_header_bar_new (); | ||
682 | 72 | - gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (headerbar), TRUE); | ||
683 | 73 | - gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar), | ||
684 | 74 | - g_get_application_name ()); | ||
685 | 75 | - gtk_window_set_titlebar (GTK_WINDOW (window), headerbar); | ||
686 | 76 | - gtk_widget_show (headerbar); | ||
687 | 77 | + priv->headerbar = gtk_header_bar_new (); | ||
688 | 78 | + if (!in_desktop ("Unity")) { | ||
689 | 79 | + gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (priv->headerbar), | ||
690 | 80 | + TRUE); | ||
691 | 81 | + gtk_header_bar_set_title (GTK_HEADER_BAR (priv->headerbar), | ||
692 | 82 | + g_get_application_name ()); | ||
693 | 83 | + gtk_window_set_titlebar (GTK_WINDOW (window), priv->headerbar); | ||
694 | 84 | + } else { | ||
695 | 85 | + gtk_container_add (GTK_CONTAINER (priv->box), priv->headerbar); | ||
696 | 86 | + | ||
697 | 87 | + /* Need to hide toolbar when fullscreen (slideshow or normal fullscreen) */ | ||
698 | 88 | + action = g_action_map_lookup_action (G_ACTION_MAP (window), | ||
699 | 89 | + "view-fullscreen"); | ||
700 | 90 | + g_signal_connect (action, | ||
701 | 91 | + "notify::state", | ||
702 | 92 | + G_CALLBACK (on_action_state_changed), | ||
703 | 93 | + window); | ||
704 | 94 | + action = g_action_map_lookup_action (G_ACTION_MAP (window), | ||
705 | 95 | + "view-slideshow"); | ||
706 | 96 | + g_signal_connect (action, | ||
707 | 97 | + "notify::state", | ||
708 | 98 | + G_CALLBACK (on_action_state_changed), | ||
709 | 99 | + window); | ||
710 | 100 | + } | ||
711 | 101 | + gtk_widget_show (priv->headerbar); | ||
712 | 102 | |||
713 | 103 | zoom_button = gtk_toggle_button_new (); | ||
714 | 104 | zoom_image = gtk_image_new_from_icon_name ("zoom-in-symbolic", | ||
715 | 105 | @@ -4238,7 +4293,7 @@ | ||
716 | 106 | g_signal_connect (zoom_button, "toggled", | ||
717 | 107 | G_CALLBACK (eog_window_zoom_button_toggled_cb), | ||
718 | 108 | window); | ||
719 | 109 | - gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), zoom_button); | ||
720 | 110 | + gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->headerbar), zoom_button); | ||
721 | 111 | /* disable zoom button if no image is loaded */ | ||
722 | 112 | g_object_bind_property (g_action_map_lookup_action (G_ACTION_MAP(window), | ||
723 | 113 | "zoom-normal"), | ||
724 | 114 | @@ -4249,7 +4304,7 @@ | ||
725 | 115 | priv->zoom_revealer = gtk_revealer_new (); | ||
726 | 116 | gtk_revealer_set_transition_type (GTK_REVEALER (priv->zoom_revealer), | ||
727 | 117 | GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT); | ||
728 | 118 | - gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), | ||
729 | 119 | + gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->headerbar), | ||
730 | 120 | priv->zoom_revealer); | ||
731 | 121 | gtk_widget_show (priv->zoom_revealer); | ||
732 | 122 | |||
733 | 123 | @@ -4276,7 +4331,7 @@ | ||
734 | 124 | gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button), | ||
735 | 125 | G_MENU_MODEL (builder_object)); | ||
736 | 126 | |||
737 | 127 | - gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), menu_button); | ||
738 | 128 | + gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->headerbar), menu_button); | ||
739 | 129 | gtk_widget_show (menu_button); | ||
740 | 130 | |||
741 | 131 | fullscreen_button = gtk_button_new_from_icon_name ("view-fullscreen-symbolic", | ||
742 | 132 | @@ -4285,7 +4340,7 @@ | ||
743 | 133 | "win.view-fullscreen"); | ||
744 | 134 | gtk_widget_set_tooltip_text(fullscreen_button, | ||
745 | 135 | _("Show the current image in fullscreen mode")); | ||
746 | 136 | - gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), fullscreen_button); | ||
747 | 137 | + gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->headerbar), fullscreen_button); | ||
748 | 138 | gtk_widget_show (fullscreen_button); | ||
749 | 139 | |||
750 | 140 | priv->open_with_menu = g_menu_new (); |