[gedit/wip/3.14-osx: 13/18] [osx] OS dependent resources for menus
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/3.14-osx: 13/18] [osx] OS dependent resources for menus
- Date: Fri, 22 Aug 2014 09:01:50 +0000 (UTC)
commit 38ee85590b212b5d16418f31aa8d70fd59edf358
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Fri Aug 22 10:24:15 2014 +0200
[osx] OS dependent resources for menus
configure.ac | 14 +
gedit/Makefile.am | 7 +-
...{gedit.gresource.xml => gedit.gresource.xml.in} | 2 +-
gedit/resources/gtk/{menus.ui => menus-default.ui} | 0
gedit/resources/gtk/menus-osx.ui | 254 ++++++++++++++++++++
5 files changed, 275 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2c2658f..ea49ac8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -427,8 +427,22 @@ fi
# Vala
VAPIGEN_CHECK([0.25.1])
+if test "$os_osx" = "yes"; then
+ os_menus_ui=menus-osx.ui
+ RESOURCE_TRADITIONAL_MENUS_UI=
+else
+ os_menus_ui=menus-default.ui
+ RESOURCE_TRADITIONAL_MENUS_UI='<file preprocess="xml-stripblanks">gtk/menus-traditional.ui</file>'
+fi
+
+AC_SUBST(RESOURCE_TRADITIONAL_MENUS_UI)
+
+
+AC_CONFIG_LINKS(gedit/resources/gtk/menus.ui:gedit/resources/gtk/$os_menus_ui)
+
AC_CONFIG_FILES([
Makefile
+gedit/resources/gedit.gresource.xml
data/org.gnome.gedit.desktop.in
data/gedit.pc
data/org.gnome.gedit.gschema.xml
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index 48d40ff..d21f0f1 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -241,13 +241,18 @@ gedit_overridesdir = $(pyoverridesdir)
gedit_overrides_PYTHON = gedit/Gedit.py
endif
+gedit_dist_resource_deps = \
+ $(filter-out gedit/resources/gtk/menus.ui,$(gedit_resource_deps)) \
+ gedit/resources/gtk/menus-traditional.ui
+
EXTRA_DIST += \
gedit/gedit-enum-types.h.template \
gedit/gedit-enum-types.c.template \
gedit/gedit-marshal.list \
gedit/gedit.rc \
gedit/Gedit-3.0.metadata \
- $(gedit_resource_deps)
+ gedit/resources/gedit.gresource.xml.in \
+ $(gedit_dist_resource_deps)
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
diff --git a/gedit/resources/gedit.gresource.xml b/gedit/resources/gedit.gresource.xml.in
similarity index 95%
rename from gedit/resources/gedit.gresource.xml
rename to gedit/resources/gedit.gresource.xml.in
index 2b9f954..a2113cf 100644
--- a/gedit/resources/gedit.gresource.xml
+++ b/gedit/resources/gedit.gresource.xml.in
@@ -3,7 +3,7 @@
<gresource prefix="/org/gnome/gedit">
<file preprocess="xml-stripblanks">gtk/menus.ui</file>
<file preprocess="xml-stripblanks">gtk/menus-common.ui</file>
- <file preprocess="xml-stripblanks">gtk/menus-traditional.ui</file>
+ @RESOURCE_TRADITIONAL_MENUS_UI@
<file preprocess="xml-stripblanks">ui/gedit-encodings-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/gedit-preferences-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/gedit-replace-dialog.ui</file>
diff --git a/gedit/resources/gtk/menus.ui b/gedit/resources/gtk/menus-default.ui
similarity index 100%
rename from gedit/resources/gtk/menus.ui
rename to gedit/resources/gtk/menus-default.ui
diff --git a/gedit/resources/gtk/menus-osx.ui b/gedit/resources/gtk/menus-osx.ui
new file mode 100644
index 0000000..00c5356
--- /dev/null
+++ b/gedit/resources/gtk/menus-osx.ui
@@ -0,0 +1,254 @@
+<?xml version="1.0"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <menu id="menubar">
+ <section>
+ <submenu>
+ <attribute name="label" translatable="yes">File</attribute>
+ <section>
+ <attribute name="id">file-section</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_New</attribute>
+ <attribute name="action">win.new-tab</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Open</attribute>
+ <attribute name="action">win.open</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">file-section-1</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Save</attribute>
+ <attribute name="action">win.save</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Save _As…</attribute>
+ <attribute name="action">win.save-as</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">app-commands-section</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_New Window</attribute>
+ <attribute name="action">app.new-window</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">file-section-2</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Reload</attribute>
+ <attribute name="action">win.revert</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Reopen Closed _Tab</attribute>
+ <attribute name="action">win.reopen-closed-tab</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">file-section-3</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Print…</attribute>
+ <attribute name="action">win.print</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">close-section</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Close</attribute>
+ <attribute name="action">win.close</attribute>
+ </item>
+ </section>
+ </submenu>
+ <submenu>
+ <attribute name="label" translatable="yes">Edit</attribute>
+ <section>
+ <attribute name="id">edit-section</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Undo</attribute>
+ <attribute name="action">win.undo</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Redo</attribute>
+ <attribute name="action">win.undo</attribute>
+ </item>
+ </section>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">C_ut</attribute>
+ <attribute name="action">win.cut</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Copy</attribute>
+ <attribute name="action">win.copy</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Paste</attribute>
+ <attribute name="action">win.paste</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Delete</attribute>
+ <attribute name="action">win.delete</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">edit-section-1</attribute>
+ </section>
+ <section>
+ <attribute name="id">edit-section-2</attribute>
+ <item>
+ <attribute name="label" translatable="yes">Select _All</attribute>
+ <attribute name="action">win.select-all</attribute>
+ </item>
+ </section>
+ </submenu>
+ <submenu>
+ <attribute name="label" translatable="yes">View</attribute>
+ <section>
+ <attribute name="id">view-section</attribute>
+ <item>
+ <attribute name="label" translatable="yes">Side _Panel</attribute>
+ <attribute name="action">win.side-panel</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Bottom Panel</attribute>
+ <attribute name="action">win.bottom-panel</attribute>
+ <attribute name="hidden-when">action-disabled</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">view-section-1</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Fullscreen</attribute>
+ <attribute name="action">win.fullscreen</attribute>
+ <attribute name="verb-icon">view-fullscreen-symbolic</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">view-section-2</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Highlight Mode…</attribute>
+ <attribute name="action">win.highlight-mode</attribute>
+ </item>
+ </section>
+ </submenu>
+ <submenu>
+ <attribute name="label" translatable="yes">Search</attribute>
+ <section>
+ <attribute name="id">search-section</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Find…</attribute>
+ <attribute name="action">win.find</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Find Ne_xt</attribute>
+ <attribute name="action">win.find-next</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Find Pre_vious</attribute>
+ <attribute name="action">win.find-prev</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">search-section-1</attribute>
+ <item>
+ <attribute name="label" translatable="yes">Find and _Replace…</attribute>
+ <attribute name="action">win.replace</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">search-section-2</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Clear Highlight</attribute>
+ <attribute name="action">win.clear-highlight</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">search-section-3</attribute>
+ <item>
+ <attribute name="label" translatable="yes">Go to _Line…</attribute>
+ <attribute name="action">win.goto-line</attribute>
+ </item>
+ </section>
+ </submenu>
+ <submenu>
+ <attribute name="label" translatable="yes">Tools</attribute>
+ <section>
+ <attribute name="id">spell-section</attribute>
+ </section>
+ <section>
+ <attribute name="id">tools-section</attribute>
+ </section>
+ <section>
+ <attribute name="id">tools-section-1</attribute>
+ </section>
+ </submenu>
+ <submenu>
+ <attribute name="label" translatable="yes">Documents</attribute>
+ <section>
+ <attribute name="id">documents-section</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Save All</attribute>
+ <attribute name="action">win.save-all</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Close All</attribute>
+ <attribute name="action">win.close-all</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">documents-section-1</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_New Tab Group</attribute>
+ <attribute name="action">win.new-tab-group</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">P_revious Tab Group</attribute>
+ <attribute name="action">win.previous-tab-group</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Nex_t Tab Group</attribute>
+ <attribute name="action">win.next-tab-group</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">documents-section-2</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Previous Document</attribute>
+ <attribute name="action">win.previous-document</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">N_ext Document</attribute>
+ <attribute name="action">win.next-document</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="id">documents-section-3</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Move To New Window</attribute>
+ <attribute name="action">win.move-to-new-window</attribute>
+ </item>
+ </section>
+ </submenu>
+ <submenu>
+ <attribute name="label" translatable="yes">Help</attribute>
+ <section>
+ <attribute name="id">help-section</attribute>
+ <item>
+ <attribute name="label" translatable="yes">_Help</attribute>
+ <attribute name="action">app.help</attribute>
+ </item>
+ </section>
+ </submenu>
+ </section>
+ </menu>
+ <!--<menu id="gear-menu">
+ <section>
+ <attribute name="id">edit-section</attribute>
+ </section>
+ <section>
+ <attribute name="id">edit-section-1</attribute>
+ </section>
+
+ </menu>-->
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]