Ejemplo n.º 1
0
	def addFolderExplorer(self, station):
		explorer = IconoTreeFile(station[1], sopranoGlobals.FILE_FORMATS)
		audioFolderlist = settings.IconoPrefs(sopranoGlobals.EXPLORER_DATA)
		audioFolderlist.add_radio(station)
		self.setup_explorer_page(self.notebook, explorer.get_sw(), self.hCombo, [len(audioFolderlist.get_radioStations()), 0, station[0], sopranoGlobals.FOLDERPB], self.notebook.get_n_pages()-2)
		#Update the audioCD and Radio Indexes
		model = self.hCombo.get_model()
		length = len(model)
		for i in range(1,3):
			iter = model.get_iter(length-i)
			model.set_value(iter, 0, length-(1+i))
Ejemplo n.º 2
0
	def setup_explorer(self, widget=None):
		self.hCombo.add_entry(None, 1, "<b>Folders</b>", None, -1)

		explorer = IconoTreeFile('/', sopranoGlobals.FILE_FORMATS)
		self.setup_explorer_page(self.notebook, explorer.get_sw(), self.hCombo, [self.notebook.get_n_pages(), 0, "Root", sopranoGlobals.FOLDERPB])

		audioFolderlist = settings.IconoPrefs(sopranoGlobals.EXPLORER_DATA)
		for key, value in audioFolderlist.get_radioStations().items():
			explorer = IconoTreeFile(value, sopranoGlobals.FILE_FORMATS)	
			self.setup_explorer_page(self.notebook, explorer.get_sw(), self.hCombo, [self.notebook.get_n_pages(), 0, key, sopranoGlobals.FOLDERPB])
		#aCdTree = IconoAudioCD()
		#self.setup_explorer_page(self.notebook, aCdTree.get_sw(), self.hCombo, [self.notebook.get_n_pages(), 0, "<b>Audio CD</b>", sopranoGlobals.TRACKPB])		
		self.setup_explorer_page(self.notebook, self.aRadio.get_sw(), self.hCombo, [self.notebook.get_n_pages(), 0, "<b>Radio</b>", sopranoGlobals.RADIOPB])

		self.medialib = IconoMediaLibrary(self.SopranoDB)
		self.setup_explorer_page(self.notebook, self.medialib.get_sw(), self.hCombo, [self.notebook.get_n_pages(), 0, "<b>Library</b>", sopranoGlobals.USERSPB])

		self.notebook.set_current_page(self.defaultexplorer)
		self.hCombo.set_active(self.defaultexplorer)
Ejemplo n.º 3
0
    def setup_explorer(self, widget=None):
        self.hCombo.add_entry(None, 1, "<b>Folders</b>", None, -1)

        explorer = IconoTreeFile('/', sopranoGlobals.FILE_FORMATS)
        self.setup_explorer_page(
            self.notebook, explorer.get_sw(), self.hCombo,
            [self.notebook.get_n_pages(), 0, "Root", sopranoGlobals.FOLDERPB])

        audioFolderlist = settings.IconoPrefs(sopranoGlobals.EXPLORER_DATA)
        for key, value in audioFolderlist.get_radioStations().items():
            explorer = IconoTreeFile(value, sopranoGlobals.FILE_FORMATS)
            self.setup_explorer_page(
                self.notebook, explorer.get_sw(), self.hCombo,
                [self.notebook.get_n_pages(), 0, key, sopranoGlobals.FOLDERPB])
        #aCdTree = IconoAudioCD()
        #self.setup_explorer_page(self.notebook, aCdTree.get_sw(), self.hCombo, [self.notebook.get_n_pages(), 0, "<b>Audio CD</b>", sopranoGlobals.TRACKPB])
        self.setup_explorer_page(self.notebook, self.aRadio.get_sw(),
                                 self.hCombo, [
                                     self.notebook.get_n_pages(), 0,
                                     "<b>Radio</b>", sopranoGlobals.RADIOPB
                                 ])

        self.medialib = IconoMediaLibrary(self.SopranoDB)
        self.setup_explorer_page(self.notebook, self.medialib.get_sw(),
                                 self.hCombo, [
                                     self.notebook.get_n_pages(), 0,
                                     "<b>Library</b>", sopranoGlobals.USERSPB
                                 ])

        self.notebook.set_current_page(self.defaultexplorer)
        self.hCombo.set_active(self.defaultexplorer)