[Xfce4-commits] <terminal:master> Register in Gnome's default applications (bug #6020).

Nick Schermer noreply at xfce.org
Sun Dec 6 13:48:01 CET 2009


Updating branch refs/heads/master
         to 2c44ce88dff590536e29546f68994b0855326d0b (commit)
       from ed30d1acb8b472b6b0b937a7b40458c4fc127351 (commit)

commit 2c44ce88dff590536e29546f68994b0855326d0b
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Dec 6 13:42:10 2009 +0100

    Register in Gnome's default applications (bug #6020).
    
    When gnome-control-center is installed, install an xml file to
    register the Xfce Terminal Emulator.

 Makefile.am                  |    7 +++++++
 Terminal-default-apps.xml.in |   13 +++++++++++++
 configure.in.in              |   14 ++++++++++++++
 po/POTFILES.in               |    1 +
 4 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 93164fd..aea74c0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,6 +36,13 @@ desktop_in_files = Terminal.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
+xml_in_files = Terminal-default-apps.xml.in
+if DEFAULT_APPS_DEFINITION
+xmldir = $(DEFAULTAPPS_DIR)
+xml_DATA = $(xml_in_files:.xml.in=.xml)
+endif
+ at INTLTOOL_XML_RULE@
+
 man_MANS = Terminal.1
 
 uidir = $(datadir)/Terminal
diff --git a/Terminal-default-apps.xml.in b/Terminal-default-apps.xml.in
new file mode 100644
index 0000000..76592e6
--- /dev/null
+++ b/Terminal-default-apps.xml.in
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
+<default-apps>
+  <terminals>
+    <terminal>
+      <_name>Xfce Terminal Emulator</_name>
+      <executable>Terminal</executable>
+      <command>Terminal</command>
+      <icon-name>Terminal</icon-name>
+      <exec-flag>-x</exec-flag>
+    </terminal>
+  </terminals>
+</default-apps>
diff --git a/configure.in.in b/configure.in.in
index c639cad..f3930b5 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -126,6 +126,20 @@ if test x"$enable_xml2po" = x"yes"; then
 fi
 AM_CONDITIONAL([ENABLE_XML2PO], [test x"$enable_xml2po" = x"yes"])
 
+dnl ****************************************
+dnl *** Register in Gnome Control Center ***
+dnl ****************************************
+AC_MSG_CHECKING([Whether to install GNOME control-center default application definition])
+if $PKG_CONFIG --variable=keysdir gnome-default-applications >/dev/null ; then
+     AC_MSG_RESULT([yes])
+     DEFAULTAPPS_DIR="`$PKG_CONFIG --variable=defappsdir gnome-default-applications`"
+     AC_SUBST(DEFAULTAPPS_DIR)
+else
+     AC_MSG_RESULT([no])
+     DEFAULTAPPS_DIR="/usr/share/test"
+fi
+AM_CONDITIONAL([DEFAULT_APPS_DEFINITION],[test -n "$DEFAULTAPPS_DIR"])
+
 dnl ***********************************
 dnl *** Check for debugging support ***
 dnl ***********************************
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6ffc89e..3d165be 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -16,3 +16,4 @@ terminal/terminal-window.c
 
 Terminal.desktop.in
 Terminal.ui
+Terminal-default-apps.xml.in



More information about the Xfce4-commits mailing list