Replace the DirBrowserRemoteInterface by slots to reduce coupling by using ad-hoc yet type-safe collaborations.

This commit is contained in:
Adam Reichold
2015-12-05 11:45:15 +01:00
parent 87016d353a
commit 4f68e370d4
9 changed files with 42 additions and 64 deletions

View File

@@ -59,15 +59,15 @@ FilePanel::FilePanel () : parent(NULL)
ribbonPane->set_size_request(50, 150);
dirpaned->pack2 (*ribbonPane, true, true);
placesBrowser->setDirBrowserRemoteInterface (dirBrowser);
recentBrowser->setDirBrowserRemoteInterface (dirBrowser);
DirBrowser::DirSelectionSignal dirSelected = dirBrowser->dirSelected ();
dirSelected.connect (sigc::mem_fun (fileCatalog, &FileCatalog::dirSelected));
dirSelected.connect (sigc::mem_fun (recentBrowser, &RecentBrowser::dirSelected));
dirSelected.connect (sigc::mem_fun (placesBrowser, &PlacesBrowser::dirSelected));
dirSelected.connect (sigc::mem_fun (tpc, &BatchToolPanelCoordinator::dirSelected));
fileCatalog->setDirSelector (sigc::mem_fun (dirBrowser, &DirBrowser::selectDir));
placesBrowser->setDirSelector (sigc::mem_fun (dirBrowser, &DirBrowser::selectDir));
recentBrowser->setDirSelector (sigc::mem_fun (dirBrowser, &DirBrowser::selectDir));
fileCatalog->setFileSelectionListener (this);
fileCatalog->setDirBrowserRemoteInterface (dirBrowser);
rightBox = Gtk::manage ( new Gtk::HBox () );
rightBox->set_size_request(50, 100);