Beispiel #1
0
 def __init__(self, plugin, pageview):
     PageViewExtension.__init__(self, plugin, pageview)
     self._widget = None
     self.currently_with_due = plugin.preferences['with_due']
     self.on_preferences_changed(plugin.preferences)
     self.connectto(plugin.preferences, 'changed',
                    self.on_preferences_changed)
Beispiel #2
0
    def __init__(self, plugin, pageview):
        PageViewExtension.__init__(self, plugin, pageview)

        self.notebook = pageview.notebook
        hpm = self.plugin.preferences['hours_past_midnight']
        self.hour_delta = datetime.timedelta(hours=hpm)
        # JournalPageViewExtension: go_page_today journal.plugin.path_from_date
        self.journal = find_extension(self.pageview, JournalPageViewExtension)
Beispiel #3
0
    def __init__(self, plugin, window):
        PageViewExtension.__init__(self, plugin, window)

        self.widget = BackLinksWidget(self.navigation)

        if self.pageview.page is not None:
            self.on_page_changed(self.pageview, self.pageview.page)
        self.connectto(self.pageview, 'page-changed')

        self.add_sidepane_widget(self.widget, 'pane')
Beispiel #4
0
	def __init__(self, plugin, pageview):
		PageViewExtension.__init__(self, plugin, pageview)

		self.notebook = pageview.notebook
		self.calendar_widget = CalendarWidget(plugin, self.notebook, self.navigation)
		self.connectto(pageview, 'page-changed', lambda o, p: self.calendar_widget.set_page(p))

		properties = self.plugin.notebook_properties(self.notebook)
		self.connectto(properties, 'changed', self.on_properties_changed)
		self.on_properties_changed(properties)
Beispiel #5
0
    def __init__(self, plugin, pageview):
        PageViewExtension.__init__(self, plugin, pageview)

        properties = self.plugin.notebook_properties(self.pageview.notebook)
        self._language = properties['language']
        self.connectto(properties, 'changed', self.on_properties_changed)

        self._adapter_cls = self._choose_adapter_cls()
        self.uistate.setdefault('active', False)
        self.toggle_spellcheck(self.uistate['active'])
        self.connectto(self.pageview, 'page-changed', order=SIGNAL_AFTER)
Beispiel #6
0
    def __init__(self, plugin, window):
        PageViewExtension.__init__(self, plugin, window)
        self.preferences = plugin.preferences
        self._monitor = None

        # Init browser widget
        self.widget = AttachmentBrowserPluginWidget(self, self.navigation,
                                                    self.preferences)

        self.on_page_changed(self.pageview, self.pageview.page)
        self.connectto(self.pageview, 'page-changed')

        self.add_sidepane_widget(self.widget, 'pane')
Beispiel #7
0
    def __init__(self, plugin, window):
        PageViewExtension.__init__(self, plugin, window)
        self.window = window
        self.preferences = plugin.preferences
        self._monitor = None

        # Init terminal widget
        self.widget = TerminalPluginWidget(plugin, window, self.uistate)

        if self.pageview.page is not None:
            self.on_page_changed(self.pageview, self.pageview.page)
        self.connectto(self.pageview, 'page-changed')

        self.add_sidepane_widget(self.widget, 'pane')
Beispiel #8
0
    def __init__(self, plugin, pageview):
        PageViewExtension.__init__(self, plugin, pageview)
        index = pageview.notebook.index
        model = PageTreeStore(index)
        self.treeview = PageTreeView(pageview.notebook, self.navigation)
        self.treeview.set_model(model)
        self.widget = PageIndexWidget(self.treeview)

        # Connect to ui signals
        #window.connect('start-index-update', lambda o: self.disconnect_model())
        #window.connect('end-index-update', lambda o: self.reload_model())

        self.on_page_changed(pageview, pageview.page)
        self.connectto(pageview, 'page-changed')

        self.add_sidepane_widget(self.widget, 'pane')
Beispiel #9
0
    def __init__(self, plugin, pageview):
        PageViewExtension.__init__(self, plugin, pageview)

        self.widget = TagsPluginWidget(pageview.notebook, plugin.config,
                                       self.navigation, self.uistate)

        self.add_sidepane_widget(self.widget, 'pane')

        self.uistate.setdefault('vpane_pos', 150)
        self.widget.set_position(self.uistate['vpane_pos'])

        def update_uistate(*a):
            self.uistate['vpane_pos'] = self.widget.get_position()

        self.widget.connect('notify::position', update_uistate)

        #self.connectto_all(ui, ( # XXX
        #	('start-index-update', lambda o: self.disconnect_model()),
        #	('end-index-update', lambda o: self.reconnect_model()),
        #))
        self.connectto(pageview, 'page-changed',
                       lambda o, p: self.widget.set_page(p))
Beispiel #10
0
    def __init__(self, plugin, view):
        PageViewExtension.__init__(self, plugin, view)
        EditActionMixin.__init__(self, view)
        self.toolbar = None
        self._customtoolmanager = CustomToolManager()
        self.setup()
        self.update()

        def on_change(o, *a):
            self.update()

        self.connectto(plugin.preferences, 'changed', on_change)
        self.connectto(self._customtoolmanager, 'changed', on_change)

        def on_extensions_changed(o, obj):
            if obj in (view, view.get_toplevel()):
                self.update()

        self.connectto(PluginManager, 'extensions-changed',
                       on_extensions_changed)

        self.on_readonly_changed(self.pageview, self.pageview.readonly)
        self.connectto(self.pageview, 'readonly-changed')
Beispiel #11
0
 def __init__(self, plugin, pageview):
     PageViewExtension.__init__(self, plugin, pageview)
     self.connectto(pageview.textview, 'end-of-word', self.on_end_of_word)
Beispiel #12
0
 def __init__(self, plugin, pageview):
     PageViewExtension.__init__(self, plugin, pageview)
     self.connectto(pageview.textview, 'end-of-word')
     if not plugin.symbols:
         plugin.load_file()
 def __init__(self, plugin, pageview):
     PageViewExtension.__init__(self, plugin, pageview)
     self.tocwidget = None
     self.on_preferences_changed(plugin.preferences)
     self.connectto(plugin.preferences, 'changed',
                    self.on_preferences_changed)
 def __init__(self, plugin, pageview):
     PageViewExtension.__init__(self, plugin, pageview)
     self.plugin = plugin
Beispiel #15
0
 def __init__(self, plugin, pageview):
     """Window constructor."""
     PageViewExtension.__init__(self, plugin, pageview)
     self.preferences = plugin.preferences
	def __init__(self, plugin, pageview):
		PageViewExtension.__init__(self, plugin, pageview)
		self.pageview.register_image_generator_plugin(self, self.object_type)