[gnome-control-center] Revert "shell: Remove unused gnome-menus helper files"



commit d2bfa254d32ed7eca769e44687ea50251b167404
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 15 12:07:46 2013 +0100

    Revert "shell: Remove unused gnome-menus helper files"
    
    The files are used by gnome-shell to display the control-center
    search resulst in the overview.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690577
    
    This reverts commit 10f292dc6b89a7dc646937da2929b5b620c0b96b.
    
    Conflicts:
    	po/POTFILES.in
    	shell/Makefile.am

 po/POTFILES.in             |    1 +
 shell/Makefile.am          |   17 ++++++++-
 shell/gnomecc.directory.in |    5 +++
 shell/gnomecc.menu.in      |   84 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 105 insertions(+), 2 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 031ac17..51f584c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -148,5 +148,6 @@ panels/wacom/gsd-wacom-device.c
 [type: gettext/glade]panels/wacom/wacom-stylus-page.ui
 shell/control-center.c
 shell/gnome-control-center.c
+shell/gnomecc.directory.in
 shell/gnome-control-center.desktop.in.in
 [type: gettext/glade]shell/shell.ui
diff --git a/shell/Makefile.am b/shell/Makefile.am
index f2eae95..2fef094 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -84,6 +84,17 @@ endif
 
 AM_CPPFLAGS = -DGNOMELOCALEDIR="\"$(datadir)/locale\""
 
+menudir = $(sysconfdir)/xdg/menus
+menu_DATA = gnomecc.menu
+
+directorydir = $(datadir)/desktop-directories
+directory_in_files = gnomecc.directory.in
+directory_DATA = $(directory_in_files:.directory.in=.directory)
+ INTLTOOL_DIRECTORY_RULE@
+
+gnomecc.menu: gnomecc.menu.in
+	$(AM_V_GEN) cat $< | sed 's,@applicationsdir@,$(datadir)/applications/,' > $@
+
 resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/shell.gresource.xml)
 cc-shell-resources.c: shell.gresource.xml $(resource_files)
 	$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name cc_shell $<
@@ -106,10 +117,12 @@ EXTRA_DIST =					\
 	shell.gresource.xml			\
 	gnome-control-center.desktop.in.in	\
 	$(completion_in_files)			\
-	list-panel.sh
+	list-panel.sh				\
+	gnomecc.directory.in			\
+	gnomecc.menu.in
 
 CLEANFILES = $(BUILT_SOURCES) $(completion_DATA)
-DISTCLEANFILES = gnome-control-center.desktop gnome-control-center.desktop.in
+DISTCLEANFILES = gnome-control-center.desktop gnome-control-center.desktop.in gnomecc.directory gnomecc.menu
 
 noinst_PROGRAMS = test-hostname
 test_hostname_SOURCES = hostname-helper.c hostname-helper.h test-hostname.c
diff --git a/shell/gnomecc.directory.in b/shell/gnomecc.directory.in
new file mode 100644
index 0000000..fef6994
--- /dev/null
+++ b/shell/gnomecc.directory.in
@@ -0,0 +1,5 @@
+[Desktop Entry]
+_Name=Control Center
+Icon=gnome-settings
+Type=Directory
+
diff --git a/shell/gnomecc.menu.in b/shell/gnomecc.menu.in
new file mode 100644
index 0000000..8701aa2
--- /dev/null
+++ b/shell/gnomecc.menu.in
@@ -0,0 +1,84 @@
+<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
+ "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd";>
+
+<Menu>
+  <Name>Control Center</Name>
+  <Directory>gnomecc.directory</Directory>
+
+  <!-- Read standard .directory and .desktop file locations -->
+  <AppDir>@applicationsdir@</AppDir>
+  <DefaultDirectoryDirs/>
+
+  <!-- Read in overrides and child menus from gnomecc-merged/ -->
+  <DefaultMergeDirs/>
+
+   <!-- Sort the control center categories -->
+   <Layout>
+     <Menuname>Personal</Menuname>
+     <Menuname>Hardware</Menuname>
+     <Menuname>System</Menuname>
+     <Menuname>Other</Menuname>
+     <Merge type="all" />
+   </Layout>
+
+  <!-- Stuff in the toplevel (Other category) -->
+  <Include>
+    <And>
+      <Category>Settings</Category>
+      <Not>
+        <Or>
+          <Category>X-GNOME-PersonalSettings</Category>
+          <Category>DesktopSettings</Category>
+          <Category>HardwareSettings</Category>
+          <Category>X-GNOME-SystemSettings</Category>
+          <Category>System</Category>
+        </Or>
+      </Not>
+    </And>
+  </Include>
+
+  <!-- Avoid the shell having a launcher for itself -->
+  <Exclude>
+    <Filename>gnome-control-center.desktop</Filename>
+  </Exclude>
+
+  <!-- Personal category -->
+  <Menu>
+    <Name>Personal</Name>
+    <Directory>Personal.directory</Directory>
+    <Include>
+      <And>
+        <Category>Settings</Category>
+        <Category>X-GNOME-PersonalSettings</Category>
+        <Category>X-GNOME-Settings-Panel</Category>
+      </And>
+    </Include>
+  </Menu> <!-- End Personal -->
+
+  <!-- Hardware category -->
+  <Menu>
+    <Name>Hardware</Name>
+    <Directory>Hardware.directory</Directory>
+    <Include>
+      <And>
+        <Category>Settings</Category>
+        <Category>HardwareSettings</Category>
+        <Category>X-GNOME-Settings-Panel</Category>
+      </And>
+    </Include>
+  </Menu> <!-- End Hardware -->
+
+  <!-- System category -->
+  <Menu>
+    <Name>System</Name>
+    <Directory>System.directory</Directory>
+    <Include>
+      <And>
+        <Category>Settings</Category>
+        <Category>X-GNOME-SystemSettings</Category>
+        <Category>X-GNOME-Settings-Panel</Category>
+      </And>
+    </Include>
+  </Menu> <!-- End System -->
+
+</Menu>     <!-- End CC -->



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]