Example #1
0
 def searchfilter_toggle(self, _widget, initial_text=""):
     if self.filterbox_visible:
         ui.hide(self.filterbox)
         self.filterbox_visible = False
         self.edit_style_orig = self.libsearchfilter_get_style()
         self.filterpattern.set_text("")
         self.searchfilter_stop_loop()
     elif self.connected():
         self.playlist_pos_before_filter = \
                 self.current.get_visible_rect().height
         self.filterbox_visible = True
         self.filterpattern.handler_block(self.filter_changed_handler)
         self.filterpattern.set_text(initial_text)
         self.filterpattern.handler_unblock(self.filter_changed_handler)
         self.prevtodo = 'foo'
         ui.show(self.filterbox)
         # extra thread for background search work, synchronized
         # with a condition and its internal mutex
         self.filterbox_cond = threading.Condition()
         self.filterbox_cmd_buf = initial_text
         qsearch_thread = threading.Thread(target=self.searchfilter_loop)
         qsearch_thread.daemon = True
         qsearch_thread.start()
         GLib.idle_add(self.filter_entry_grab_focus, self.filterpattern)
     self.current.set_headers_clickable(not self.filterbox_visible)
Example #2
0
    def _widgets_initialize(self):
        self._widgets_song()
        self._widgets_lyrics()
        self._widgets_album()

        # Finish..
        if not self.config.show_lyrics:
            ui.hide(self.info_lyrics)
        if not self.config.show_covers:
            ui.hide(self._imagebox)
Example #3
0
    def _widgets_initialize(self):
        self._widgets_song()
        self._widgets_lyrics()
        self._widgets_album()

        # Finish..
        if not self.config.show_lyrics:
            ui.hide(self.info_lyrics)
        if not self.config.show_covers:
            ui.hide(self._imagebox)
Example #4
0
 def searchfilter_toggle(self, _widget, initial_text=""):
     if self.filterbox_visible:
         ui.hide(self.filterbox)
         self.filterbox_visible = False
         self.filterpattern.set_text("")
         self.view.set_model(self.store)
     elif self.connected():
         self.playlist_pos_before_filter = \
                 self.view.get_visible_rect().height
         self.filterbox_visible = True
         with self.filterpattern.handler_block(self.filter_changed_handler):
             self.filterpattern.set_text(initial_text)
         ui.show(self.filterbox)
         self.filterpattern.grab_focus()
     self.view.set_headers_clickable(not self.filterbox_visible)
Example #5
0
 def searchfilter_toggle(self, _widget, initial_text=""):
     if self.filterbox_visible:
         ui.hide(self.filterbox)
         self.filterbox_visible = False
         self.filterpattern.set_text("")
         self.view.set_model(self.store)
     elif self.connected():
         self.playlist_pos_before_filter = \
                 self.view.get_visible_rect().height
         self.filterbox_visible = True
         with self.filterpattern.handler_block(self.filter_changed_handler):
             self.filterpattern.set_text(initial_text)
         ui.show(self.filterbox)
         self.filterpattern.grab_focus()
     self.view.set_headers_clickable(not self.filterbox_visible)