예제 #1
0
def _playback_panel():
    extras = []

    lab = widgetset.Label(_("Renderer options:"))
    lab.set_bold(True)
    extras.append(align_left(lab))

    grid = dialogwidgets.ControlGrid()

    note = dialogwidgets.note(
        _("You must restart %(appname)s for renderer "
          "changes to take effect.",
          {"appname": app.config.get(prefs.SHORT_APP_NAME)}))
    grid.pack(align_left(note, bottom_pad=12), grid.ALIGN_LEFT, span=2)

    grid.end_line(spacing=12)

    rbg = widgetset.RadioButtonGroup()
    radio_map = {}
    for mem in renderers.get_renderer_list():
        radio_map[mem] = widgetset.RadioButton(mem, rbg)

    buttons = [(v, k) for k, v in radio_map.items()]
    attach_radio(buttons, options.USE_RENDERER)

    grid.pack_label(_("Video renderer:"), grid.ALIGN_RIGHT)
    grid.pack(dialogwidgets.radio_button_list(*radio_map.values()))

    grid.end_line(spacing=12)

    extras.append(align_left(grid.make_table()))

    return extras
예제 #2
0
파일: prefpanel.py 프로젝트: cool-RR/Miro
    def build_widget(self):
        v = widgetset.VBox(8)

        run_at_startup_cbx = widgetset.Checkbox(_(
            "Automatically run %(appname)s when I log in.",
            {'appname': app.config.get(prefs.SHORT_APP_NAME)}))
        attach_boolean(run_at_startup_cbx, prefs.RUN_AT_STARTUP)
        v.pack_start(run_at_startup_cbx)

        warn_if_downloading_cbx = widgetset.Checkbox(_("Warn me if I attempt to quit with downloads in progress."))
        attach_boolean(warn_if_downloading_cbx, prefs.WARN_IF_DOWNLOADING_ON_QUIT)
        v.pack_start(warn_if_downloading_cbx)

        warn_if_converting_cbx = widgetset.Checkbox(_("Warn me if I attempt to quit with conversions in progress."))
        attach_boolean(warn_if_converting_cbx, prefs.WARN_IF_CONVERTING_ON_QUIT)
        v.pack_start(warn_if_converting_cbx)

        # FIXME - need to automatically generate list of available languages
        # in correct language
        lang_options = gtcache.get_languages()
        lang_options.insert(0, ("system", _("System default")))

        lang_option_menu = widgetset.OptionMenu([op[1] for op in lang_options])
        attach_combo(lang_option_menu, prefs.LANGUAGE,
                     [op[0] for op in lang_options])
        v.pack_start(widgetutil.align_left(
            widgetutil.build_control_line((widgetset.Label(_("Language:")), lang_option_menu))))

        v.pack_start(widgetutil.align_left(
            dialogwidgets.note(_("(Changing the language requires you to restart Miro.)"))))
        
        pack_extras(v, "general")

        return v
예제 #3
0
파일: prefpanelset.py 프로젝트: kmshi/miro
def _playback_panel():
    extras = []

    lab = widgetset.Label(_("Renderer options:"))
    lab.set_bold(True)
    extras.append(align_left(lab))

    grid = dialogwidgets.ControlGrid()

    note = dialogwidgets.note(
        _("You must restart %(appname)s for renderer "
          "changes to take effect.",
          {"appname": app.config.get(prefs.SHORT_APP_NAME)}))
    grid.pack(align_left(note, bottom_pad=12), grid.ALIGN_LEFT, span=2)

    grid.end_line(spacing=12)

    rbg = widgetset.RadioButtonGroup()
    radio_map = {}
    for mem in renderers.get_renderer_list():
        radio_map[mem] = widgetset.RadioButton(mem, rbg)

    buttons = [(v, k) for k, v in radio_map.items()]
    attach_radio(buttons, options.USE_RENDERER)

    grid.pack_label(_("Video renderer:"), grid.ALIGN_RIGHT)
    grid.pack(dialogwidgets.radio_button_list(*radio_map.values()))

    grid.end_line(spacing=12)

    extras.append(align_left(grid.make_table()))

    return extras
예제 #4
0
파일: prefpanel.py 프로젝트: cool-RR/Miro
    def build_widget(self):
        cc_options = [(1440, _("Every day")),
                      (60, _("Every hour")),
                      (30, _("Every 30 minutes")),
                      (-1 , _("Manually"))]
        cc_option_menu = widgetset.OptionMenu([op[1] for op in cc_options])
        attach_combo(cc_option_menu, prefs.CHECK_CHANNELS_EVERY_X_MN, 
            [op[0] for op in cc_options])

        ad_options = [("new", _("New")),
                      ("all", _("All")),
                      ("off", _("Off"))]
        ad_option_menu = widgetset.OptionMenu([op[1] for op in ad_options])

        attach_combo(ad_option_menu, prefs.CHANNEL_AUTO_DEFAULT, 
            [op[0] for op in ad_options])

        max_options = [(0, _("0")),
                       (20, _("20")),
                       (50, _("50")),
                       (100, _("100")),
                       (1000, _("1000"))]
        max_option_menu = widgetset.OptionMenu([op[1] for op in max_options])
        attach_combo(max_option_menu, prefs.MAX_OLD_ITEMS_DEFAULT, 
            [op[0] for op in max_options])

        grid = dialogwidgets.ControlGrid()
        grid.pack(dialogwidgets.heading(_("Default settings for new feeds:")), 
                grid.ALIGN_LEFT, span=2)
        grid.end_line(spacing=2)
        grid.pack(dialogwidgets.note(
                _("(These can be changed using the feed's settings button)")),
                grid.ALIGN_LEFT, span=2)
        grid.end_line(spacing=12)

        grid.pack_label(_("Check for new content:"),
                dialogwidgets.ControlGrid.ALIGN_RIGHT)
        grid.pack(cc_option_menu)
        grid.end_line(spacing=4)

        grid.pack_label(_("Auto-download setting:"),
                dialogwidgets.ControlGrid.ALIGN_RIGHT)
        grid.pack(ad_option_menu)
        grid.end_line(spacing=4)

        grid.pack(dialogwidgets.label_with_note(
            _("Remember this many old items:"),
            _("(in addition to the current contents)")),
            dialogwidgets.ControlGrid.ALIGN_RIGHT)
        grid.pack(max_option_menu)
        grid.end_line()

        return grid.make_table()