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;
y += ys35;
add_subwindow(title = new BC_Title(x, y, _("Composer BG Color:")));
int clr_color = pwindow->thread->edl->session->cwindow_clear_color;
- int clr_alpha = pwindow->thread->edl->session->cwindow_clear_alpha;
add_subwindow(cwdw_bg_color = new Composer_BG_Color(pwindow,
- x2, y, xS(80), yS(24), clr_color, clr_alpha));
+ x2, y, xS(80), yS(24), clr_color));
draw_3d_border(x2-2,y-2, xS(80)+4,xS(24)+4, 1);
cwdw_bg_color->create_objects();
x2 += cwdw_bg_color->get_w();
if( y2 < y ) y2 = y;
add_subwindow(new BC_Bar(x0, y2, get_w()-x0 - xs30));
- y += ys15;
+ y += ys35;
x = x0; y1 = y;
add_subwindow(title = new BC_Title(x, y, _("Warnings:"), LARGEFONT,
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,
}
Composer_BG_Color::Composer_BG_Color(PreferencesWindow *pwindow,
- int x, int y, int w, int h, int color, int alpha)
- : ColorBoxButton(_("Composer BG color"), x, y, w, h, color, alpha, 1)
+ int x, int y, int w, int h, int color)
+ : ColorBoxButton(_("Composer BG color"), x, y, w, h, color, -1, 1)
{
this->pwindow = pwindow;
}
int Composer_BG_Color::handle_new_color(int color, int alpha)
{
pwindow->thread->edl->session->cwindow_clear_color = color;
- pwindow->thread->edl->session->cwindow_clear_alpha = alpha;
return 1;
}