~fenryxo/zim/anchors

« back to all changes in this revision

Viewing changes to zim/__init__.py

  • Committer: Jaap Karssenberg
  • Date: 2011-05-15 21:15:09 UTC
  • Revision ID: jaap.karssenberg@gmail.com-20110515211509-phqevxtrly5x19ka
* Fixed indexing error for syncing scenario - test case by Stefan Muthers
* Increased test coverage for Gtk interface and main window

Show diffs side-by-side

added added

removed removed

Lines of Context:
411
411
                '''Remove a plugin'''
412
412
                if isinstance(plugin, basestring):
413
413
                        name = plugin
414
 
                        assert name in map(lambda p: p.plugin_key, self.plugins)
 
414
                        assert name in [p.plugin_key for p in self.plugins]
415
415
                        plugin = filter(lambda p: p.plugin_key == name, self.plugins)[0]
416
416
                else:
417
417
                        assert plugin in self.plugins
468
468
                        from zim.config import ConfigDictFile
469
469
                        self.uistate = ConfigDictFile(
470
470
                                notebook.cache_dir.file('state.conf') )
471
 
                # TODO read profile preferences file if one is set in the notebook
 
471
                else:
 
472
                        from zim.config import ConfigDict
 
473
                        self.uistate = ConfigDict()
472
474
 
473
475
        def cmd_export(self, format='html', template=None, page=None, output=None, root_url=None, index_page=None):
474
476
                '''Method called when doing a commandline export'''
506
508
 
507
509
        def spawn(self, *args):
508
510
                '''Spawn a new instance of zim'''
509
 
                # TODO: after implementing the daemon, put this in that module
510
511
                from zim.applications import Application
511
512
                zim = Application((ZIM_EXECUTABLE,) + args)
512
513
                zim.spawn()
513
514
 
514
515
# Need to register classes defining gobject signals
515
516
gobject.type_register(NotebookInterface)
516
 
 
517