예제 #1
0
 def load_registry(self):
     self.registry = registry.Registry(os.path.expanduser('~/.pida/pida.conf'))
     self.optparser = optparse.OptionParser()
     options.configure(self.registry)
     self.registry.prime_optparser(self.optparser)
     self.optparser.parse_args(sys.argv)
     self.registry.load()
예제 #2
0
 def load_registry(self):
     self.registry = registry.Registry(
         os.path.expanduser('~/.pida/pida.conf'))
     self.optparser = optparse.OptionParser()
     options.configure(self.registry)
     self.registry.prime_optparser(self.optparser)
     self.optparser.parse_args(sys.argv)
     self.registry.load()
예제 #3
0
    def startup(self):
        self.optparser = optparse.OptionParser()
        self.registry = registry.Registry(os.path.expanduser('~/.pida/pida.conf'))
       
        options.configure(self.registry)
        # now the plugins
        shell_plug = self.add_plugin('terminal')
        server_plug = self.add_plugin('vim')
        buffer_plug = self.add_plugin('buffer')
        
      
        opt_plugs = []
        for plugname in PLUGINS:
            plugin = self.add_plugin(plugname)
            if plugin and plugin.VISIBLE:
                opt_plugs.append(plugin)
        
        self.shortcuts = self.add_plugin('shortcuts')

        self.evt('init')
       
       
        self.registry.prime_optparser(self.optparser)
        self.optparser.parse_args()
        self.registry.load()
        self.registry.save()
      

        logging.getLogger().setLevel(self.registry.log.level.value())

        self.shortcuts.load()
      
        self.icons = gtkextra.Icons(self)
        # Tooltips shared
        self.tips = gtk.Tooltips()
        self.tips.enable()
        self.cw = MainWindow(self)
        self.evt('populate')
        self.cw.set_plugins(server_plug, buffer_plug, shell_plug, opt_plugs)
        self.cw.show_all()
        self.evt('shown')
        self.evt('started')
        self.evt('reset')
예제 #4
0
    def startup(self):
        sys.excepthook = debugwindow.show
        debugwindow.DebugWindow.application = self
        self.registry = registry.Registry(os.path.expanduser('~/.pida/pida.conf'))
        self.optparser = optparse.OptionParser()

       
        options.configure(self.registry)


        self.registry.prime_optparser(self.optparser)
        self.optparser.parse_args()
        self.registry.load()
        # now the base plugins

        self.do_first_time()

        self.boss = create_plugin('boss', self)
        self.boss.configure(self.registry)
        shell_plug = self.add_plugin('terminal')
        buffer_plug = self.add_plugin('buffer')


        opt_plugs = []
        for plugname in OPTPLUGINS:
            plugin = self.add_plugin(plugname)
            if plugin and plugin.VISIBLE:
                opt_plugs.append(plugin)
        
        # The editor 
        # editorname = 'vim'
        editorname = self.registry.components.editor.value()
        if not editorname in ['vim', 'culebra']:
            editorname = 'culebra'
        # using the registry can't ever work
        #if self.registry.general.emacsmode.value():
        self.set_editor(editorname)
       
        #self.evt('init')
       
        self.registry.load()
        self.registry.save()
      

        for pluginname in self.OPTPLUGINS:
            if not self.opts.get('plugins', pluginname):
                # slow but only once
                for plugin in self.plugins:
                    if plugin and plugin.NAME == pluginname:
                        self.plugins.remove(plugin)
                        opt_plugs.remove(plugin)

        self.mainwindow = mainwindow.MainWindow()

        self.evt('populate')
        self.mainwindow.set_plugins(self.editor, buffer_plug, shell_plug, opt_plugs)
        self.mainwindow.show_all()

        self.evt('shown')
        self.evt('started')
        self.evt('reset')