Commits

Arne Babenhauserheide  committed 2cc6d76

Added daemon mode to start without showing.

  • Participants
  • Parent commits f5f6a76

Comments (0)

Files changed (1)

 - Right-click an item to edit it. Middle-click an item to add a new one after it (clockwise).
 - Make folders by using the action [("kreversi", None), ("icon", "action"), ("icon2", "action2"), ...].
   Actions are simply the commands you'd use on the commandline.
-- call "pyrad.py --quit" to shutdown the process in the background. "pyrad.py --help" shows the usage. 
+- call "pyrad.py --quit" to shutdown the process in the background. "pyrad.py --help" shows the usage. "pyrad.py --daemon" starts pyRad without showing the GUI.
 
 """
 
             self.rad.close()
             self.quit()
             return 0
+        elif args.isSet("daemon"): 
+            ret = super(KUniqueCaller, self).newInstance()
+            return ret
         self.rad.setup()
         self.rad.show()
         self.rad.toForeground() # this cost about 0.07s
     # Add an option to quit the app
     opts = KCmdLineOptions()
     opts.add("quit", ki18n("Shutdown the background program"))
+    opts.add("daemon", ki18n("Start the background program without showing the GUI "))
     KCmdLineArgs.addCmdLineOptions(opts)
     # Then do basic initializing
     app = KUniqueCaller()