Exemplo n.º 1
0
    def _show_quickview(self, *args):
        '''
        This is called only from the QV button toggle
        '''
        if self.current_instance:
            if not self.current_instance.is_closed:
                self.current_instance._reject()
            self.current_instance = None
        if self.gui.current_view() is not self.gui.library_view:
            error_dialog(
                self.gui, _('No quickview available'),
                _('Quickview is not available for books '
                  'on the device.')).exec_()
            return
        self.qv_button.set_state_to_hide()
        index = self.gui.library_view.currentIndex()
        self.current_instance = Quickview(self.gui, index,
                                          self.qaction.shortcut())

        self.current_instance.reopen_after_dock_change.connect(
            self.open_quickview)
        self.set_search_shortcut_tooltip()
        self.current_instance.show()
        self.current_instance.quickview_closed.connect(
            self.qv_button.set_state_to_show)
Exemplo n.º 2
0
 def show_quickview(self, *args):
     if self.current_instance:
         if not self.current_instance.is_closed:
             return
         self.current_instance = None
     if self.gui.current_view() is not self.gui.library_view:
         error_dialog(self.gui, _('No quickview available'),
             _('Quickview is not available for books '
               'on the device.')).exec_()
         return
     index = self.gui.library_view.currentIndex()
     if index.isValid():
         self.current_instance = \
             Quickview(self.gui, self.gui.library_view, index)
         self.current_instance.show()
Exemplo n.º 3
0
 def show_quickview(self, *args):
     if self.current_instance:
         if not self.current_instance.is_closed:
             self.current_instance.reject()
             self.current_instance = None
             return
         self.current_instance = None
     if self.gui.current_view() is not self.gui.library_view:
         error_dialog(
             self.gui, _('No quickview available'),
             _('Quickview is not available for books '
               'on the device.')).exec_()
         return
     index = self.gui.library_view.currentIndex()
     if index.isValid():
         self.current_instance = Quickview(self.gui, index)
         self.current_instance.reopen_quickview.connect(
             self.reopen_quickview)
         self.set_search_shortcut()
         self.current_instance.show()