Esempio n. 1
0
    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
Esempio n. 2
0
def _playback_panel():
    extras = []
    font_infos = [(_('System Default'), None)]
    font_infos.extend((name, name) for name in fontinfo.get_all_font_info())
    subtitle_font_menu = widgetset.OptionMenu(
            [name for (name, path) in font_infos])
    attach_combo(subtitle_font_menu, prefs.SUBTITLE_FONT,
            [path for (name, path) in font_infos])
    lab = widgetset.Label(_("Subtitle font:"))
    extras.append(widgetutil.build_control_line((lab, subtitle_font_menu)))
    return extras