CopyTo and MoveTo actions aware of Dolphin settings (needed for fixing bug #181910)

Alessandro Diaferia alediaferia at gmail.com
Thu Apr 16 19:23:19 BST 2009


I updated the patch according to dfaure's suggestions, hope now it's ok :)

2009/4/16 Alessandro Diaferia <alediaferia at gmail.com>

> The patch comes from the suggestion made by dfaure here:
> https://bugs.kde.org/show_bug.cgi?id=181910 .
> Hope it is OK to commit since it helps me fixing the folderview bug.
>
> Cheers :)
>
> --
> Alessandro Diaferia
> KDE Developer
>



-- 
Alessandro Diaferia
KDE Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20090416/2af754a7/attachment.htm>
-------------- next part --------------
Index: dolphin/src/kcm/kcmdolphingeneral.cpp
===================================================================
--- dolphin/src/kcm/kcmdolphingeneral.cpp	(revision 951970)
+++ dolphin/src/kcm/kcmdolphingeneral.cpp	(working copy)
@@ -21,6 +21,7 @@
 
 #include "settings/behaviorsettingspage.h"
 #include "settings/previewssettingspage.h"
+#include "settings/contextmenusettingspage.h"
 
 #include <ktabwidget.h>
 #include <kdialog.h>
@@ -60,6 +61,11 @@ DolphinGeneralConfigModule::DolphinGener
     tabWidget->addTab(previewsPage, i18nc("@title:tab Previews settings", "Previews"));
     connect(previewsPage, SIGNAL(changed()), this, SLOT(changed()));
 
+    // initialize 'Context Menu' tab
+    ContextMenuSettingsPage *contextMenuPage = new ContextMenuSettingsPage(tabWidget);
+    tabWidget->addTab(contextMenuPage,  i18nc("@title:tab Context Menu settings", "Context Menu"));
+    connect(contextMenuPage, SIGNAL(changed()), this, SLOT(changed()));
+
     m_pages.append(behaviorPage);
     m_pages.append(previewsPage);
 
Index: dolphin/src/CMakeLists.txt
===================================================================
--- dolphin/src/CMakeLists.txt	(revision 951970)
+++ dolphin/src/CMakeLists.txt	(working copy)
@@ -203,6 +203,7 @@ set(kcm_dolphingeneral_PART_SRCS
     kcm/kcmdolphingeneral.cpp
     settings/behaviorsettingspage.cpp
     settings/previewssettingspage.cpp
+    settings/contextmenusettingspage.cpp
     settings/settingspagebase.cpp)
 
 kde4_add_kcfg_files(kcm_dolphinviewmodes_PART_SRCS
Index: lib/konq/konq_popupmenu.cpp
===================================================================
--- lib/konq/konq_popupmenu.cpp	(revision 951970)
+++ lib/konq/konq_popupmenu.cpp	(working copy)
@@ -410,8 +410,13 @@ void KonqPopupMenuPrivate::init(KonqPopu
 
     q->addSeparator();
 
+    // Use the Dolphin setting for showing the "Copy To" and "Move To" actions
+    KSharedConfig::Ptr dolphin = KSharedConfig::openConfig("dolphinrc");
+
     // CopyTo/MoveTo menus
-    if (m_itemFlags & KParts::BrowserExtension::ShowUrlOperations) {
+    if (m_itemFlags & KParts::BrowserExtension::ShowUrlOperations &&
+        KConfigGroup(dolphin, "General").readEntry("ShowCopyMoveMenu", false)) {
+
         m_copyToMenu.setItems(lstItems);
         m_copyToMenu.setReadOnly(sMoving == false);
         m_copyToMenu.addActionsTo(q);


More information about the kfm-devel mailing list