get rid of warning when reparenting widget introduced by last change

This commit is contained in:
Andrey Skvortsov
2010-10-07 20:41:12 -07:00
parent 66a6191b56
commit 8a5dfde010

View File

@@ -330,6 +330,8 @@ void RTWindow::SetMainCurrent()
} }
void RTWindow::MoveFileBrowserToMain() void RTWindow::MoveFileBrowserToMain()
{
if( fpanel->ribbonPane->get_children().size() ==0)
{ {
FileCatalog *fCatalog = fpanel->fileCatalog; FileCatalog *fCatalog = fpanel->fileCatalog;
epanel->catalogPane->remove(*fCatalog); epanel->catalogPane->remove(*fCatalog);
@@ -337,8 +339,11 @@ void RTWindow::MoveFileBrowserToMain()
fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Vertical); fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Vertical);
fCatalog->redrawAll(); fCatalog->redrawAll();
} }
}
void RTWindow::MoveFileBrowserToEditor() void RTWindow::MoveFileBrowserToEditor()
{
if(epanel->catalogPane->get_children().size() ==0 )
{ {
FileCatalog *fCatalog = fpanel->fileCatalog; FileCatalog *fCatalog = fpanel->fileCatalog;
fpanel->ribbonPane->remove(*fCatalog); fpanel->ribbonPane->remove(*fCatalog);
@@ -346,10 +351,11 @@ void RTWindow::MoveFileBrowserToEditor()
fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Horizontal); fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Horizontal);
fCatalog->redrawAll(); fCatalog->redrawAll();
} }
}
bool RTWindow::on_expose_event_epanel(GdkEventExpose* event) bool RTWindow::on_expose_event_epanel(GdkEventExpose* event)
{ {
if(!options.tabbedUI && epanel->catalogPane->get_children().size() ==0 ) if(!options.tabbedUI)
MoveFileBrowserToEditor(); MoveFileBrowserToEditor();
return false; // Gtk::VBox::on_expose_event(event); return false; // Gtk::VBox::on_expose_event(event);
} }
@@ -357,8 +363,7 @@ bool RTWindow::on_expose_event_epanel(GdkEventExpose* event)
bool RTWindow::on_expose_event_fpanel(GdkEventExpose* event) bool RTWindow::on_expose_event_fpanel(GdkEventExpose* event)
{ {
if(!options.tabbedUI)
if(!options.tabbedUI && fpanel->ribbonPane->get_children().size() ==0 )
MoveFileBrowserToMain(); MoveFileBrowserToMain();
return false; // Gtk::HPaned::on_expose_event(event); return false; // Gtk::HPaned::on_expose_event(event);
} }