]> spindle.queued.net Git - midori/commitdiff
Install a separate Private Browsing desktop file
authorChristian Dywan <christian@twotoasts.de>
Mon, 5 Sep 2011 23:20:27 +0000 (01:20 +0200)
committerChristian Dywan <christian@twotoasts.de>
Mon, 5 Sep 2011 23:21:36 +0000 (01:21 +0200)
This way private browsing can be added as a shortcut and
typing in Synapse, Unity or GNOME Shell suggests it.

data/midori-private.desktop.in [new file with mode: 0644]
wscript

diff --git a/data/midori-private.desktop.in b/data/midori-private.desktop.in
new file mode 100644 (file)
index 0000000..e307ba9
--- /dev/null
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+_Name=Private Browsing
+_Comment=Open a new private browsing window
+Categories=GTK;Network;WebBrowser;
+Exec=midori --private
+Icon=midori
+Terminal=false
+StartupNotify=true
+X-Osso-Type=application/x-executable
+X-Osso-Service=midori
+
diff --git a/wscript b/wscript
index 39d7388291db698c91dcdfb2c0e1cd63a5277924..e1d56dfcfecd33c3feeeb745b33d1f7b612657d2 100644 (file)
--- a/wscript
+++ b/wscript
@@ -412,7 +412,9 @@ def build (bld):
         bld.add_subdirs ('docs/api')
         bld.install_files ('${DOCDIR}/api/', blddir + '/docs/api/*')
 
-    if not is_mingw (bld.env) and Options.platform != 'win32':
+    for desktop in [APPNAME + '.desktop', APPNAME + '-private.desktop']:
+        if is_mingw (bld.env) or Options.platform == 'win32':
+            break
         if bld.env['HAVE_HILDON']:
             appdir = '${MDATADIR}/applications/hildon'
             bld.install_files ('${MDATADIR}/dbus-1/services',
@@ -421,14 +423,13 @@ def build (bld):
             appdir = '${MDATADIR}/applications'
         if bld.env['INTLTOOL']:
             obj = bld.new_task_gen ('intltool_in')
-            obj.source = 'data/' + APPNAME + '.desktop.in'
+            obj.source = 'data/' + desktop + '.in'
             obj.install_path = appdir
             obj.flags  = ['-d', '-c']
-            bld.install_files (appdir, 'data/' + APPNAME + '.desktop')
+            bld.install_files (appdir, 'data/' + desktop)
         else:
             folder = os.path.abspath (blddir + '/default/data')
             Utils.check_dir (folder)
-            desktop = APPNAME + '.desktop'
             pre = open ('data/' + desktop + '.in')
             after = open (folder + '/' + desktop, 'w')
             try: