diff --git a/.cvsignore b/.cvsignore
index 141defc..7c61667 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,2 +1,2 @@
setlayout.c
-openbox-3.4.7.1.tar.gz
+openbox-3.4.7.2.tar.gz
diff --git a/menu.xml b/menu.xml
new file mode 100644
index 0000000..c8966e7
--- /dev/null
+++ b/menu.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/openbox-3.4.7.2-numdesks.patch b/openbox-3.4.7.2-numdesks.patch
new file mode 100644
index 0000000..b3c2ad1
--- /dev/null
+++ b/openbox-3.4.7.2-numdesks.patch
@@ -0,0 +1,12 @@
+diff -up openbox-3.4.7.2/openbox/screen.c.numdesks openbox-3.4.7.2/openbox/screen.c
+--- openbox-3.4.7.2/openbox/screen.c.numdesks 2008-04-14 01:22:12.000000000 +0200
++++ openbox-3.4.7.2/openbox/screen.c 2008-05-14 15:53:39.000000000 +0200
+@@ -401,7 +401,7 @@ void screen_startup(gboolean reconfig)
+ this will also set the default names from the config file up for
+ desktops that don't have names yet */
+ screen_num_desktops = 0;
+- if (PROP_GET32(RootWindow(ob_display, ob_screen),
++ if (0 && PROP_GET32(RootWindow(ob_display, ob_screen),
+ net_number_of_desktops, cardinal, &d))
+ {
+ if (d != config_desktops_num) {
diff --git a/openbox.spec b/openbox.spec
index c41ca7b..a4cfc91 100644
--- a/openbox.spec
+++ b/openbox.spec
@@ -1,5 +1,5 @@
Name: openbox
-Version: 3.4.7.1
+Version: 3.4.7.2
Release: 1%{?dist}
Summary: A highly configurable and standards-compliant X11 window manager
@@ -8,8 +8,11 @@ License: GPLv2+
URL: http://icculus.org/openbox
Source0: http://icculus.org/openbox/releases/%{name}-%{version}.tar.gz
Source1: http://icculus.org/openbox/tools/setlayout.c
+Source2: xdg-menu
+Source3: menu.xml
Patch0: openbox-3.4.7.1-autostartdir.patch
+Patch1: openbox-3.4.7.2-numdesks.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -63,6 +66,7 @@ The %{name}-libs package contains shared libraries used by %{name}.
%prep
%setup -q
%patch0 -p1 -b .autostartdir
+%patch1 -p1 -b .numdesks
%build
@@ -78,7 +82,11 @@ gcc %{optflags} -o setlayout %{SOURCE1} -lX11
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
+
install setlayout %{buildroot}%{_bindir}
+install -p %{SOURCE2} %{buildroot}%{_datadir}/%{name}/xdg-menu
+sed 's|_XDGMENU_|%{_datadir}/%{name}/xdg-menu|g' < %{SOURCE3} \
+ > %{buildroot}%{_sysconfdir}/xdg/%{name}/menu.xml
%find_lang %{name}
rm -f %{buildroot}%{_libdir}/*.la
@@ -92,7 +100,7 @@ rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG COMPLIANCE COPYING README
-%doc data/*.xsd doc/rc-mouse-focus.xml
+%doc data/*.xsd data/menu.xml doc/rc-mouse-focus.xml
%dir %{_sysconfdir}/xdg/%{name}/
%config(noreplace) %{_sysconfdir}/xdg/%{name}/*
%{_bindir}/gnome-panel-control
@@ -101,6 +109,7 @@ rm -rf %{buildroot}
%{_bindir}/setlayout
%dir %{_datadir}/openbox
%{_datadir}/openbox/xdg-autostart
+%{_datadir}/openbox/xdg-menu
%{_datadir}/themes/*/
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/gnome/wm-properties/
@@ -125,6 +134,11 @@ rm -rf %{buildroot}
%changelog
+* Wed May 14 2008 Miroslav Lichvar - 3.4.7.2-1
+- Update to 3.4.7.2
+- Use gnome menus by default (Luke Macken) (#443548)
+- Force setting number of desktops (#444135)
+
* Thu Apr 17 2008 Miroslav Lichvar - 3.4.7.1-1
- Update to 3.4.7.1
- Don't require /usr/share/themes
diff --git a/sources b/sources
index fab8364..7bb602a 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
76f263e1550532ae54fd53c3a49b2c71 setlayout.c
-7012f5690264556890a7b812f892beef openbox-3.4.7.1.tar.gz
+9e7589e90519bc6ac2f4656ea6869439 openbox-3.4.7.2.tar.gz
diff --git a/xdg-menu b/xdg-menu
new file mode 100644
index 0000000..7006b54
--- /dev/null
+++ b/xdg-menu
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+
+import gmenu, sys
+from xml.sax.saxutils import escape
+
+def walk_menu(entry):
+ if entry.get_type() == gmenu.TYPE_DIRECTORY:
+ print ''
+ elif entry.get_type() == gmenu.TYPE_ENTRY and not entry.is_excluded:
+ print """
+ -
+ %s
+
""" % (escape(entry.get_name()), escape(entry.get_exec()))
+
+if len(sys.argv) > 1:
+ menu = sys.argv[1] + '.menu'
+else:
+ menu = 'applications.menu'
+
+print ''
+print ''
+map(walk_menu, gmenu.lookup_tree(menu).root.get_contents())
+print ''