Ejemplo n.º 1
0
 def load_music_tree(self):
     self.perspective.hide_add_button()
     if not FCache().cache_music_tree_beans[0] and len(FCache().cache_music_tree_beans) == 1:
         
         self.perspective.show_add_button()
         
         self.tree.is_empty = True
         
         if FCache().tab_names[0]:
             self.tabhelper.label.set_label(FCache().tab_names[0] + " ")
     else:
         tabs = len(FCache().cache_music_tree_beans)
         self.tree.simple_append_all(FCache().cache_music_tree_beans[tabs - 1])
         self.tabhelper.label.set_label(FCache().tab_names[tabs - 1] + " ")
         for tab in xrange(tabs - 2, -1, -1):
             
             tree = NavigationTreeControl(self)
             tree.simple_append_all(FCache().cache_music_tree_beans[tab])
             self.tabhelper._append_tab(FCache().tab_names[tab], navig_tree=tree)
             if not FCache().cache_music_tree_beans[tab]: 
                 tree.is_empty = True
                 self.perspective.show_add_button()
         
         logging.info("Tree loaded from cache")
     
     if FC().update_tree_on_start:
         def cycle():
             for n in xrange(len(FCache().music_paths)):
                 tab_child = self.tabhelper.get_nth_page(n)
                 tree = tab_child.get_child()
                 self.update_music_tree(tree, n)
         gobject.idle_add(cycle)
Ejemplo n.º 2
0
 def load_music_tree(self):
     self.perspective.hide_add_button()
     if not FC().cache_music_tree_beans[0] and len(FC().cache_music_tree_beans) == 1:
         
         self.perspective.show_add_button()
         
         self.tree.is_empty = True
         
         if FC().tab_names[0]:
             self.tabhelper.label.set_label(FC().tab_names[0] + " ")
     else:
         tabs = len(FC().cache_music_tree_beans)
         self.tree.simple_append_all(FC().cache_music_tree_beans[tabs - 1])
         self.tabhelper.label.set_label(FC().tab_names[tabs - 1] + " ")
         for tab in xrange(tabs - 2, -1, -1):
             
             tree = NavigationTreeControl(self)
             tree.simple_append_all(FC().cache_music_tree_beans[tab])
             self.tabhelper.append_tab(FC().tab_names[tab], navig_tree=tree)
             
             if not FC().cache_music_tree_beans[tab]: 
                 tree.is_empty = True
                 self.perspective.show_add_button()
         
         logging.info("Tree loaded from cache")
Ejemplo n.º 3
0
 def load_music_tree(self):
     self.perspective.hide_add_button()
     if not FCache().cache_music_tree_beans[0] and len(FCache().cache_music_tree_beans) == 1:
         
         self.perspective.show_add_button()
         
         self.tree.is_empty = True
         
         if FCache().tab_names[0]:
             self.tabhelper.label.set_label(FCache().tab_names[0] + " ")
     else:
         tabs = len(FCache().cache_music_tree_beans)
         self.tree.simple_append_all(FCache().cache_music_tree_beans[tabs - 1])
         self.tabhelper.label.set_label(FCache().tab_names[tabs - 1] + " ")
         for tab in xrange(tabs - 2, -1, -1):
             
             tree = NavigationTreeControl(self)
             tree.simple_append_all(FCache().cache_music_tree_beans[tab])
             self.tabhelper._append_tab(FCache().tab_names[tab], navig_tree=tree)
             if not FCache().cache_music_tree_beans[tab]: 
                 tree.is_empty = True
                 self.perspective.show_add_button()
         
         logging.info("Tree loaded from cache")
     
     if FC().update_tree_on_start:
         def cycle():
             for n in xrange(len(FCache().music_paths)):
                 tab_child = self.tabhelper.get_nth_page(n)
                 tree = tab_child.get_child()
                 self.update_music_tree(tree, n)
         gobject.idle_add(cycle)
Ejemplo n.º 4
0
    def __init__(self, with_dbus=False):
        BaseFoobnixControls.__init__(self)
        self.layout = None

        self.statusbar = StatusbarControls(self)

        self.lastfm_service = LastFmService(self)

        self.media_engine = GStreamerEngine(self)
        """elements"""
        self.tree = NavigationTreeControl(self)
        self.tabhelper = TabHelperControl(self)

        self.volume = VolumeControls(self)

        self.record = RadioRecord(self)
        self.seek_bar_movie = SeekProgressBarControls(self)
        self.seek_bar = SeekProgressBarControls(self, self.seek_bar_movie)

        self.search_progress = SearchProgressBar()
        self.in_thread = SingleThread(self.search_progress)

        self.info_panel = InfoPanelWidget(self)

        self.movie_window = MovieDrawingArea(self)

        self.searchPanel = SearchControls(self)
        self.os = OrderShuffleControls(self)
        self.playback = PlaybackControls(self)

        self.trayicon = TrayIconControls(self)

        self.main_window = MainWindow(self)
        self.coverlyrics = CoverLyricsPanel(self)
        self.notetabs = NoteTabControl(self)

        self.filter = FilterControl(self)

        self.radio = RadioTreeControl(self)
        self.virtual = VirtualTreeControl(self)
        self.lastfm_integration = LastFmIntegrationControls(self)
        self.vk_integration = VKIntegrationControls(self)

        self.perspective = PerspectiveControls(self)
        """preferences"""
        self.preferences = PreferencesWindow(self)

        self.eq = EqController(self)
        self.dm = DM(self)
        """layout panels"""
        self.top_panel = TopWidgets(self)
        """layout"""
        self.layout = BaseFoobnixLayout(self)

        if with_dbus:
            from foobnix.regui.controls.dbus_manager import DBusManager
            self.dbus = DBusManager(self)
            try:
                import keybinder  #@UnresolvedImport @UnusedImport
                from foobnix.preferences.configs.hotkey_conf import load_foobnix_hotkeys
                load_foobnix_hotkeys()
            except:
                pass