olaf neophyte and de.po updates, valgrind tweaks, delete green lady, inkscape dpi=96
[goodguy/history.git] / cinelerra-5.1 / cinelerra / shbtnprefs.C
index 6fe4fc3b968dc6922b5bc457ab05a084d1d64236..5d719beb7c91486af8735ab973c1ca70392424d3 100644 (file)
@@ -120,7 +120,7 @@ ShBtnAddButton::~ShBtnAddButton()
 
 int ShBtnAddButton::handle_event()
 {
-       
+
        Preferences *preferences = sb_window->shbtn_edit->pwindow->thread->preferences;
        ShBtnPref *pref = new ShBtnPref(_("new"), "", 0);
        preferences->shbtn_prefs.append(pref);
@@ -189,7 +189,7 @@ ShBtnTextWindow::~ShBtnTextWindow()
 }
 
 ShBtnErrWarn::ShBtnErrWarn(ShBtnTextWindow *st_window, int x, int y)
- : BC_CheckBox(x, y, &st_window->warn, "Warn on err exit")
+ : BC_CheckBox(x, y, &st_window->warn, _("Warn on err exit"))
 {
         this->st_window = st_window;
 }
@@ -200,6 +200,7 @@ ShBtnErrWarn::~ShBtnErrWarn()
 
 void ShBtnTextWindow::create_objects()
 {
+       lock_window("ShBtnTextWindow::create_objects");
         int x = 10, y = 10;
        int x1 = 160;
        BC_Title *title = new BC_Title(x, y, _("Label:"));
@@ -212,11 +213,12 @@ void ShBtnTextWindow::create_objects()
         add_subwindow(cmd_name);
         cmd_text = new BC_ScrollTextBox(this, x1, y, get_w()-x1-20, 4, pref->commands);
        cmd_text->create_objects();
-       y += cmd_text->get_h() + 8;
+       y += cmd_text->get_h() + 16;
         add_subwindow(st_err_warn = new ShBtnErrWarn(this, x1, y));
         y = get_h() - ShBtnTextOK::calculate_h() - 10;
         add_subwindow(new ShBtnTextOK(this, x, y));
         show_window();
+       unlock_window();
 }
 
 ShBtnTextOK::ShBtnTextOK(ShBtnTextWindow *st_window, int x, int y)
@@ -253,7 +255,9 @@ BC_Window *ShBtnTextDialog::new_gui()
 void ShBtnTextDialog::handle_close_event(int result)
 {
        if( !result ) {
+               sb_window->lock_window("ShBtnTextDialog::handle_close_event");
                sb_window->list_update();
+               sb_window->unlock_window();
        }
        st_window = 0;
 }
@@ -267,6 +271,7 @@ int ShBtnTextDialog::start_edit(ShBtnPref *pref)
 
 void ShBtnEditWindow::create_objects()
 {
+       lock_window("ShBtnEditWindow::create_objects");
        Preferences *preferences = shbtn_edit->pwindow->thread->preferences;
        for( int i=0; i<preferences->shbtn_prefs.size(); ++i ) {
                shbtn_items.append(new ShBtnPrefItem(preferences->shbtn_prefs[i]));
@@ -281,6 +286,7 @@ void ShBtnEditWindow::create_objects()
        add_subwindow(edit_button = new ShBtnEditButton(this, x, y));
        add_subwindow(new BC_OKButton(this));
        show_window();
+       unlock_window();
 }
 
 int ShBtnEditWindow::start_edit(ShBtnPref *pref)