i hate gnome.
authorDana Jansens <danakj@orodu.net>
Wed, 30 May 2007 03:53:17 +0000 (03:53 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 30 May 2007 03:53:17 +0000 (03:53 +0000)
make x-openbox-theme mime type
make obconf run it

Makefile.am
debian/postinst [new file with mode: 0644]
debian/postrm [new file with mode: 0644]
obconf.desktop
obconf.xml [new file with mode: 0644]
x-openbox-theme.desktop [new file with mode: 0644]

index 4e47405..8ad2e74 100644 (file)
@@ -5,6 +5,9 @@ gladedir        = $(datadir)/obconf
 pixmapdir       = $(datadir)/pixmaps
 themedir        = $(datadir)/openbox/themes
 desktopdir      = $(datadir)/applications
+mimedir         = $(datadir)/mime
+mimepkgdir      = $(datadir)/mime/packages
+kdemimedir      = $(datadir)/mimelnk/application
 
 AUTOMAKE_OPTIONS = subdir-objects
 ACLOCAL_AMFLAGS = -I m4
@@ -53,6 +56,12 @@ dist_noinst_DATA = \
 dist_desktop_DATA = \
        obconf.desktop
 
+dist_mimepkg_DATA = \
+       obconf.xml
+
+dist_kdemime_DATA = \
+       x-openbox-theme.desktop
+
 EXTRA_DIST = \
        config.rpath \
        README \
@@ -95,3 +104,5 @@ EXTRA_DIST = \
        debian/rules \
        config.rpath
 
+install-data-hook:
+       update-mime-database $(mimedir) || true
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..fee8dbd
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+# postinst script for openbox
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+        update-mime-database /usr/share/mime
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/postrm b/debian/postrm
new file mode 100644 (file)
index 0000000..422bd0b
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+# postrm script for openbox
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+    purge)
+    ;;
+    remove)
+        update-mime-database /usr/share/mime
+    ;;
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
index 60b882c..31aa8ce 100644 (file)
@@ -1,10 +1,11 @@
 [Desktop Entry]
+Encoding=UTF-8
+Type=Application
 Name=ObConf
-Comment=Openbox Preferences Manager
+Comment=Openbox preferences manager
 Icon=openbox.png
-Exec=obconf
+Exec=obconf %f
+Categories=Settings;DesktopSettings;GTK;
+MimeType=application/x-openbox-theme
 StartupNotify=true
 Terminal=false
-Type=Application
-Categories=Openbox;Application;System Tools
-Encoding=UTF-8
diff --git a/obconf.xml b/obconf.xml
new file mode 100644 (file)
index 0000000..d0fce1a
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+  <mime-type type="application/x-openbox-theme">
+         <comment xml:lang="en">openbox theme archive</comment>
+         <!--<sub-class-of type="application/x-gzip"/>-->
+         <glob pattern="*.obt"/>
+  </mime-type>
+</mime-info>
diff --git a/x-openbox-theme.desktop b/x-openbox-theme.desktop
new file mode 100644 (file)
index 0000000..fe10d2f
--- /dev/null
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=MimeType
+MimeType=application/x-openbox-theme
+Icon=openbox
+Patterns=*.obt;
+Comment=Openbox Theme Archive