def save_uistate(self):
        if not self.isfullscreen:
            self.uistate['windowpos'] = tuple(self.get_position())
            self.uistate['windowsize'] = tuple(self.get_size())
            self.uistate['windowmaximized'] = self.maximized

        Window.save_uistate(self)  # takes care of sidepane positions etc.
Beispiel #2
0
 def save_uistate(self):
     if not self.pageview._zim_extendable_registered:
         return
         # Not allowed to save before plugins are loaded, could overwrite
         # pane state based on empty panes
     self.uistate['windowsize'] = tuple(self.get_size())
     Window.save_uistate(self)  # takes care of sidepane positions etc.
    def save_uistate(self):
        if self.is_visible() and not self.isfullscreen:
            self.uistate['windowpos'] = tuple(self.get_position())
            self.uistate['windowsize'] = tuple(self.get_size())
            self.uistate['windowmaximized'] = self.maximized

        Window.save_uistate(self)  # takes care of sidepane positions etc.

        if self.notebook.state.modified:
            self.notebook.state.write()
Beispiel #4
0
    def save_uistate(self):
        if not self.pageview._zim_extendable_registered:
            return
            # Not allowed to save before plugins are loaded, could overwrite
            # pane state based on empty panes

        if self.is_visible() and not self.isfullscreen:
            self.uistate['windowpos'] = tuple(self.get_position())
            self.uistate['windowsize'] = tuple(self.get_size())
            self.uistate['windowmaximized'] = self.maximized

        Window.save_uistate(self)  # takes care of sidepane positions etc.

        if self.notebook.state.modified:
            self.notebook.state.write()
    def toggle_panes(self, show):
        '''Menu action to toggle the visibility of the all panes
		@param show: when C{True} or C{False} force the visibility,
		when C{None} toggle based on current state
		'''
        self._block_toggle_panes = True
        Window.toggle_panes(self, show)
        self._block_toggle_panes = False

        if show:
            self.focus_sidepane()
        else:
            self.pageview.grab_focus()

        self._sidepane_autoclose = False
        Window.save_uistate(self)