~larsu/gedit/update-316

« back to all changes in this revision

Viewing changes to debian/patches/0001-Use-the-OSX-menubar-layout-for-XFCE-Unity-etc.patch

  • Committer: Lars Uebernickel
  • Date: 2015-08-27 08:04:55 UTC
  • Revision ID: lars.uebernickel@canonical.com-20150827080455-aroh2exs3x8zqam0
* debian/patches/0001-Use-the-OSX-menubar-layout-for-XFCE-Unity-etc.patch:
  - add traditional menubar (GNOME bug #741904)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 4f15e36b55c24c638e8eaf56eb723815a771e841 Mon Sep 17 00:00:00 2001
 
2
From: Ryan Lortie <desrt@desrt.ca>
 
3
Date: Tue, 16 Dec 2014 12:54:28 -0500
 
4
Subject: [PATCH] Use the OSX menubar layout for XFCE, Unity, etc.
 
5
 
 
6
Rename menus-osx to menus-traditional so that it will automatically get loaded
 
7
on platforms that require traditional menubar layouts.
 
8
 
 
9
Add "Quit", "Preferences" and "About" items in the appropriate places, but mark
 
10
them as hidden on Mac OS.
 
11
 
 
12
Simplify configure.ac to let GtkApplication handle things automatically.
 
13
 
 
14
We now also need to deal with the case where the gear menu will not
 
15
exist, even on non-OSX systems.  Do that by hiding the button.
 
16
 
 
17
https://bugzilla.gnome.org/show_bug.cgi?id=741904
 
18
---
 
19
 configure.ac                             |   3 -
 
20
 gedit/Makefile.am                        |   5 +-
 
21
 gedit/gedit-app.c                        |  33 ++-
 
22
 gedit/gedit-app.h                        |   2 +-
 
23
 gedit/gedit-window.c                     |  16 +-
 
24
 gedit/resources/gtk/menus-default.ui     | 145 -------------
 
25
 gedit/resources/gtk/menus-osx.ui         | 277 -------------------------
 
26
 gedit/resources/gtk/menus-traditional.ui | 338 +++++++++++++++++++++++--------
 
27
 gedit/resources/gtk/menus.ui             | 145 +++++++++++++
 
28
 9 files changed, 425 insertions(+), 539 deletions(-)
 
29
 delete mode 100644 gedit/resources/gtk/menus-default.ui
 
30
 delete mode 100644 gedit/resources/gtk/menus-osx.ui
 
31
 create mode 100644 gedit/resources/gtk/menus.ui
 
32
 
 
33
Index: gedit-3.16.3/configure.ac
 
34
===================================================================
 
35
--- gedit-3.16.3.orig/configure.ac
 
36
+++ gedit-3.16.3/configure.ac
 
37
@@ -434,10 +434,8 @@ fi
 
38
 VAPIGEN_CHECK([0.25.1])
 
39
 
 
40
 if test "$os_osx" = "yes"; then
 
41
-       os_menus_ui=menus-osx.ui
 
42
        os_style_css=gedit-style-osx.css
 
43
 else
 
44
-       os_menus_ui=menus-default.ui
 
45
        os_style_css=
 
46
 
 
47
        OS_DEPENDENT_RESOURCE_FILES='<file preprocess="xml-stripblanks">gtk/menus-traditional.ui</file>'
 
48
@@ -449,7 +447,6 @@ if test "x$os_style_css" != "x"; then
 
49
 fi
 
50
 
 
51
 AC_SUBST(OS_DEPENDENT_RESOURCE_FILES)
 
52
-AC_CONFIG_LINKS(gedit/resources/gtk/menus.ui:gedit/resources/gtk/$os_menus_ui)
 
53
 
 
54
 AC_CONFIG_FILES([
 
55
 Makefile
 
56
Index: gedit-3.16.3/gedit/Makefile.am
 
57
===================================================================
 
58
--- gedit-3.16.3.orig/gedit/Makefile.am
 
59
+++ gedit-3.16.3/gedit/Makefile.am
 
60
@@ -260,10 +260,7 @@ gedit_overrides_PYTHON = gedit/Gedit.py
 
61
 endif
 
62
 
 
63
 gedit_dist_resource_deps =                                                     \
 
64
-       $(filter-out gedit/resources/css/gedit-style-os.css,$(filter-out gedit/resources/gtk/menus.ui,$(gedit_resource_deps)))  \
 
65
-       gedit/resources/gtk/menus-traditional.ui                                \
 
66
-       gedit/resources/gtk/menus-default.ui                                    \
 
67
-       gedit/resources/gtk/menus-osx.ui                                        \
 
68
+       $(filter-out %gedit/resources/css/gedit-style-os.css,$(gedit_resource_deps))    \
 
69
        gedit/resources/css/gedit-style-osx.css
 
70
 
 
71
 EXTRA_DIST +=                                  \
 
72
Index: gedit-3.16.3/gedit/gedit-app.c
 
73
===================================================================
 
74
--- gedit-3.16.3.orig/gedit/gedit-app.c
 
75
+++ gedit-3.16.3/gedit/gedit-app.c
 
76
@@ -79,7 +79,7 @@ struct _GeditAppPrivate
 
77
        GSettings         *ui_settings;
 
78
        GSettings         *window_settings;
 
79
 
 
80
-       GMenuModel        *window_menu;
 
81
+       GMenuModel        *gear_menu;
 
82
        GMenuModel        *notebook_menu;
 
83
        GMenuModel        *tab_width_menu;
 
84
        GMenuModel        *line_col_menu;
 
85
@@ -192,7 +192,7 @@ gedit_app_dispose (GObject *object)
 
86
                g_clear_object (&app->priv->theme_provider);
 
87
        }
 
88
 
 
89
-       g_clear_object (&app->priv->window_menu);
 
90
+       g_clear_object (&app->priv->gear_menu);
 
91
        g_clear_object (&app->priv->notebook_menu);
 
92
        g_clear_object (&app->priv->tab_width_menu);
 
93
        g_clear_object (&app->priv->line_col_menu);
 
94
@@ -768,17 +768,7 @@ gedit_app_startup (GApplication *applica
 
95
                                         app);
 
96
 
 
97
        /* menus */
 
98
-       app->priv->window_menu = gtk_application_get_menubar (GTK_APPLICATION (app));
 
99
-
 
100
-       if (app->priv->window_menu == NULL)
 
101
-       {
 
102
-               app->priv->window_menu = get_menu_model (app, "gear-menu");
 
103
-       }
 
104
-       else
 
105
-       {
 
106
-               g_object_ref (app->priv->window_menu);
 
107
-       }
 
108
-
 
109
+       app->priv->gear_menu = get_menu_model (app, "gear-menu");
 
110
        app->priv->notebook_menu = get_menu_model (app, "notebook-menu");
 
111
        app->priv->tab_width_menu = get_menu_model (app, "tab-width-menu");
 
112
        app->priv->line_col_menu = get_menu_model (app, "line-col-menu");
 
113
@@ -1784,11 +1774,11 @@ _gedit_app_get_settings (GeditApp *app)
 
114
 }
 
115
 
 
116
 GMenuModel *
 
117
-_gedit_app_get_window_menu (GeditApp *app)
 
118
+_gedit_app_get_gear_menu (GeditApp *app)
 
119
 {
 
120
        g_return_val_if_fail (GEDIT_IS_APP (app), NULL);
 
121
 
 
122
-       return app->priv->window_menu;
 
123
+       return app->priv->gear_menu;
 
124
 }
 
125
 
 
126
 GMenuModel *
 
127
@@ -1826,8 +1816,17 @@ _gedit_app_extend_menu (GeditApp    *app
 
128
        g_return_val_if_fail (GEDIT_IS_APP (app), NULL);
 
129
        g_return_val_if_fail (extension_point != NULL, NULL);
 
130
 
 
131
-       /* First look in the window menu */
 
132
-       section = find_extension_point_section (app->priv->window_menu, extension_point);
 
133
+       /* First look in the gear or window menu */
 
134
+       if (app->priv->gear_menu)
 
135
+       {
 
136
+               model = app->priv->gear_menu;
 
137
+       }
 
138
+       else
 
139
+       {
 
140
+               model = gtk_application_get_menubar (GTK_APPLICATION (app));
 
141
+       }
 
142
+
 
143
+       section = find_extension_point_section (model, extension_point);
 
144
 
 
145
        /* otherwise look in the app menu */
 
146
        if (section == NULL)
 
147
Index: gedit-3.16.3/gedit/gedit-app.h
 
148
===================================================================
 
149
--- gedit-3.16.3.orig/gedit/gedit-app.h
 
150
+++ gedit-3.16.3/gedit/gedit-app.h
 
151
@@ -135,7 +135,7 @@ void                         _gedit_app_set_default_print_set
 
152
 
 
153
 GObject                        *_gedit_app_get_settings                (GeditApp  *app);
 
154
 
 
155
-GMenuModel             *_gedit_app_get_window_menu             (GeditApp  *app);
 
156
+GMenuModel             *_gedit_app_get_gear_menu               (GeditApp  *app);
 
157
 
 
158
 GMenuModel             *_gedit_app_get_notebook_menu           (GeditApp  *app);
 
159
 
 
160
Index: gedit-3.16.3/gedit/gedit-window.c
 
161
===================================================================
 
162
--- gedit-3.16.3.orig/gedit/gedit-window.c
 
163
+++ gedit-3.16.3/gedit/gedit-window.c
 
164
@@ -2802,9 +2802,19 @@ gedit_window_init (GeditWindow *window)
 
165
                                "text",
 
166
                                G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
 
167
 
 
168
-       gear_menu = _gedit_app_get_window_menu (GEDIT_APP (g_application_get_default ())),
 
169
-       gtk_menu_button_set_menu_model (window->priv->gear_button, gear_menu);
 
170
-       gtk_menu_button_set_menu_model (window->priv->fullscreen_gear_button, gear_menu);
 
171
+       gear_menu = _gedit_app_get_gear_menu (GEDIT_APP (g_application_get_default ()));
 
172
+       if (gear_menu)
 
173
+       {
 
174
+               gtk_menu_button_set_menu_model (window->priv->gear_button, gear_menu);
 
175
+               gtk_menu_button_set_menu_model (window->priv->fullscreen_gear_button, gear_menu);
 
176
+       }
 
177
+       else
 
178
+       {
 
179
+               gtk_widget_hide (GTK_WIDGET (window->priv->gear_button));
 
180
+               gtk_widget_hide (GTK_WIDGET (window->priv->fullscreen_gear_button));
 
181
+               gtk_widget_set_no_show_all (GTK_WIDGET (window->priv->gear_button), TRUE);
 
182
+               gtk_widget_set_no_show_all (GTK_WIDGET (window->priv->fullscreen_gear_button), TRUE);
 
183
+       }
 
184
 
 
185
        g_signal_connect (GTK_TOGGLE_BUTTON (window->priv->fullscreen_open_button),
 
186
                          "toggled",
 
187
Index: gedit-3.16.3/gedit/resources/gtk/menus-default.ui
 
188
===================================================================
 
189
--- gedit-3.16.3.orig/gedit/resources/gtk/menus-default.ui
 
190
+++ /dev/null
 
191
@@ -1,145 +0,0 @@
 
192
-<?xml version="1.0"?>
 
193
-<interface>
 
194
-  <!-- interface-requires gtk+ 3.0 -->
 
195
-  <menu id="app-menu">
 
196
-    <section>
 
197
-      <attribute name="id">app-commands-section</attribute>
 
198
-      <item>
 
199
-        <attribute name="label" translatable="yes">_New Window</attribute>
 
200
-        <attribute name="action">app.new-window</attribute>
 
201
-      </item>
 
202
-    </section>
 
203
-    <section>
 
204
-      <attribute name="id">preferences-section</attribute>
 
205
-      <item>
 
206
-        <attribute name="label" translatable="yes">_Preferences</attribute>
 
207
-        <attribute name="action">app.preferences</attribute>
 
208
-      </item>
 
209
-    </section>
 
210
-    <section>
 
211
-      <attribute name="id">help-section</attribute>
 
212
-      <item>
 
213
-        <attribute name="label" translatable="yes">_Help</attribute>
 
214
-        <attribute name="action">app.help</attribute>
 
215
-      </item>
 
216
-      <item>
 
217
-        <attribute name="label" translatable="yes">_About</attribute>
 
218
-        <attribute name="action">app.about</attribute>
 
219
-      </item>
 
220
-      <item>
 
221
-        <attribute name="label" translatable="yes">_Quit</attribute>
 
222
-        <attribute name="action">app.quit</attribute>
 
223
-      </item>
 
224
-    </section>
 
225
-  </menu>
 
226
-  <menu id="gear-menu">
 
227
-    <section>
 
228
-      <attribute name="id">juntion-section</attribute>
 
229
-      <attribute name="display-hint">horizontal-buttons</attribute>
 
230
-      <item>
 
231
-        <attribute name="label" translatable="yes">_Reload</attribute>
 
232
-        <attribute name="action">win.revert</attribute>
 
233
-        <attribute name="verb-icon">view-refresh-symbolic</attribute>
 
234
-      </item>
 
235
-      <item>
 
236
-        <attribute name="label" translatable="yes">_Print…</attribute>
 
237
-        <attribute name="action">win.print</attribute>
 
238
-        <attribute name="verb-icon">printer-symbolic</attribute>
 
239
-      </item>
 
240
-      <item>
 
241
-        <attribute name="label" translatable="yes">_Fullscreen</attribute>
 
242
-        <attribute name="action">win.fullscreen</attribute>
 
243
-        <attribute name="verb-icon">view-fullscreen-symbolic</attribute>
 
244
-      </item>
 
245
-    </section>
 
246
-    <section>
 
247
-      <attribute name="id">file-section</attribute>
 
248
-    </section>
 
249
-    <section>
 
250
-      <attribute name="id">file-section-1</attribute>
 
251
-      <item>
 
252
-        <attribute name="label" translatable="yes">_Save As…</attribute>
 
253
-        <attribute name="action">win.save-as</attribute>
 
254
-      </item>
 
255
-      <item>
 
256
-        <attribute name="label" translatable="yes">Save _All</attribute>
 
257
-        <attribute name="action">win.save-all</attribute>
 
258
-      </item>
 
259
-    </section>
 
260
-    <section>
 
261
-      <attribute name="id">edit-section</attribute>
 
262
-    </section>
 
263
-    <section>
 
264
-      <attribute name="id">edit-section-1</attribute>
 
265
-    </section>
 
266
-    <section>
 
267
-      <attribute name="id">search-section</attribute>
 
268
-      <item>
 
269
-        <attribute name="label" translatable="yes">_Find…</attribute>
 
270
-        <attribute name="action">win.find</attribute>
 
271
-      </item>
 
272
-      <item>
 
273
-        <attribute name="label" translatable="yes">_Find and Replace…</attribute>
 
274
-        <attribute name="action">win.replace</attribute>
 
275
-      </item>
 
276
-      <item>
 
277
-        <attribute name="label" translatable="yes">_Clear Highlight</attribute>
 
278
-        <attribute name="action">win.clear-highlight</attribute>
 
279
-      </item>
 
280
-      <item>
 
281
-        <attribute name="label" translatable="yes">_Go to Line…</attribute>
 
282
-        <attribute name="action">win.goto-line</attribute>
 
283
-      </item>
 
284
-    </section>
 
285
-    <section>
 
286
-      <submenu>
 
287
-        <attribute name="label" translatable="yes">View</attribute>
 
288
-        <section>
 
289
-          <attribute name="id">view-section</attribute>
 
290
-          <item>
 
291
-            <attribute name="label" translatable="yes">Side _Panel</attribute>
 
292
-            <attribute name="action">win.side-panel</attribute>
 
293
-          </item>
 
294
-          <item>
 
295
-            <attribute name="label" translatable="yes">_Bottom Panel</attribute>
 
296
-            <attribute name="action">win.bottom-panel</attribute>
 
297
-            <attribute name="hidden-when">action-disabled</attribute>
 
298
-          </item>
 
299
-        </section>
 
300
-        <section>
 
301
-          <attribute name="id">view-section-1</attribute>
 
302
-        </section>
 
303
-        <section>
 
304
-          <attribute name="id">view-section-2</attribute>
 
305
-          <item>
 
306
-            <attribute name="label" translatable="yes">_Highlight Mode…</attribute>
 
307
-            <attribute name="action">win.highlight-mode</attribute>
 
308
-          </item>
 
309
-        </section>
 
310
-      </submenu>
 
311
-      <submenu>
 
312
-        <attribute name="label" translatable="yes">Tools</attribute>
 
313
-        <section>
 
314
-          <attribute name="id">spell-section</attribute>
 
315
-        </section>
 
316
-        <section>
 
317
-          <attribute name="id">tools-section</attribute>
 
318
-        </section>
 
319
-        <section>
 
320
-          <attribute name="id">tools-section-1</attribute>
 
321
-        </section>
 
322
-      </submenu>
 
323
-    </section>
 
324
-    <section>
 
325
-      <attribute name="id">close-section</attribute>
 
326
-      <item>
 
327
-        <attribute name="label" translatable="yes">_Close All</attribute>
 
328
-        <attribute name="action">win.close-all</attribute>
 
329
-      </item>
 
330
-      <item>
 
331
-        <attribute name="label" translatable="yes">_Close</attribute>
 
332
-        <attribute name="action">win.close</attribute>
 
333
-      </item>
 
334
-    </section>
 
335
-  </menu>
 
336
-</interface>
 
337
Index: gedit-3.16.3/gedit/resources/gtk/menus-osx.ui
 
338
===================================================================
 
339
--- gedit-3.16.3.orig/gedit/resources/gtk/menus-osx.ui
 
340
+++ /dev/null
 
341
@@ -1,277 +0,0 @@
 
342
-<?xml version="1.0"?>
 
343
-<interface>
 
344
-  <!-- interface-requires gtk+ 3.0 -->
 
345
-  <menu id="menubar">
 
346
-    <section>
 
347
-      <submenu>
 
348
-        <attribute name="label" translatable="yes">File</attribute>
 
349
-        <section>
 
350
-          <attribute name="id">file-section-0</attribute>
 
351
-          <item>
 
352
-            <attribute name="label" translatable="yes" comments="_New is the menu item under the File menu on OS X which creates a new empty document.">_New</attribute>
 
353
-            <attribute name="action">win.new-tab</attribute>
 
354
-          </item>
 
355
-        </section>
 
356
-        <section>
 
357
-          <attribute name="id">file-section</attribute>
 
358
-          <item>
 
359
-            <attribute name="label" translatable="yes">_Open</attribute>
 
360
-            <attribute name="action">win.open</attribute>
 
361
-            <attribute name="hidden-when">action-disabled</attribute>
 
362
-          </item>
 
363
-          <item>
 
364
-            <attribute name="label" translatable="yes">_Open</attribute>
 
365
-            <attribute name="action">app.open</attribute>
 
366
-            <attribute name="hidden-when">action-disabled</attribute>
 
367
-          </item>
 
368
-          <submenu>
 
369
-            <attribute name="label" translatable="yes">Open _Recent</attribute>
 
370
-            <section>
 
371
-              <item>
 
372
-                <attribute name="label" translatable="yes">Reopen Closed _Tab</attribute>
 
373
-                <attribute name="action">win.reopen-closed-tab</attribute>
 
374
-              </item>
 
375
-            </section>
 
376
-            <section>
 
377
-              <attribute name="id">recent-files-section</attribute>
 
378
-            </section>
 
379
-          </submenu>
 
380
-        </section>
 
381
-        <section>
 
382
-          <attribute name="id">file-section-1</attribute>
 
383
-          <item>
 
384
-            <attribute name="label" translatable="yes">_Save</attribute>
 
385
-            <attribute name="action">win.save</attribute>
 
386
-          </item>
 
387
-          <item>
 
388
-            <attribute name="label" translatable="yes">Save _As…</attribute>
 
389
-            <attribute name="action">win.save-as</attribute>
 
390
-          </item>
 
391
-        </section>
 
392
-        <section>
 
393
-          <attribute name="id">app-commands-section</attribute>
 
394
-          <item>
 
395
-            <attribute name="label" translatable="yes">_New Window</attribute>
 
396
-            <attribute name="action">app.new-window</attribute>
 
397
-          </item>
 
398
-        </section>
 
399
-        <section>
 
400
-          <attribute name="id">file-section-2</attribute>
 
401
-          <item>
 
402
-            <attribute name="label" translatable="yes">_Reload</attribute>
 
403
-            <attribute name="action">win.revert</attribute>
 
404
-          </item>
 
405
-        </section>
 
406
-        <section>
 
407
-          <attribute name="id">file-section-3</attribute>
 
408
-          <item>
 
409
-            <attribute name="label" translatable="yes">_Print…</attribute>
 
410
-            <attribute name="action">win.print</attribute>
 
411
-          </item>
 
412
-        </section>
 
413
-        <section>
 
414
-          <attribute name="id">close-section</attribute>
 
415
-          <item>
 
416
-            <attribute name="label" translatable="yes">_Close</attribute>
 
417
-            <attribute name="action">win.close</attribute>
 
418
-          </item>
 
419
-        </section>
 
420
-      </submenu>
 
421
-      <submenu>
 
422
-        <attribute name="label" translatable="yes">Edit</attribute>
 
423
-        <section>
 
424
-          <attribute name="id">edit-section</attribute>
 
425
-          <item>
 
426
-            <attribute name="label" translatable="yes">_Undo</attribute>
 
427
-            <attribute name="action">win.undo</attribute>
 
428
-          </item>
 
429
-          <item>
 
430
-            <attribute name="label" translatable="yes">_Redo</attribute>
 
431
-            <attribute name="action">win.undo</attribute>
 
432
-          </item>
 
433
-        </section>
 
434
-        <section>
 
435
-          <item>
 
436
-            <attribute name="label" translatable="yes">C_ut</attribute>
 
437
-            <attribute name="action">win.cut</attribute>
 
438
-          </item>
 
439
-          <item>
 
440
-            <attribute name="label" translatable="yes">_Copy</attribute>
 
441
-            <attribute name="action">win.copy</attribute>
 
442
-          </item>
 
443
-          <item>
 
444
-            <attribute name="label" translatable="yes">_Paste</attribute>
 
445
-            <attribute name="action">win.paste</attribute>
 
446
-          </item>
 
447
-          <item>
 
448
-            <attribute name="label" translatable="yes">_Delete</attribute>
 
449
-            <attribute name="action">win.delete</attribute>
 
450
-          </item>
 
451
-        </section>
 
452
-        <section>
 
453
-          <attribute name="id">edit-section-1</attribute>
 
454
-          <item>
 
455
-            <attribute name="label" translatable="yes">Overwrite _Mode</attribute>
 
456
-            <attribute name="action">win.overwrite-mode</attribute>
 
457
-          </item>
 
458
-        </section>
 
459
-        <section>
 
460
-          <attribute name="id">edit-section-2</attribute>
 
461
-          <item>
 
462
-            <attribute name="label" translatable="yes">Select _All</attribute>
 
463
-            <attribute name="action">win.select-all</attribute>
 
464
-          </item>
 
465
-        </section>
 
466
-      </submenu>
 
467
-      <submenu>
 
468
-        <attribute name="label" translatable="yes">View</attribute>
 
469
-        <section>
 
470
-          <attribute name="id">view-section</attribute>
 
471
-          <item>
 
472
-            <attribute name="label" translatable="yes">Side _Panel</attribute>
 
473
-            <attribute name="action">win.side-panel</attribute>
 
474
-          </item>
 
475
-          <item>
 
476
-            <attribute name="label" translatable="yes">_Bottom Panel</attribute>
 
477
-            <attribute name="action">win.bottom-panel</attribute>
 
478
-            <attribute name="hidden-when">action-disabled</attribute>
 
479
-          </item>
 
480
-        </section>
 
481
-        <section>
 
482
-          <attribute name="id">view-section-1</attribute>
 
483
-          <item>
 
484
-            <attribute name="label" translatable="yes">_Fullscreen</attribute>
 
485
-            <attribute name="action">win.fullscreen</attribute>
 
486
-          </item>
 
487
-        </section>
 
488
-        <section>
 
489
-          <attribute name="id">view-section-2</attribute>
 
490
-          <item>
 
491
-            <attribute name="label" translatable="yes">_Highlight Mode…</attribute>
 
492
-            <attribute name="action">win.highlight-mode</attribute>
 
493
-          </item>
 
494
-        </section>
 
495
-      </submenu>
 
496
-      <submenu>
 
497
-        <attribute name="label" translatable="yes">Search</attribute>
 
498
-        <section>
 
499
-          <attribute name="id">search-section</attribute>
 
500
-          <item>
 
501
-            <attribute name="label" translatable="yes">_Find…</attribute>
 
502
-            <attribute name="action">win.find</attribute>
 
503
-          </item>
 
504
-          <item>
 
505
-            <attribute name="label" translatable="yes">Find Ne_xt</attribute>
 
506
-            <attribute name="action">win.find-next</attribute>
 
507
-          </item>
 
508
-          <item>
 
509
-            <attribute name="label" translatable="yes">Find Pre_vious</attribute>
 
510
-            <attribute name="action">win.find-prev</attribute>
 
511
-          </item>
 
512
-        </section>
 
513
-        <section>
 
514
-          <attribute name="id">search-section-1</attribute>
 
515
-          <item>
 
516
-            <attribute name="label" translatable="yes">Find and _Replace…</attribute>
 
517
-            <attribute name="action">win.replace</attribute>
 
518
-          </item>
 
519
-        </section>
 
520
-        <section>
 
521
-          <attribute name="id">search-section-2</attribute>
 
522
-          <item>
 
523
-            <attribute name="label" translatable="yes">_Clear Highlight</attribute>
 
524
-            <attribute name="action">win.clear-highlight</attribute>
 
525
-          </item>
 
526
-        </section>
 
527
-        <section>
 
528
-          <attribute name="id">search-section-3</attribute>
 
529
-          <item>
 
530
-            <attribute name="label" translatable="yes">Go to _Line…</attribute>
 
531
-            <attribute name="action">win.goto-line</attribute>
 
532
-          </item>
 
533
-        </section>
 
534
-      </submenu>
 
535
-      <submenu>
 
536
-        <attribute name="label" translatable="yes">Tools</attribute>
 
537
-        <section>
 
538
-          <attribute name="id">spell-section</attribute>
 
539
-        </section>
 
540
-        <section>
 
541
-          <attribute name="id">tools-section</attribute>
 
542
-        </section>
 
543
-        <section>
 
544
-          <attribute name="id">tools-section-1</attribute>
 
545
-        </section>
 
546
-        <section>
 
547
-          <attribute name="id">preferences-section</attribute>
 
548
-        </section>
 
549
-      </submenu>
 
550
-      <submenu>
 
551
-        <attribute name="label" translatable="yes">Documents</attribute>
 
552
-        <section>
 
553
-          <attribute name="id">documents-section</attribute>
 
554
-          <item>
 
555
-            <attribute name="label" translatable="yes">_Save All</attribute>
 
556
-            <attribute name="action">win.save-all</attribute>
 
557
-          </item>
 
558
-          <item>
 
559
-            <attribute name="label" translatable="yes">_Close All</attribute>
 
560
-            <attribute name="action">win.close-all</attribute>
 
561
-          </item>
 
562
-        </section>
 
563
-        <section>
 
564
-          <attribute name="id">documents-section-1</attribute>
 
565
-          <item>
 
566
-            <attribute name="label" translatable="yes">_New Tab Group</attribute>
 
567
-            <attribute name="action">win.new-tab-group</attribute>
 
568
-          </item>
 
569
-          <item>
 
570
-            <attribute name="label" translatable="yes">P_revious Tab Group</attribute>
 
571
-            <attribute name="action">win.previous-tab-group</attribute>
 
572
-          </item>
 
573
-          <item>
 
574
-            <attribute name="label" translatable="yes">Nex_t Tab Group</attribute>
 
575
-            <attribute name="action">win.next-tab-group</attribute>
 
576
-          </item>
 
577
-        </section>
 
578
-        <section>
 
579
-          <attribute name="id">documents-section-2</attribute>
 
580
-          <item>
 
581
-            <attribute name="label" translatable="yes">_Previous Document</attribute>
 
582
-            <attribute name="action">win.previous-document</attribute>
 
583
-          </item>
 
584
-          <item>
 
585
-            <attribute name="label" translatable="yes">N_ext Document</attribute>
 
586
-            <attribute name="action">win.next-document</attribute>
 
587
-          </item>
 
588
-        </section>
 
589
-        <section>
 
590
-          <attribute name="id">documents-section-3</attribute>
 
591
-          <item>
 
592
-            <attribute name="label" translatable="yes">_Move To New Window</attribute>
 
593
-            <attribute name="action">win.move-to-new-window</attribute>
 
594
-          </item>
 
595
-        </section>
 
596
-      </submenu>
 
597
-      <submenu>
 
598
-        <attribute name="label" translatable="yes">Help</attribute>
 
599
-        <section>
 
600
-          <attribute name="id">help-section</attribute>
 
601
-          <item>
 
602
-            <attribute name="label" translatable="yes">_Help</attribute>
 
603
-            <attribute name="action">app.help</attribute>
 
604
-          </item>
 
605
-        </section>
 
606
-      </submenu>
 
607
-    </section>
 
608
-  </menu>
 
609
-  <!--<menu id="gear-menu">
 
610
-    <section>
 
611
-      <attribute name="id">edit-section</attribute>
 
612
-    </section>
 
613
-    <section>
 
614
-      <attribute name="id">edit-section-1</attribute>
 
615
-    </section>
 
616
-
 
617
-  </menu>-->
 
618
-</interface>
 
619
Index: gedit-3.16.3/gedit/resources/gtk/menus-traditional.ui
 
620
===================================================================
 
621
--- gedit-3.16.3.orig/gedit/resources/gtk/menus-traditional.ui
 
622
+++ gedit-3.16.3/gedit/resources/gtk/menus-traditional.ui
 
623
@@ -1,67 +1,141 @@
 
624
 <?xml version="1.0"?>
 
625
 <interface>
 
626
   <!-- interface-requires gtk+ 3.0 -->
 
627
-  <menu id="gear-menu">
 
628
-    <section>
 
629
-      <attribute name="id">juntion-section</attribute>
 
630
-      <attribute name="display-hint">horizontal-buttons</attribute>
 
631
-      <item>
 
632
-        <attribute name="label" translatable="yes">_Reload</attribute>
 
633
-        <attribute name="action">win.revert</attribute>
 
634
-        <attribute name="verb-icon">view-refresh-symbolic</attribute>
 
635
-      </item>
 
636
-      <item>
 
637
-        <attribute name="label" translatable="yes">_Print…</attribute>
 
638
-        <attribute name="action">win.print</attribute>
 
639
-        <attribute name="verb-icon">printer-symbolic</attribute>
 
640
-      </item>
 
641
-      <item>
 
642
-        <attribute name="label" translatable="yes">_Fullscreen</attribute>
 
643
-        <attribute name="action">win.fullscreen</attribute>
 
644
-        <attribute name="verb-icon">view-fullscreen-symbolic</attribute>
 
645
-      </item>
 
646
-    </section>
 
647
-    <section>
 
648
-      <attribute name="id">file-section</attribute>
 
649
-    </section>
 
650
-    <section>
 
651
-      <attribute name="id">file-section-1</attribute>
 
652
-      <item>
 
653
-        <attribute name="label" translatable="yes">_Save As…</attribute>
 
654
-        <attribute name="action">win.save-as</attribute>
 
655
-      </item>
 
656
-      <item>
 
657
-        <attribute name="label" translatable="yes">Save _All</attribute>
 
658
-        <attribute name="action">win.save-all</attribute>
 
659
-      </item>
 
660
-    </section>
 
661
-    <section>
 
662
-      <attribute name="id">edit-section</attribute>
 
663
-    </section>
 
664
-    <section>
 
665
-      <attribute name="id">edit-section-1</attribute>
 
666
-    </section>
 
667
-    <section>
 
668
-      <attribute name="id">search-section</attribute>
 
669
-      <item>
 
670
-        <attribute name="label" translatable="yes">_Find…</attribute>
 
671
-        <attribute name="action">win.find</attribute>
 
672
-      </item>
 
673
-      <item>
 
674
-        <attribute name="label" translatable="yes">_Find and Replace…</attribute>
 
675
-        <attribute name="action">win.replace</attribute>
 
676
-      </item>
 
677
-      <item>
 
678
-        <attribute name="label" translatable="yes">_Clear Highlight</attribute>
 
679
-        <attribute name="action">win.clear-highlight</attribute>
 
680
-      </item>
 
681
-      <item>
 
682
-        <attribute name="label" translatable="yes">_Go to Line…</attribute>
 
683
-        <attribute name="action">win.goto-line</attribute>
 
684
-      </item>
 
685
-    </section>
 
686
+  <menu id="menubar">
 
687
     <section>
 
688
       <submenu>
 
689
+        <attribute name="label" translatable="yes">File</attribute>
 
690
+        <section>
 
691
+          <attribute name="id">file-section-0</attribute>
 
692
+          <item>
 
693
+            <attribute name="label" translatable="yes" comments="_New is the menu item under the File menu on OS X which creates a new empty document.">_New</attribute>
 
694
+            <attribute name="action">win.new-tab</attribute>
 
695
+          </item>
 
696
+        </section>
 
697
+        <section>
 
698
+          <attribute name="id">file-section</attribute>
 
699
+          <item>
 
700
+            <attribute name="label" translatable="yes">_Open</attribute>
 
701
+            <attribute name="action">win.open</attribute>
 
702
+            <attribute name="hidden-when">action-disabled</attribute>
 
703
+          </item>
 
704
+          <item>
 
705
+            <attribute name="label" translatable="yes">_Open</attribute>
 
706
+            <attribute name="action">app.open</attribute>
 
707
+            <attribute name="hidden-when">action-disabled</attribute>
 
708
+          </item>
 
709
+          <submenu>
 
710
+            <attribute name="label" translatable="yes">Open _Recent</attribute>
 
711
+            <section>
 
712
+              <item>
 
713
+                <attribute name="label" translatable="yes">Reopen Closed _Tab</attribute>
 
714
+                <attribute name="action">win.reopen-closed-tab</attribute>
 
715
+              </item>
 
716
+            </section>
 
717
+            <section>
 
718
+              <attribute name="id">recent-files-section</attribute>
 
719
+            </section>
 
720
+          </submenu>
 
721
+        </section>
 
722
+        <section>
 
723
+          <attribute name="id">file-section-1</attribute>
 
724
+          <item>
 
725
+            <attribute name="label" translatable="yes">_Save</attribute>
 
726
+            <attribute name="action">win.save</attribute>
 
727
+          </item>
 
728
+          <item>
 
729
+            <attribute name="label" translatable="yes">Save _As…</attribute>
 
730
+            <attribute name="action">win.save-as</attribute>
 
731
+          </item>
 
732
+        </section>
 
733
+        <section>
 
734
+          <attribute name="id">app-commands-section</attribute>
 
735
+          <item>
 
736
+            <attribute name="label" translatable="yes">_New Window</attribute>
 
737
+            <attribute name="action">app.new-window</attribute>
 
738
+          </item>
 
739
+        </section>
 
740
+        <section>
 
741
+          <attribute name="id">file-section-2</attribute>
 
742
+          <item>
 
743
+            <attribute name="label" translatable="yes">_Reload</attribute>
 
744
+            <attribute name="action">win.revert</attribute>
 
745
+          </item>
 
746
+        </section>
 
747
+        <section>
 
748
+          <attribute name="id">file-section-3</attribute>
 
749
+          <item>
 
750
+            <attribute name="label" translatable="yes">_Print…</attribute>
 
751
+            <attribute name="action">win.print</attribute>
 
752
+          </item>
 
753
+        </section>
 
754
+        <section>
 
755
+          <attribute name="id">close-section</attribute>
 
756
+          <item>
 
757
+            <attribute name="label" translatable="yes">_Close</attribute>
 
758
+            <attribute name="action">win.close</attribute>
 
759
+          </item>
 
760
+          <item>
 
761
+            <attribute name="label" translatable="yes">_Quit</attribute>
 
762
+            <attribute name="hidden-when">macos-menubar</attribute>
 
763
+            <attribute name="action">app.quit</attribute>
 
764
+          </item>
 
765
+        </section>
 
766
+      </submenu>
 
767
+      <submenu>
 
768
+        <attribute name="label" translatable="yes">Edit</attribute>
 
769
+        <section>
 
770
+          <attribute name="id">edit-section</attribute>
 
771
+          <item>
 
772
+            <attribute name="label" translatable="yes">_Undo</attribute>
 
773
+            <attribute name="action">win.undo</attribute>
 
774
+          </item>
 
775
+          <item>
 
776
+            <attribute name="label" translatable="yes">_Redo</attribute>
 
777
+            <attribute name="action">win.undo</attribute>
 
778
+          </item>
 
779
+        </section>
 
780
+        <section>
 
781
+          <item>
 
782
+            <attribute name="label" translatable="yes">C_ut</attribute>
 
783
+            <attribute name="action">win.cut</attribute>
 
784
+          </item>
 
785
+          <item>
 
786
+            <attribute name="label" translatable="yes">_Copy</attribute>
 
787
+            <attribute name="action">win.copy</attribute>
 
788
+          </item>
 
789
+          <item>
 
790
+            <attribute name="label" translatable="yes">_Paste</attribute>
 
791
+            <attribute name="action">win.paste</attribute>
 
792
+          </item>
 
793
+          <item>
 
794
+            <attribute name="label" translatable="yes">_Delete</attribute>
 
795
+            <attribute name="action">win.delete</attribute>
 
796
+          </item>
 
797
+        </section>
 
798
+        <section>
 
799
+          <attribute name="id">edit-section-1</attribute>
 
800
+          <item>
 
801
+            <attribute name="label" translatable="yes">Overwrite _Mode</attribute>
 
802
+            <attribute name="action">win.overwrite-mode</attribute>
 
803
+          </item>
 
804
+        </section>
 
805
+        <section>
 
806
+          <attribute name="id">edit-section-2</attribute>
 
807
+          <item>
 
808
+            <attribute name="label" translatable="yes">Select _All</attribute>
 
809
+            <attribute name="action">win.select-all</attribute>
 
810
+          </item>
 
811
+        </section>
 
812
+        <section>
 
813
+          <item>
 
814
+            <attribute name="label" translatable="yes">_Preferences</attribute>
 
815
+            <attribute name="hidden-when">macos-menubar</attribute>
 
816
+            <attribute name="action">app.preferences</attribute>
 
817
+          </item>
 
818
+        </section>
 
819
+      </submenu>
 
820
+      <submenu>
 
821
         <attribute name="label" translatable="yes">View</attribute>
 
822
         <section>
 
823
           <attribute name="id">view-section</attribute>
 
824
@@ -77,6 +151,10 @@
 
825
         </section>
 
826
         <section>
 
827
           <attribute name="id">view-section-1</attribute>
 
828
+          <item>
 
829
+            <attribute name="label" translatable="yes">_Fullscreen</attribute>
 
830
+            <attribute name="action">win.fullscreen</attribute>
 
831
+          </item>
 
832
         </section>
 
833
         <section>
 
834
           <attribute name="id">view-section-2</attribute>
 
835
@@ -87,6 +165,45 @@
 
836
         </section>
 
837
       </submenu>
 
838
       <submenu>
 
839
+        <attribute name="label" translatable="yes">Search</attribute>
 
840
+        <section>
 
841
+          <attribute name="id">search-section</attribute>
 
842
+          <item>
 
843
+            <attribute name="label" translatable="yes">_Find…</attribute>
 
844
+            <attribute name="action">win.find</attribute>
 
845
+          </item>
 
846
+          <item>
 
847
+            <attribute name="label" translatable="yes">Find Ne_xt</attribute>
 
848
+            <attribute name="action">win.find-next</attribute>
 
849
+          </item>
 
850
+          <item>
 
851
+            <attribute name="label" translatable="yes">Find Pre_vious</attribute>
 
852
+            <attribute name="action">win.find-prev</attribute>
 
853
+          </item>
 
854
+        </section>
 
855
+        <section>
 
856
+          <attribute name="id">search-section-1</attribute>
 
857
+          <item>
 
858
+            <attribute name="label" translatable="yes">Find and _Replace…</attribute>
 
859
+            <attribute name="action">win.replace</attribute>
 
860
+          </item>
 
861
+        </section>
 
862
+        <section>
 
863
+          <attribute name="id">search-section-2</attribute>
 
864
+          <item>
 
865
+            <attribute name="label" translatable="yes">_Clear Highlight</attribute>
 
866
+            <attribute name="action">win.clear-highlight</attribute>
 
867
+          </item>
 
868
+        </section>
 
869
+        <section>
 
870
+          <attribute name="id">search-section-3</attribute>
 
871
+          <item>
 
872
+            <attribute name="label" translatable="yes">Go to _Line…</attribute>
 
873
+            <attribute name="action">win.goto-line</attribute>
 
874
+          </item>
 
875
+        </section>
 
876
+      </submenu>
 
877
+      <submenu>
 
878
         <attribute name="label" translatable="yes">Tools</attribute>
 
879
         <section>
 
880
           <attribute name="id">spell-section</attribute>
 
881
@@ -97,40 +214,83 @@
 
882
         <section>
 
883
           <attribute name="id">tools-section-1</attribute>
 
884
         </section>
 
885
+        <section>
 
886
+          <attribute name="id">preferences-section</attribute>
 
887
+        </section>
 
888
+      </submenu>
 
889
+      <submenu>
 
890
+        <attribute name="label" translatable="yes">Documents</attribute>
 
891
+        <section>
 
892
+          <attribute name="id">documents-section</attribute>
 
893
+          <item>
 
894
+            <attribute name="label" translatable="yes">_Save All</attribute>
 
895
+            <attribute name="action">win.save-all</attribute>
 
896
+          </item>
 
897
+          <item>
 
898
+            <attribute name="label" translatable="yes">_Close All</attribute>
 
899
+            <attribute name="action">win.close-all</attribute>
 
900
+          </item>
 
901
+        </section>
 
902
+        <section>
 
903
+          <attribute name="id">documents-section-1</attribute>
 
904
+          <item>
 
905
+            <attribute name="label" translatable="yes">_New Tab Group</attribute>
 
906
+            <attribute name="action">win.new-tab-group</attribute>
 
907
+          </item>
 
908
+          <item>
 
909
+            <attribute name="label" translatable="yes">P_revious Tab Group</attribute>
 
910
+            <attribute name="action">win.previous-tab-group</attribute>
 
911
+          </item>
 
912
+          <item>
 
913
+            <attribute name="label" translatable="yes">Nex_t Tab Group</attribute>
 
914
+            <attribute name="action">win.next-tab-group</attribute>
 
915
+          </item>
 
916
+        </section>
 
917
+        <section>
 
918
+          <attribute name="id">documents-section-2</attribute>
 
919
+          <item>
 
920
+            <attribute name="label" translatable="yes">_Previous Document</attribute>
 
921
+            <attribute name="action">win.previous-document</attribute>
 
922
+          </item>
 
923
+          <item>
 
924
+            <attribute name="label" translatable="yes">N_ext Document</attribute>
 
925
+            <attribute name="action">win.next-document</attribute>
 
926
+          </item>
 
927
+        </section>
 
928
+        <section>
 
929
+          <attribute name="id">documents-section-3</attribute>
 
930
+          <item>
 
931
+            <attribute name="label" translatable="yes">_Move To New Window</attribute>
 
932
+            <attribute name="action">win.move-to-new-window</attribute>
 
933
+          </item>
 
934
+        </section>
 
935
+      </submenu>
 
936
+      <submenu>
 
937
+        <attribute name="label" translatable="yes">Help</attribute>
 
938
+        <section>
 
939
+          <attribute name="id">help-section</attribute>
 
940
+          <item>
 
941
+            <attribute name="label" translatable="yes">_Help</attribute>
 
942
+            <attribute name="action">app.help</attribute>
 
943
+          </item>
 
944
+        </section>
 
945
+        <section>
 
946
+          <item>
 
947
+            <attribute name="label" translatable="yes">_About</attribute>
 
948
+            <attribute name="hidden-when">macos-menubar</attribute>
 
949
+            <attribute name="action">app.about</attribute>
 
950
+          </item>
 
951
+        </section>
 
952
       </submenu>
 
953
     </section>
 
954
+  </menu>
 
955
+  <!--<menu id="gear-menu">
 
956
     <section>
 
957
-      <attribute name="id">preferences-section</attribute>
 
958
-      <item>
 
959
-        <attribute name="label" translatable="yes">_Preferences</attribute>
 
960
-        <attribute name="action">app.preferences</attribute>
 
961
-      </item>
 
962
-    </section>
 
963
-    <section>
 
964
-      <attribute name="id">help-section</attribute>
 
965
-      <item>
 
966
-        <attribute name="label" translatable="yes">_Help</attribute>
 
967
-        <attribute name="action">app.help</attribute>
 
968
-      </item>
 
969
-      <item>
 
970
-        <attribute name="label" translatable="yes">_About</attribute>
 
971
-        <attribute name="action">app.about</attribute>
 
972
-      </item>
 
973
+      <attribute name="id">edit-section</attribute>
 
974
     </section>
 
975
     <section>
 
976
-      <attribute name="id">close-section</attribute>
 
977
-      <item>
 
978
-        <attribute name="label" translatable="yes">_Close All</attribute>
 
979
-        <attribute name="action">win.close-all</attribute>
 
980
-      </item>
 
981
-      <item>
 
982
-        <attribute name="label" translatable="yes">_Close</attribute>
 
983
-        <attribute name="action">win.close</attribute>
 
984
-      </item>
 
985
-      <item>
 
986
-        <attribute name="label" translatable="yes">_Quit</attribute>
 
987
-        <attribute name="action">app.quit</attribute>
 
988
-      </item>
 
989
+      <attribute name="id">edit-section-1</attribute>
 
990
     </section>
 
991
-  </menu>
 
992
+
 
993
+  </menu>-->
 
994
 </interface>