コード例 #1
0
ファイル: widgets_info.py プロジェクト: Abogical/lollypop
 def __on_search_activated(self, action, variant, artist):
     """
         Switch to page
         @param action as SimpleAction
         @param variant as GVariant
         @param artist as str
     """
     InfoCache.remove(artist, 'wikipedia')
     InfoContent.clear(self)
     self.set_visible_child_name('spinner')
     self._spinner.start()
     t = Thread(target=self.__load_page_content, args=(artist,))
     t.daemon = True
     t.start()
コード例 #2
0
ファイル: widgets_info.py プロジェクト: TainakaDrums/lollypop
 def __on_search_activated(self, action, variant, artist):
     """
         Switch to page
         @param action as SimpleAction
         @param variant as GVariant
         @param artist as str
     """
     InfoCache.remove(artist, 'wikipedia')
     InfoContent.clear(self)
     self.set_visible_child_name('spinner')
     self._spinner.start()
     t = Thread(target=self.__load_page_content, args=(artist,))
     t.daemon = True
     t.start()
コード例 #3
0
ファイル: pop_info.py プロジェクト: blackjackshellac/lollypop
 def _on_button_release(self, widget, event):
     """
         Reload current view if autoload unchanged
         @param widget as Gtk.Widget
         @param event as Gdk.Event
     """
     if self.__timeout_id is not None:
         GLib.source_remove(self.__timeout_id)
         self.__timeout_id = None
         visible_name = self.__stack.get_visible_child_name()
         # Clear cache if needed
         if visible_name in ['lastfm', 'wikipedia']:
             for artist in self.__current_track.artists:
                 InfoCache.remove(artist, visible_name)
             # stack -> scrolled -> viewport -> grid
             self._on_child_unmap(
                   self.__stack.get_visible_child().get_child().get_child())
         self.__on_current_changed(Lp().player)
コード例 #4
0
 def _on_button_release(self, widget, event):
     """
         Reload current view if autoload unchanged
         @param widget as Gtk.Widget
         @param event as Gdk.Event
     """
     if self.__timeout_id is not None:
         GLib.source_remove(self.__timeout_id)
         self.__timeout_id = None
         visible_name = self.__stack.get_visible_child_name()
         # Clear cache if needed
         if visible_name in ['lastfm', 'wikipedia']:
             for artist in self.__current_track.artists:
                 InfoCache.remove(artist, visible_name)
             # stack -> scrolled -> viewport -> grid
             self._on_child_unmap(
                 self.__stack.get_visible_child().get_child().get_child())
         self.__on_current_changed(Lp().player)