Esempio n. 1
0
 def __init__(self, activate_perspective, controls):
     
     gtk.HBox.__init__(self, False, 0)
     
     self.active = None
            
     musics = PespectiveToogledButton(_("Music"), gtk.STOCK_HARDDISK, _("Music Navigation (Alt+1)"))
     musics.connect("clicked", lambda * a: activate_perspective(LEFT_PERSPECTIVE_NAVIGATION))        
     musics.set_active(True)
     
             
     radios = PespectiveToogledButton(_("Radio"), gtk.STOCK_NETWORK, _("Radio Stantions (Alt+2)"))
     radios.connect("clicked", lambda * a:activate_perspective(LEFT_PERSPECTIVE_RADIO))
     radios.connect("clicked", lambda * a:controls.radio.lazy_load())
     
     
     
     
     virtuals = PespectiveToogledButton(_("Playlist"), gtk.STOCK_INDEX, _("Virtual Play Lists (Alt+3)"))
     virtuals.connect("clicked", lambda * a:activate_perspective(LEFT_PERSPECTIVE_VIRTUAL))
     
     
     info = PespectiveToogledButton(_("Info"), gtk.STOCK_INFO, _("Info Panel (Alt+4)"))
     info.connect("clicked", lambda * a: activate_perspective(LEFT_PERSPECTIVE_INFO))
     
     lastfm = PespectiveToogledButton(_("Last.Fm"), gtk.STOCK_CONNECT, _("Last.fm Panel (Alt+5)"))
     lastfm.connect("clicked", lambda * a: activate_perspective(LEFT_PERSPECTIVE_LASTFM))
     
     vk = PespectiveToogledButton(_("VK"), gtk.STOCK_UNINDENT, _("VK Panel (Alt+6)"))
     vk.connect("clicked", lambda * a:controls.vk_integration.lazy_load())
     vk.connect("clicked", lambda * a: activate_perspective(LEFT_PERSPECTIVE_VK))
     
             
     self.button_list = {
                  LEFT_PERSPECTIVE_NAVIGATION:musics,
                  LEFT_PERSPECTIVE_RADIO:radios,
                  LEFT_PERSPECTIVE_VIRTUAL:virtuals,
                  LEFT_PERSPECTIVE_LASTFM:lastfm,
                  LEFT_PERSPECTIVE_VK:vk,
                  LEFT_PERSPECTIVE_INFO:info                     
                  }
     
     OneActiveToggledButton(self.button_list.values())
     
     self.pack_start(musics, False, False, 0)
     self.pack_start(radios, False, False, 0)
     
     if "l_user_" != FCBase().lfm_login:
         self.pack_start(lastfm, False, False, 0)
     
     if "@bofthew.com" not in FCBase().vk_login: 
         self.pack_start(vk, False, False, 0)
             
     self.pack_start(virtuals, False, False, 0)
     self.pack_start(info, False, False, 0)
Esempio n. 2
0
    def __init__(self, activate_perspective, controls):

        gtk.HBox.__init__(self, False, 0)

        self.active = None

        musics = PespectiveToogledButton(_("Music"), gtk.STOCK_HARDDISK,
                                         _("Music Navigation (Alt+1)"))
        musics.connect(
            "clicked",
            lambda *a: activate_perspective(LEFT_PERSPECTIVE_NAVIGATION))
        musics.set_active(True)

        radios = PespectiveToogledButton(_("Radio"), gtk.STOCK_NETWORK,
                                         _("Radio Stantions (Alt+2)"))
        radios.connect("clicked",
                       lambda *a: activate_perspective(LEFT_PERSPECTIVE_RADIO))

        virtuals = PespectiveToogledButton(_("Playlist"), gtk.STOCK_INDEX,
                                           _("Virtual Play Lists (Alt+3)"))
        virtuals.connect(
            "clicked",
            lambda *a: activate_perspective(LEFT_PERSPECTIVE_VIRTUAL))

        info = PespectiveToogledButton(_("Info"), gtk.STOCK_INFO,
                                       _("Info Panel (Alt+4)"))
        info.connect("clicked",
                     lambda *a: activate_perspective(LEFT_PERSPECTIVE_INFO))

        lastfm = PespectiveToogledButton(_("Last.Fm"), gtk.STOCK_CONNECT,
                                         _("Last.fm Panel (Alt+5)"))
        lastfm.connect(
            "clicked",
            lambda *a: activate_perspective(LEFT_PERSPECTIVE_LASTFM))

        vk = PespectiveToogledButton(_("VK"), gtk.STOCK_UNINDENT,
                                     _("VK Panel (Alt+6)"))
        vk.connect("clicked", lambda *a: controls.vk_integration.lazy_load())
        vk.connect("clicked",
                   lambda *a: activate_perspective(LEFT_PERSPECTIVE_VK))

        self.button_list = {
            LEFT_PERSPECTIVE_NAVIGATION: musics,
            LEFT_PERSPECTIVE_RADIO: radios,
            LEFT_PERSPECTIVE_VIRTUAL: virtuals,
            LEFT_PERSPECTIVE_LASTFM: lastfm,
            LEFT_PERSPECTIVE_VK: vk,
            LEFT_PERSPECTIVE_INFO: info
        }

        OneActiveToggledButton(self.button_list.values())

        self.pack_start(musics, False, False, 0)
        self.pack_start(radios, False, False, 0)

        if "l_user_" != FCBase().lfm_login:
            self.pack_start(lastfm, False, False, 0)

        self.pack_start(vk, False, False, 0)

        self.pack_start(virtuals, False, False, 0)
        self.pack_start(info, False, False, 0)
Esempio n. 3
0
 def __init__(self, activate_perspective, controls):
     
     gtk.HBox.__init__(self, False, 0)
     
     self.active = None
            
     musics = PespectiveToogledButton(_("Music"), gtk.STOCK_HARDDISK, _("Music Navigation (Alt+1)"))
     musics.connect("clicked", lambda * a: activate_perspective(LEFT_PERSPECTIVE_NAVIGATION))        
     musics.set_active(True)
     
             
     radios = PespectiveToogledButton(_("Radio"), gtk.STOCK_NETWORK, _("Radio Stantions (Alt+2)"))
     radios.connect("clicked", lambda * a:controls.radio.lazy_load())
     radios.connect("clicked", lambda * a:activate_perspective(LEFT_PERSPECTIVE_RADIO))
     
     
     
     virtuals = PespectiveToogledButton(_("Play Lists"), gtk.STOCK_INDEX, _("Virtual Play Lists (Alt+3)"))
     virtuals.connect("clicked", lambda * a:activate_perspective(LEFT_PERSPECTIVE_VIRTUAL))
     
     
     info = PespectiveToogledButton(_("Info"), gtk.STOCK_INFO, _("Info Panel (Alt+4)"))
     info.connect("clicked", lambda * a: activate_perspective(LEFT_PERSPECTIVE_INFO))
             
     self.button_list = {
                  LEFT_PERSPECTIVE_NAVIGATION:musics,
                  LEFT_PERSPECTIVE_RADIO:radios,
                  LEFT_PERSPECTIVE_VIRTUAL:virtuals,
                  LEFT_PERSPECTIVE_INFO:info
                  }
     
     OneActiveToggledButton(self.button_list.values())
     
     self.pack_start(musics, False, False, 0)
     self.pack_start(radios, False, False, 0)
     self.pack_start(virtuals, False, False, 0)
     self.pack_start(info, False, False, 0)