Add "Terminal=true" in desktop files if the feed says <needs-terminal>.master
authorThomas Leonard <[email protected]>
Sun, 30 Mar 2008 12:45:18 +0000 (30 13:45 +0100)
committerThomas Leonard <[email protected]>
Sun, 30 Mar 2008 12:45:18 +0000 (30 13:45 +0100)
Suggested by AKFoerster.

zero2desktop

index 502e101..51c680f 100755 (executable)
@@ -164,6 +164,8 @@ class MainWindow:
                                icon_path = iface_cache.get_icon_path(iface)
                                if icon_path:
                                        desktop.write(icon_template % icon_path)
+                               if len(iface.get_metadata(XMLNS_IFACE, 'needs-terminal')):
+                                       desktop.write('Terminal=true\n')
                                desktop.close()
                                status = os.spawnlp(os.P_WAIT, 'xdg-desktop-menu', 'xdg-desktop-menu', 'install', desktop_name)
                        finally: