diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,13 +12,14 @@ set(CMAKE_VERBOSE_MAKEFILE OFF) -add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) +# if an old setting is being used, use the setting that complies with the structure of other Krusader settings +if (ENABLE_SYNCHRONIZER) + set(SYNCHRONIZER_ENABLED TRUE) +endif(ENABLE_SYNCHRONIZER) +add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) add_definitions( "-DKRARC_ENABLED" ) - -if(ENABLE_SYNCHRONIZER) - add_definitions( "-DENABLE_SYNCHRONIZER" ) -endif(ENABLE_SYNCHRONIZER) +add_definitions( "-DSYNCHRONIZER_ENABLED" ) find_package(ACL) if(ACL_FOUND) diff --git a/krusader/CMakeLists.txt b/krusader/CMakeLists.txt --- a/krusader/CMakeLists.txt +++ b/krusader/CMakeLists.txt @@ -31,9 +31,9 @@ add_subdirectory(UserMenu) add_subdirectory(VFS) -if(ENABLE_SYNCHRONIZER) +if(SYNCHRONIZER_ENABLED) add_subdirectory(Synchronizer) -endif(ENABLE_SYNCHRONIZER) +endif(SYNCHRONIZER_ENABLED) message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(KRJSDIR)") @@ -87,9 +87,9 @@ ${KDE4_KDECORE_LIBS} ${KDE4_SOLID_LIBS}) -if(ENABLE_SYNCHRONIZER) +if(SYNCHRONIZER_ENABLED) target_link_libraries( krusader Synchronizer ) -endif(ENABLE_SYNCHRONIZER) +endif(SYNCHRONIZER_ENABLED) if(LIBKONQ_FOUND) target_link_libraries( krusader ${LIBKONQ_LIBRARY} ) diff --git a/krusader/Konfigurator/kgcolors.h b/krusader/Konfigurator/kgcolors.h --- a/krusader/Konfigurator/kgcolors.h +++ b/krusader/Konfigurator/kgcolors.h @@ -84,7 +84,7 @@ int endOfActiveColors; int endOfPanelColors; int activeTabIdx, inactiveTabIdx; -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED int synchronizerTabIdx; #endif int otherTabIdx; diff --git a/krusader/Konfigurator/kgcolors.cpp b/krusader/Konfigurator/kgcolors.cpp --- a/krusader/Konfigurator/kgcolors.cpp +++ b/krusader/Konfigurator/kgcolors.cpp @@ -46,7 +46,7 @@ KgColors::KgColors(bool first, QWidget* parent) : KonfiguratorPage(first, parent), offset(0), activeTabIdx(-1), inactiveTabIdx(-1), -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED synchronizerTabIdx(-1), #endif otherTabIdx(-1) @@ -193,7 +193,7 @@ ADDITIONAL_COLOR KDEDefaultBase = { i18n("KDE default"), KColorScheme(QPalette::Active, KColorScheme::View).background().color(), "KDE default" }; ADDITIONAL_COLOR KDEDefaultFore = { i18n("KDE default"), KColorScheme(QPalette::Active, KColorScheme::View).foreground().color(), "KDE default" }; -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED colorsGrp = new QWidget(colorTabWidget); synchronizerTabIdx = colorTabWidget->addTab(colorsGrp, i18n("Synchronizer")); @@ -517,7 +517,7 @@ colCache.getColors(cg, KrColorItemType(KrColorItemType::File, false, isActive, true, true)); pwMarkCur->setColor(cg.highlightedText(), cg.highlight()); } -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED else if (currentPage == synchronizerTabIdx) { PreviewItem *pwDelete = new PreviewItem(preview, i18n("Delete")); PreviewItem *pwRightCopy = new PreviewItem(preview, i18n("Copy to right")); @@ -632,7 +632,7 @@ serializeItem(stream, "Marked Current Foreground"); serializeItem(stream, "Marked Foreground"); serializeItem(stream, "Show Current Item Always"); -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED serializeItem(stream, "Synchronizer Equals Foreground"); serializeItem(stream, "Synchronizer Equals Background"); serializeItem(stream, "Synchronizer Differs Foreground"); diff --git a/krusader/Panel/krpopupmenu.cpp b/krusader/Panel/krpopupmenu.cpp --- a/krusader/Panel/krpopupmenu.cpp +++ b/krusader/Panel/krpopupmenu.cpp @@ -244,7 +244,7 @@ addAction(i18n("Empty Trash"))->setData(QVariant(EMPTY_TRASH_ID)); } -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED // --------- synchronize if (panel->view->numSelected()) { addAction(i18n("Synchronize Selected Files..."))->setData(QVariant(SYNC_SELECTED_ID)); @@ -376,7 +376,7 @@ case NEW_TEXT_FILE_ID: panel->func->editNew(); break; -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED case SYNC_SELECTED_ID : { QStringList selectedNames; foreach(KFileItem item, _items) diff --git a/krusader/UserAction/expander.cpp b/krusader/UserAction/expander.cpp --- a/krusader/UserAction/expander.cpp +++ b/krusader/UserAction/expander.cpp @@ -31,7 +31,7 @@ #include "../KViewer/krviewer.h" #include "../krservices.h" -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED #include "../Synchronizer/synchronizergui.h" #endif @@ -194,7 +194,7 @@ */ PLACEHOLDER_CLASS(exp_Move); -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED /** * This opens the synchronizer with a given profile */ @@ -681,7 +681,7 @@ return QString(); // this doesn't return anything, that's normal! } -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED exp_Sync::exp_Sync() { _expression = "Sync"; @@ -1191,7 +1191,7 @@ ret << new exp_Each; ret << new exp_Profile; ret << new exp_NewSearch; -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED ret << new exp_Sync; #endif ret << new exp_Move; diff --git a/krusader/kractions.h b/krusader/kractions.h --- a/krusader/kractions.h +++ b/krusader/kractions.h @@ -55,7 +55,7 @@ static KAction *actSelectColorMask, *actMultiRename, *actOpenLeftBm, *actOpenRightBm; static KAction *actSplit, *actQueueManager; static KAction *actCombine, *actUserMenu, *actManageUseractions; -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED static KAction *actSyncDirs; #endif static KAction *actVerticalMode; diff --git a/krusader/kractions.cpp b/krusader/kractions.cpp --- a/krusader/kractions.cpp +++ b/krusader/kractions.cpp @@ -74,7 +74,7 @@ KAction *KrActions::actCombine = 0; KAction *KrActions::actUserMenu = 0; KAction *KrActions::actManageUseractions = 0; -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED KAction *KrActions::actSyncDirs = 0; #endif KAction *KrActions::actF10 = 0; @@ -253,7 +253,7 @@ NEW_KACTION(actFind, i18n("&Search..."), "system-search", Qt::CTRL + Qt::Key_S, SLOTS, SLOT(search()), "find"); NEW_KACTION(actLocate, i18n("&Locate..."), "edit-find", Qt::SHIFT + Qt::CTRL + Qt::Key_L, SLOTS, SLOT(locate()), "locate"); -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED NEW_KACTION(actSyncDirs, i18n("Synchronize &Directories..."), "folder-sync", Qt::CTRL + Qt::Key_Y, SLOTS, SLOT(slotSynchronizeDirs()), "sync dirs"); #endif NEW_KACTION(actDiskUsage, i18n("D&isk Usage..."), "kr_diskusage", Qt::ALT + Qt::SHIFT + Qt::Key_S, SLOTS, SLOT(slotDiskUsage()), "disk usage"); diff --git a/krusader/krslots.h b/krusader/krslots.h --- a/krusader/krslots.h +++ b/krusader/krslots.h @@ -114,7 +114,7 @@ void slotCombine(); void userMenu(); void manageUseractions(); -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED void slotSynchronizeDirs(QStringList selected = QStringList()); #endif void slotDiskUsage(); diff --git a/krusader/krslots.cpp b/krusader/krslots.cpp --- a/krusader/krslots.cpp +++ b/krusader/krslots.cpp @@ -94,7 +94,7 @@ #include "BookMan/krbookmarkhandler.h" #include "BookMan/krbookmarkbutton.h" -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED #include "Synchronizer/synchronizergui.h" #endif @@ -696,7 +696,7 @@ ActionMan actionMan(MAIN_VIEW); } -#ifdef ENABLE_SYNCHRONIZER +#ifdef SYNCHRONIZER_ENABLED void KRslots::slotSynchronizeDirs(QStringList selected) { new SynchronizerGUI(0, LEFT_PANEL->func->files()->vfs_getOrigin(),