Replace the DirSelectionListener interface using a typedef'ed signal to increase simplicity and reduce boiler plate.

This commit is contained in:
Adam Reichold
2015-12-05 11:25:23 +01:00
parent a727460f77
commit 87016d353a
8 changed files with 23 additions and 61 deletions

View File

@@ -61,10 +61,11 @@ FilePanel::FilePanel () : parent(NULL)
placesBrowser->setDirBrowserRemoteInterface (dirBrowser);
recentBrowser->setDirBrowserRemoteInterface (dirBrowser);
dirBrowser->addDirSelectionListener (fileCatalog);
dirBrowser->addDirSelectionListener (recentBrowser);
dirBrowser->addDirSelectionListener (placesBrowser);
dirBrowser->addDirSelectionListener (tpc);
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->setFileSelectionListener (this);
fileCatalog->setDirBrowserRemoteInterface (dirBrowser);