Ejemplo n.º 1
0
    def __init__(self):
    
        self.__have_unapplied_changes = False
    
        Configurator.__init__(self)
        
        self.__list = ThumbableGridView()
        self.add(self.__list)
        
        #lbl = LabelItem("Orientation:")
        #self.__list.append_item(lbl)
        
        if (platforms.MAEMO5):
            chbox = OptionItem("Landscape Mode", config.ORIENTATION_LANDSCAPE,
                               "Portrait Mode", config.ORIENTATION_PORTRAIT,
                               "Automatic", config.ORIENTATION_AUTOMATIC)
        else:
            chbox = OptionItem("Landscape Mode", config.ORIENTATION_LANDSCAPE,
                               "Portrait Mode", config.ORIENTATION_PORTRAIT)
        
        chbox.connect_changed(self.__on_select_orientation)
        chbox.select_by_value(config.orientation())
        self.__list.append_item(chbox)

        # abusing empty label for space... TODO: implement space item :)
        #lbl = LabelItem("")
        #self.__list.append_item(lbl)

        chk = CheckBoxItem("Swap volume/zoom keys in portrait mode",
                           config.portrait_swap_volume())
        chk.connect_checked(self.__on_check_swap)
        self.__list.append_item(chk)
Ejemplo n.º 2
0
    def __init__(self):

        # table: clientid -> path_stack
        self.__path_stacks = {}

        self.__current_file = None
        self.__artist = ""
        self.__title = ""

        Configurator.__init__(self)

        self.__list = ThumbableGridView()
        self.add(self.__list)

        lbl = LabelItem("MediaBox WebAccess lets you access your media and " \
                        "remote-control MediaBox with a web browser.")
        self.__list.append_item(lbl)

        lbl = LabelItem("This is still an experimental feature and not " \
                        "fully working yet!")
        self.__list.append_item(lbl)

        chbox = OptionItem("WebAccess is Off", "off", "WebAccess is On", "on")
        chbox.select_by_value("off")
        chbox.connect_changed(self.__on_toggle_webaccess)
        self.__list.append_item(chbox)

        self.__lbl_info = LabelItem("")
        self.__list.append_item(self.__lbl_info)
Ejemplo n.º 3
0
    def __init__(self):
    
        Configurator.__init__(self)

        self.__list = ThumbableGridView()
        self.add(self.__list)
                  
        self.__update_list()
Ejemplo n.º 4
0
    def __init__(self):

        self.__components = []

        Configurator.__init__(self)

        self.__list = ThumbableGridView()
        self.add(self.__list)
Ejemplo n.º 5
0
    def __init__(self):

        # table: download ID -> item
        self.__items = {}

        Dialog.__init__(self)
        self.set_title("Active Downloads")

        self.__list = ThumbableGridView()
        self.add(self.__list)
Ejemplo n.º 6
0
    def __init__(self, title):

        self.__choice = None

        Window.__init__(self, Window.TYPE_DIALOG)
        self.set_flag(windowflags.EXCLUSIVE, True)
        self.connect_closed(self.__on_close)
        self.set_title(title)

        self.__list = ThumbableGridView()
        self.add(self.__list)
Ejemplo n.º 7
0
    def __init__(self):

        Configurator.__init__(self)

        self.__list = ThumbableGridView()
        self.add(self.__list)

        if (platforms.MAEMO4 or platforms.MAEMO5):
            if (platforms.MAEMO4): tracker = "Metalayer Crawler"
            elif (platforms.MAEMO5): tracker = "Tracker"
            lbl = LabelItem("Your device provides a tracker service (%s) for "
                            "discovering new media. MediaBox can use it for "
                            "scanning for new media." % tracker)
            self.__list.append_item(lbl)

            btn = ButtonItem("Look for new media now")
            btn.connect_clicked(self.__on_click_update)
            self.__list.append_item(btn)

            chk = CheckBoxItem("Look for new media at startup (recommended)",
                               mb_config.scan_at_startup())
            chk.connect_checked(self.__on_check_startup)
            self.__list.append_item(chk)

        else:
            lbl = LabelItem("Your device does not provide a tracker service for "
                            "discovering new media automatically. You can " \
                            "scan for new media manually by selecting " \
                            "'Scan for Media' from the item popup menu of a "\
                            "local folder.")
            self.__list.append_item(lbl)

            lbl = LabelItem("")
            self.__list.append_item(lbl)
        #end if

        lbl = LabelItem("By clearing the index, MediaBox forgets about all "
                        "media files until you have it scan for media again.")
        self.__list.append_item(lbl)

        btn = ButtonItem("Clear index now")
        btn.connect_clicked(self.__on_click_clear)
        self.__list.append_item(btn)


        lbl = LabelItem("At startup, MediaBox removes media that no longer "
                        "exists from the index. If necessary, you can trigger " \
                        "this manually anytime, too")
        self.__list.append_item(lbl)

        btn = ButtonItem("Remove dead entries from index")
        btn.connect_clicked(self.__on_click_bury)
        self.__list.append_item(btn)
