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

@@ -43,7 +43,6 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
selectedDirectoryId(1),
listener(NULL),
fslistener(NULL),
dirlistener(NULL),
hasValidCurrentEFS(false),
filterPanel(NULL),
previewsToLoad(0),
@@ -2042,8 +2041,8 @@ void FileCatalog::buttonBrowsePathPressed ()
// handle shortcuts in the BrowsePath -- END
// validate the path
if (safe_file_test(BrowsePathValue, Glib::FILE_TEST_IS_DIR) && dirlistener) {
dirlistener->selectDir (BrowsePathValue);
if (safe_file_test(BrowsePathValue, Glib::FILE_TEST_IS_DIR) && selectDir) {
selectDir (BrowsePathValue);
} else
// error, likely path not found: show red arrow
{