+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;
+}
+