X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fappearanceprefs.C;h=d6ed2bb852dee6f2fc3c80a4a9820f9bc0d8cfac;hb=271d07e4385f187b88ffcd986e9ecf5635a51718;hp=943274717c2ceb82248661e4c8ecf4c9b29e00f8;hpb=c9c0e07706fad701a70ee0d1ffb0fcb6304f138c;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.C b/cinelerra-5.1/cinelerra/appearanceprefs.C index 94327471..d6ed2bb8 100644 --- a/cinelerra-5.1/cinelerra/appearanceprefs.C +++ b/cinelerra-5.1/cinelerra/appearanceprefs.C @@ -94,7 +94,12 @@ void AppearancePrefs::create_objects() add_subwindow(new BC_Title(x, y, _("Plugin Icons:"))); add_subwindow(plugin_icons = new ViewPluginIcons(x1, y, pwindow)); plugin_icons->create_objects(); - y += plugin_icons->get_h() + ys15; + y += plugin_icons->get_h() + ys10; + add_subwindow(new BC_Title(x, y, _("Language:"))); + LayoutLocale *layout_locale; + add_subwindow(layout_locale = new LayoutLocale(x1, y, pwindow)); + layout_locale->create_objects(); + y += layout_locale->get_h() + ys15; x1 = get_w()/2; int x2 = x1 + xS(160), y2 = y; @@ -213,9 +218,6 @@ void AppearancePrefs::create_objects() UseWarnVersion *ver_warn = new UseWarnVersion(pwindow, x, y); add_subwindow(ver_warn); y += ver_warn->get_h() + ys5; - UseWarnStack *stack_warn = new UseWarnStack(pwindow, x, y); - add_subwindow(stack_warn); - y += stack_warn->get_h() + ys5; BD_WarnRoot *bdwr_warn = new BD_WarnRoot(pwindow, x, y); add_subwindow(bdwr_warn); y += bdwr_warn->get_h() + ys5; @@ -465,6 +467,42 @@ int ViewPluginIconItem::handle_event() return 1; } +LayoutLocale::LayoutLocale(int x, int y, PreferencesWindow *pwindow) + : BC_PopupMenu(x, y, xS(200), pwindow->thread->preferences->locale, 1) +{ + this->pwindow = pwindow; +} +LayoutLocale::~LayoutLocale() +{ +} + +const char *LayoutLocale::locale_list[] = { LOCALE_LIST, 0 }; + +void LayoutLocale::create_objects() +{ + for( const char *tp, **lp=locale_list; (tp=*lp)!=0; ++lp ) + add_item(new LayoutLocaleItem(this, tp)); +} + +int LayoutLocale::handle_event() +{ + return 1; +} + +LayoutLocaleItem::LayoutLocaleItem(LayoutLocale *popup, const char *text) + : BC_MenuItem(text) +{ + this->popup = popup; +} + +int LayoutLocaleItem::handle_event() +{ + popup->set_text(get_text()); + strcpy(popup->pwindow->thread->preferences->locale, get_text()); + popup->handle_event(); + return 1; +} + ViewLayoutScale::ViewLayoutScale(PreferencesWindow *pwindow, AppearancePrefs *aprefs, int x, int y) : BC_TumbleTextBox(aprefs, @@ -624,19 +662,6 @@ int UseWarnVersion::handle_event() return 1; } -UseWarnStack::UseWarnStack(PreferencesWindow *pwindow, int x, int y) - : BC_CheckBox(x, y, pwindow->thread->preferences->warn_stack, - _("Stack warns if reference not modified")) -{ - this->pwindow = pwindow; -} - -int UseWarnStack::handle_event() -{ - pwindow->thread->preferences->warn_stack = get_value(); - return 1; -} - BD_WarnRoot::BD_WarnRoot(PreferencesWindow *pwindow, int x, int y) : BC_CheckBox(x, y, pwindow->thread->preferences->bd_warn_root, _("Create Bluray warns if not root"))