From: Good Guy Date: Mon, 21 Mar 2016 17:26:33 +0000 (-0600) Subject: merge: fix loadfile rm dup create_objects, fix put_title X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=8c99a62f8ed4014195a3b65095becec907690d72;p=goodguy%2Fhistory.git merge: fix loadfile rm dup create_objects, fix put_title --- diff --git a/cinelerra-5.1/cinelerra/loadfile.C b/cinelerra-5.1/cinelerra/loadfile.C index a43778e1..41434497 100644 --- a/cinelerra-5.1/cinelerra/loadfile.C +++ b/cinelerra-5.1/cinelerra/loadfile.C @@ -194,8 +194,6 @@ void LoadFileWindow::create_objects() lock_window("LoadFileWindow::create_objects"); BC_FileBox::create_objects(); - BC_FileBox::create_objects(); - int x = get_w() / 2 - LoadMode::calculate_w(this, mwindow->theme) / 2; int y = get_cancel_button()->get_y() - diff --git a/cinelerra-5.1/guicast/bcfilebox.C b/cinelerra-5.1/guicast/bcfilebox.C index 21898b87..8e5a1e54 100644 --- a/cinelerra-5.1/guicast/bcfilebox.C +++ b/cinelerra-5.1/guicast/bcfilebox.C @@ -751,22 +751,15 @@ int BC_FileBox::resize_event(int w, int h) w - (get_w() - listbox->get_w()), h - (get_h() - listbox->get_h()), 0); - icon_button->reposition_window(w - (get_w() - icon_button->get_x()), - icon_button->get_y()); - text_button->reposition_window(w - (get_w() - text_button->get_x()), - text_button->get_y()); - folder_button->reposition_window(w - (get_w() - folder_button->get_x()), - folder_button->get_y()); - rename_button->reposition_window(w - (get_w() - rename_button->get_x()), - rename_button->get_y()); - reload_button->reposition_window(w - (get_w() - reload_button->get_x()), - reload_button->get_y()); - delete_button->reposition_window(w - (get_w() - delete_button->get_x()), - delete_button->get_y()); - updir_button->reposition_window(w - (get_w() - updir_button->get_x()), - updir_button->get_y()); - set_w(w); - set_h(h); + int dx = w - get_w(); + icon_button->reposition_window(icon_button->get_x()+dx, icon_button->get_y()); + text_button->reposition_window(text_button->get_x()+dx, text_button->get_y()); + folder_button->reposition_window(folder_button->get_x()+dx, folder_button->get_y()); + rename_button->reposition_window(rename_button->get_x()+dx, rename_button->get_y()); + reload_button->reposition_window(reload_button->get_x()+dx, reload_button->get_y()); + delete_button->reposition_window(delete_button->get_x()+dx, delete_button->get_y()); + updir_button->reposition_window(updir_button->get_x()+dx, updir_button->get_y()); + set_w(w); set_h(h); get_resources()->filebox_w = get_w(); get_resources()->filebox_h = get_h(); flush(); diff --git a/cinelerra-5.1/guicast/bcwindowbase.C b/cinelerra-5.1/guicast/bcwindowbase.C index 0c34217a..c61691f2 100644 --- a/cinelerra-5.1/guicast/bcwindowbase.C +++ b/cinelerra-5.1/guicast/bcwindowbase.C @@ -4029,17 +4029,10 @@ void BC_WindowBase::set_background(VFrame *bitmap) void BC_WindowBase::put_title(const char *text) { - if( BC_Resources::locale_utf8 ) { - char *bp=this->title, *ep = bp+sizeof(this->title)-1; - for( const char *cp=text; *cp!=0 && bptitle, text); + char *cp = this->title, *ep = cp+sizeof(this->title)-1; + for( const unsigned char *bp = (const unsigned char *)text; *bp && cp= ' ' ? *bp : ' '; + *cp = 0; } void BC_WindowBase::set_title(const char *text)