Ejemplo n.º 8
0
    def __init__(self):

        Configurator.__init__(self)

        self.__list = ThumbableGridView()
        self.add(self.__list)

        lbl = LabelItem("Behavior after a phone call:")
        self.__list.append_item(lbl)

        chbox = OptionItem("Resume playing", config.RESUME_AUTOMATIC,
                           "Stay paused", config.RESUME_MANUAL)
        chbox.connect_changed(self.__on_select_phonecall_resume)
        self.__list.append_item(chbox)

        self.__label_info = LabelItem("")
        self.__list.append_item(self.__label_info)
        chbox.select_by_value(config.get_phonecall_resume())
Ejemplo n.º 9
0
    def __init__(self):

        Configurator.__init__(self)

        self.__list = ThumbableGridView()
        self.add(self.__list)

        lbl = LabelItem("What should MediaBox do if multiple versions of a " \
                        "video are available:")
        self.__list.append_item(lbl)

        chbox = OptionItem("let me choose", config.QUALITY_ASK,
                           "automatically choose high quality",
                           config.QUALITY_HIGH,
                           "automatically choose low quality",
                           config.QUALITY_LOW)
        chbox.connect_changed(self.__on_select_quality)
        chbox.select_by_value(config.get_quality())
        self.__list.append_item(chbox)
Ejemplo n.º 10
0
    def __init__(self):

        Configurator.__init__(self)

        self.__list = ThumbableGridView()
        self.add(self.__list)

        lbl = LabelItem("Keep display lit:")
        #lbl.set_font(theme.font_mb_headline)
        self.__list.append_item(lbl)

        chbox = OptionItem("never", "no", "while playing", "playing")
        #"yes", "yes")
        chbox.connect_changed(self.__on_select_display_lit)
        self.__list.append_item(chbox)

        self.__label_lit = LabelItem("")
        self.__list.append_item(self.__label_lit)
        chbox.select_by_value(config.get_display_lit())
Ejemplo n.º 11
0
    def __init__(self):
    
        self.__sleep_handler = None
        self.__wakeup_handler = None
        
        self.__sleep_time = config.get_sleep_time()
        self.__wakeup_time = config.get_wakeup_time()
        
    
        Configurator.__init__(self)
                
        self.__list = ThumbableGridView()
        self.add(self.__list)
        
        #img = Image(theme.mb_sleep_timer_sleep)
        #hbox.add(img, False)
        
        chk = CheckBoxItem("Fall asleep and stop playing at", config.get_sleep())
        chk.connect_checked(self.__on_check_sleep)
        self.__list.append_item(chk)

        btn = ButtonItem("%02d:%02d" % self.__sleep_time)
        btn.connect_clicked(self.__on_set_sleep, btn)
        self.__list.append_item(btn)

        #img = Image(theme.mb_sleep_timer_wakeup)
        #hbox.add(img, False)

        chk = CheckBoxItem("Wake up at and start playing at", config.get_wakeup())
        chk.connect_checked(self.__on_check_wakeup)
        self.__list.append_item(chk)

        btn = ButtonItem("%02d:%02d" % self.__wakeup_time)
        btn.connect_clicked(self.__on_set_wakeup, btn)
        self.__list.append_item(btn)

        lbl = LabelItem("MediaBox will start playing the file that is " \
                        "selected at the moment of waking up.")
        lbl.set_icon(theme.mb_sleep_timer_wakeup)
        self.__list.append_item(lbl)