[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kio] src/widgets: [KPropertiesDialog] Kill "Place in system tray" option
From:       Kai Uwe Broulik <null () kde ! org>
Date:       2016-12-31 12:50:54
Message-ID: E1cNJ7e-00062C-59 () code ! kde ! org
[Download RAW message or body]

Git commit a3c9ae735f63e2a676bc39ef6569f4065f7a4860 by Kai Uwe Broulik.
Committed on 31/12/2016 at 12:50.
Pushed by broulik into branch 'master'.

[KPropertiesDialog] Kill "Place in system tray" option

* ksystraycmd is dead
* we removed the option from kmenuedit a while ago
* we don't want to encourage apps in system tray

Differential Revision: https://phabricator.kde.org/D3775

M  +22   -32   src/widgets/kpropertiesdesktopadvbase.ui
M  +1    -17   src/widgets/kpropertiesdialog.cpp

https://commits.kde.org/kio/a3c9ae735f63e2a676bc39ef6569f4065f7a4860

diff --git a/src/widgets/kpropertiesdesktopadvbase.ui \
b/src/widgets/kpropertiesdesktopadvbase.ui index ccf8de93..a4d6802a 100644
--- a/src/widgets/kpropertiesdesktopadvbase.ui
+++ b/src/widgets/kpropertiesdesktopadvbase.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>363</width>
-    <height>411</height>
+    <width>371</width>
+    <height>539</height>
    </rect>
   </property>
   <layout class="QVBoxLayout">
@@ -168,27 +168,23 @@
         </property>
        </widget>
       </item>
-      <item row="1" column="0" colspan="3">
-       <widget class="QCheckBox" name="systrayCheck">
-        <property name="whatsThis">
-         <string>Check this option if you want to have a system tray handle for your \
                application.</string>
-        </property>
-        <property name="text">
-         <string>Place in system tray</string>
+      <item row="1" column="2">
+       <spacer>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
         </property>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QLabel" name="textLabel12">
-        <property name="text">
-         <string>D-Bus registration:</string>
+        <property name="sizeType">
+         <enum>QSizePolicy::Expanding</enum>
         </property>
-        <property name="buddy">
-         <cstring>dbusCombo</cstring>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>50</width>
+          <height>20</height>
+         </size>
         </property>
-       </widget>
+       </spacer>
       </item>
-      <item row="2" column="1">
+      <item row="1" column="1">
        <widget class="KComboBox" name="dbusCombo">
         <item>
          <property name="text">
@@ -212,21 +208,15 @@
         </item>
        </widget>
       </item>
-      <item row="2" column="2">
-       <spacer>
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeType">
-         <enum>QSizePolicy::Expanding</enum>
+      <item row="1" column="0">
+       <widget class="QLabel" name="textLabel12">
+        <property name="text">
+         <string>D-Bus registration:</string>
         </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>50</width>
-          <height>20</height>
-         </size>
+        <property name="buddy">
+         <cstring>dbusCombo</cstring>
         </property>
-       </spacer>
+       </widget>
       </item>
      </layout>
     </widget>
diff --git a/src/widgets/kpropertiesdialog.cpp b/src/widgets/kpropertiesdialog.cpp
index 42319b1a..832042bf 100644
--- a/src/widgets/kpropertiesdialog.cpp
+++ b/src/widgets/kpropertiesdialog.cpp
@@ -3452,7 +3452,6 @@ public:
     bool m_hasDiscreteGpuBool;
     bool m_runOnDiscreteGpuBool;
     bool m_startupBool;
-    bool m_systrayBool;
 };
 
 KDesktopPropsPlugin::KDesktopPropsPlugin(KPropertiesDialog *_props)
@@ -3534,12 +3533,6 @@ KDesktopPropsPlugin::KDesktopPropsPlugin(KPropertiesDialog \
*_props)  QString genNameStr = _config.readGenericName();
     QString commentStr = _config.readComment();
     QString commandStr = config.readEntry("Exec", QString());
-    if (commandStr.startsWith(QLatin1String("ksystraycmd "))) {
-        commandStr.remove(0, 12);
-        d->m_systrayBool = true;
-    } else {
-        d->m_systrayBool = false;
-    }
 
     d->m_origCommandStr = commandStr;
     QString pathStr = config.readEntry("Path", QString());   // not readPathEntry, \
see kservice.cpp @@ -3701,12 +3694,7 @@ void KDesktopPropsPlugin::applyChanges()
     config.writeEntry("Comment", d->w->commentEdit->text(), KConfigGroup::Persistent \
| KConfigGroup::Localized); // for compat  config.writeEntry("GenericName", \
                d->w->genNameEdit->text());
     config.writeEntry("GenericName", d->w->genNameEdit->text(), \
                KConfigGroup::Persistent | KConfigGroup::Localized); // for compat
-
-    if (d->m_systrayBool) {
-        config.writeEntry("Exec", d->w->commandEdit->text().prepend("ksystraycmd \
                "));
-    } else {
-        config.writeEntry("Exec", d->w->commandEdit->text());
-    }
+    config.writeEntry("Exec", d->w->commandEdit->text());
     config.writeEntry("Path", d->w->pathEdit->lineEdit()->text());   // not \
writePathEntry, see kservice.cpp  
     // Write mimeTypes
@@ -3825,7 +3813,6 @@ void KDesktopPropsPlugin::slotAdvanced()
     }
 
     w.startupInfoCheck->setChecked(d->m_startupBool);
-    w.systrayCheck->setChecked(d->m_systrayBool);
 
     if (d->m_dbusStartupType == QLatin1String("unique")) {
         w.dbusCombo->setCurrentIndex(2);
@@ -3863,8 +3850,6 @@ void KDesktopPropsPlugin::slotAdvanced()
             this, SIGNAL(changed()));
     connect(w.startupInfoCheck, SIGNAL(toggled(bool)),
             this, SIGNAL(changed()));
-    connect(w.systrayCheck, SIGNAL(toggled(bool)),
-            this, SIGNAL(changed()));
     connect(w.dbusCombo, SIGNAL(activated(int)),
             this, SIGNAL(changed()));
 
@@ -3877,7 +3862,6 @@ void KDesktopPropsPlugin::slotAdvanced()
             d->m_runOnDiscreteGpuBool = w.discreteGpuCheck->isChecked();
         }
         d->m_startupBool = w.startupInfoCheck->isChecked();
-        d->m_systrayBool = w.systrayCheck->isChecked();
 
         if (w.terminalCloseCheck->isChecked()) {
             d->m_terminalOptionStr.append(" --noclose");


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic