~bryce/gtg/dbus-service-name

« back to all changes in this revision

Viewing changes to GTG/gtk/manager.py

  • Committer: Luca Invernizzi
  • Date: 2010-06-22 20:19:47 UTC
  • mto: This revision was merged to the branch mainline in revision 825.
  • Revision ID: invernizzi.l@gmail.com-20100622201947-mixmodtcf6qvowqi
second batch

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
from GTG.core.plugins.engine import PluginEngine
40
40
from GTG.core.plugins.api    import PluginAPI
41
41
from GTG.tools.logger        import Log
 
42
from GTG.gtk.backends_dialog import BackendsDialog
 
43
 
 
44
 
42
45
 
43
46
class Manager:
 
47
    
 
48
 
44
49
    ############## init #####################################################
45
50
    def __init__(self, req, config):
46
51
        self.config_obj = config
72
77
        #Deletion UI
73
78
        self.delete_dialog = None
74
79
        
75
 
        #Preferences windows
76
 
        # Initialize "Preferences" dialog
77
 
        self.preferences = None
 
80
        #Preferences and Backends windows
 
81
        # Initialize  dialogs
 
82
        self.preferences_dialog = None
78
83
        
79
84
        #DBus
80
85
        DBusTaskWrapper(self.req, self)
89
94
        # initializes the plugin api class
90
95
        self.plugin_api = PluginAPI(window         = self.browser.window,
91
96
                                    config         = self.config,
92
 
                                    data_dir       = GTG.DATA_DIR,
 
97
                                    data_dir = self.config_obj.get_data_dir(),
93
98
                                    builder        = self.browser.builder,
94
99
                                    requester      = self.req,
95
100
                                    tagpopup       = self.browser.tagpopup,
189
194
            
190
195
################ Others dialog ############################################
191
196
 
192
 
    def show_preferences(self, config_priv, sender=None):
193
 
        if not self.preferences:
 
197
    def open_preferences(self, config_priv, sender=None):
 
198
        if not hasattr(self, "preferences"):
194
199
            self.preferences = PreferencesDialog(self.pengine, self.p_apis, \
195
200
                    self.config_obj)
196
201
        self.preferences.activate(config_priv)