[plasma/plasma-workspace] /: klipper: remove the "disable this popup" menu item

Nate Graham null at kde.org
Mon May 12 23:20:47 BST 2025


Git commit 5762c3fa805f589018bb2fb5a980e2bcef167dc4 by Nate Graham.
Committed on 12/05/2025 at 22:20.
Pushed by ngraham into branch 'master'.

klipper: remove the "disable this popup" menu item

# Reason for the change
My sense is that this was added during the time when there were
clipboard actions included by default, because we wanted to provide a
way to disable this potentially unexpected and intrusive popup.

However we haven't shipped clipboard actions for a long time, at least 8
years. Thus, almost everyone using them has set them up manually. This
means if they did want to disable the popup, they already know how from
the config window.

Let's remove it.


# Test Plan
1. Enable "Show action popup menu \[X\] Immediately on selection" in Klipper's settings window
2. Copy a URL


# Bugs fixed
BUG: 412264\
BUG: 503862\
FIXED-IN: 6.4.0

M  +5    -9    doc/klipper/index.docbook
M  +0    -16   klipper/klipper.cpp
M  +0    -1    klipper/klipper.h
M  +0    -9    klipper/urlgrabber.cpp
M  +0    -1    klipper/urlgrabber.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/5762c3fa805f589018bb2fb5a980e2bcef167dc4

diff --git a/doc/klipper/index.docbook b/doc/klipper/index.docbook
index 8888bd2c80b..ee18de1baf9 100644
--- a/doc/klipper/index.docbook
+++ b/doc/klipper/index.docbook
@@ -131,15 +131,11 @@ Use the mouse or cursor keys to select a program, and &klipper; will run
 this program, opening the address pointed to by the
 selection.</para>
 
-<para>If you do not want to perform any actions on the clipboard
-contents, select <guimenuitem>Disable This Popup</guimenuitem> on the pop-up menu
-to return to what you were doing before. If you leave the menu, it will
-disappear, leaving you to continue your work. You can change the time
-that the menu remains for in the settings 
-dialog, with the option <guilabel>Show action popup menu</guilabel>
-under the <guilabel>General</guilabel> page. You can separately disable the 
-file path part using the option <guilabel>Include MIME actions</guilabel> under
-the <guilabel>Action Menu</guilabel> page.</para>
+<para>You can change the time that the menu remains for in the settings dialog,
+with the option <guilabel>Show action popup menu</guilabel> under the
+<guilabel>General</guilabel> page. You can separately disable the  file path
+part using the option <guilabel>Include MIME actions</guilabel> under the
+<guilabel>Action Menu</guilabel> page.</para>
 
 <para>Actions can be disabled completely by pressing
 the shortcut <keycombo action="simul">&Ctrl;&Alt;<keycap>X</keycap></keycombo>.</para>
diff --git a/klipper/klipper.cpp b/klipper/klipper.cpp
index 6a8b937fdcc..3bdbf3b831b 100644
--- a/klipper/klipper.cpp
+++ b/klipper/klipper.cpp
@@ -97,7 +97,6 @@ Klipper::Klipper(QObject *parent)
      */
     m_myURLGrabber = new URLGrabber(this);
     connect(m_myURLGrabber, &URLGrabber::sigPopup, this, &Klipper::showPopupMenu);
-    connect(m_myURLGrabber, &URLGrabber::sigDisablePopup, this, &Klipper::disableURLGrabber);
     connect(m_historyModel.get(), &HistoryModel::actionInvoked, m_myURLGrabber, &URLGrabber::invokeAction);
 
     /*
@@ -309,21 +308,6 @@ void Klipper::saveSession()
     saveSettings();
 }
 
-void Klipper::disableURLGrabber()
-{
-    QMessageBox *message = new QMessageBox(QMessageBox::Information,
-                                           QString(),
-                                           xi18nc("@info",
-                                                  "You can enable URL actions later in the "
-                                                  "<interface>Actions</interface> page of the "
-                                                  "Clipboard applet's configuration window"));
-    message->setAttribute(Qt::WA_DeleteOnClose);
-    message->setModal(false);
-    message->show();
-
-    setURLGrabberEnabled(false);
-}
-
 void Klipper::slotConfigure()
 {
     if (KConfigDialog::showDialog(QStringLiteral("preferences"))) {
diff --git a/klipper/klipper.h b/klipper/klipper.h
index 97efebc0ee9..46d7755b204 100644
--- a/klipper/klipper.h
+++ b/klipper/klipper.h
@@ -105,7 +105,6 @@ public Q_SLOTS:
 protected Q_SLOTS:
     void showPopupMenu(QMenu *);
     void slotRepeatAction();
-    void disableURLGrabber();
 
 private Q_SLOTS:
     void slotHistoryChanged(bool isTop = false);
diff --git a/klipper/urlgrabber.cpp b/klipper/urlgrabber.cpp
index d773f27dca9..5ceb323f6c6 100644
--- a/klipper/urlgrabber.cpp
+++ b/klipper/urlgrabber.cpp
@@ -193,15 +193,6 @@ void URLGrabber::actionMenu(HistoryItemConstPtr item, bool automatically_invoked
                 m_myMenu->addAction(action);
             }
         }
-
-        // only insert this when invoked via clipboard monitoring, not from an
-        // explicit Ctrl-Alt-R
-        if (automatically_invoked) {
-            m_myMenu->addSeparator();
-            QAction *disableAction = new QAction(i18n("Disable This Popup"), this);
-            connect(disableAction, &QAction::triggered, this, &URLGrabber::sigDisablePopup);
-            m_myMenu->addAction(disableAction);
-        }
         m_myMenu->addSeparator();
 
         QAction *cancelAction = new QAction(QIcon::fromTheme(QStringLiteral("dialog-cancel")), i18n("&Cancel"), this);
diff --git a/klipper/urlgrabber.h b/klipper/urlgrabber.h
index e535d72942a..d3bec33951c 100644
--- a/klipper/urlgrabber.h
+++ b/klipper/urlgrabber.h
@@ -104,7 +104,6 @@ private Q_SLOTS:
 
 Q_SIGNALS:
     void sigPopup(QMenu *);
-    void sigDisablePopup();
 };
 
 struct ClipCommand {


More information about the kde-doc-english mailing list