Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Check-in [97a832d8f2]

Overview
Comment:Slim down first_show() in main.channel_switch().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 97a832d8f2693137885ac8667217ab401fbf2f94
User & Date: mario on 2015-04-11 14:10:56
Other Links: manifest | tags
Context
2015-04-11
14:12
Shorten first_show(). Plugins don't initialize on startup anymore, but again on first channel tab selection. Use first entry from categories as current, if none is set. Remove some obsolete code. Display now matches on fresh installations as well as with existing cache/state. check-in: e663445700 user: mario tags: trunk
14:10
Slim down first_show() in main.channel_switch(). check-in: 97a832d8f2 user: mario tags: trunk
14:06
Fix case-sensitive PLS construction and File\d+ index starting from 1. Adapt format detection regexps as well for html, and xspf xmlns. check-in: 3301815009 user: mario tags: trunk
Changes

Modified st2.py from [cd5179ec1f] to [90b6a5f946].

230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
    
        
    # Notebook tab has been clicked (receives numeric page_num), but *NOT* yet changed (visually).
    def channel_switch(self, notebook, page, page_num=0, *args):
        self.current_channel = notebook.get_menu_label_text(notebook.get_nth_page(page_num))
        __print__(dbg.UI, "main.channel_switch():", "set current_channel :=", self.current_channel)
        self.update_title()
        
        # if first selected, load current category
        __print__(dbg.STAT, "TRY", "main.channel_switch(): ", self.current_channel + ".first_show()")
        try: self.channel().first_show()
        except: __print__(dbg.INIT, ".first_show() initialization error")

    # Invoked from the menu instead, uses module name instead of numeric tab id
    def channel_switch_by_name(self, name):
        self.notebook_channels.set_current_page(self.channel_names.index(name))

    # Mirror selected channel tab into main window title
    def update_title(self):







<

<
|
<







230
231
232
233
234
235
236

237

238

239
240
241
242
243
244
245
    
        
    # Notebook tab has been clicked (receives numeric page_num), but *NOT* yet changed (visually).
    def channel_switch(self, notebook, page, page_num=0, *args):
        self.current_channel = notebook.get_menu_label_text(notebook.get_nth_page(page_num))
        __print__(dbg.UI, "main.channel_switch():", "set current_channel :=", self.current_channel)
        self.update_title()

        # if first selected, load current category

        self.channel().first_show()


    # Invoked from the menu instead, uses module name instead of numeric tab id
    def channel_switch_by_name(self, name):
        self.notebook_channels.set_current_page(self.channel_names.index(name))

    # Mirror selected channel tab into main window title
    def update_title(self):