X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fappearanceprefs.C;h=435f70ad1bf6df6a54397e854a0f4ca2ee2ef3fd;hp=fc2ff08901b8bd0a07276012f83f6e853526f81d;hb=a6fa7638ac79011ab3188e1f4120680c641cca52;hpb=d3136bf5076921bddf85277f619eeffcf8eb3009 diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.C b/cinelerra-5.1/cinelerra/appearanceprefs.C index fc2ff089..435f70ad 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, _("Locale:"))); + 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; @@ -462,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,