~computer-janitor-hackers/systemcleaner/intrepid-sru-1

« back to all changes in this revision

Viewing changes to systemcleaner/app.py

  • Committer: Michael Vogt
  • Date: 2008-07-16 13:26:26 UTC
  • Revision ID: michael.vogt@ubuntu.com-20080716132626-8oez1kwyfvzgjs2t
commit basic gtk demo interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import logging
19
19
import optparse
20
20
import os
 
21
import sys
21
22
 
22
23
import systemcleaner
23
24
 
46
47
        
47
48
        options, args = self.parse_options()
48
49
 
49
 
        pluginpath = os.environ.get("SYSTEM_CLEANER_PLUGINS", "testplugins")
 
50
        pluginpath = os.environ.get("SYSTEM_CLEANER_PLUGINS", "plugins")
50
51
        plugindirs = pluginpath.split(":")
51
52
        pm = plugin_manager_class(plugindirs)
52
53
 
53
 
        ui = systemcleaner.CommandLineUserInterface(self, pm)
 
54
        # FIXME: is this the way?
 
55
        if "system-cleaner-gtk" in sys.argv[0]:
 
56
            ui = systemcleaner.GtkUserInterface(self, pm)
 
57
        else:
 
58
            ui = systemcleaner.CommandLineUserInterface(self, pm)
54
59
        ui.run(options, args)
55
60
 
56
61
    def parse_options(self):