Commit 05569e53 authored by Méven Car's avatar Méven Car

KCM/Component Revamp Browser config

Summary:
Simplify UI:
 * Select option in the available browser
 * use mimeapps.list preferred service as source of truth regarding default browser
 * Can select any program as browser
 * falkon is used as default browser when installed

BUG: 100016
FIXED-IN: 5.19.0

Test Plan:
Before:

{F7888479}

After:

{F7888480}

Reviewers: ngraham, #plasma, ervin, dfaure

Reviewed By: ngraham, ervin

Subscribers: plasma-devel

Tags: #plasma

Maniphest Tasks: T12551

Differential Revision: https://phabricator.kde.org/D26731
parent 2e54c4e7
......@@ -24,99 +24,7 @@
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;qt&gt;Open &lt;b&gt;http&lt;/b&gt; and &lt;b&gt;https&lt;/b&gt; URLs&lt;/qt&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioKIO">
<property name="text">
<string>in an application based on the contents of the URL</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioService">
<property name="text">
<string>in the following application:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="browserCombo">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QRadioButton" name="radioExec">
<property name="text">
<string>with the following command:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="KLineEdit" name="lineExec">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnSelectApplication">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
<widget class="QComboBox" name="browserCombo"/>
</item>
<item>
<spacer>
......@@ -136,62 +44,6 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">KLineEdit</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>radioService</sender>
<signal>toggled(bool)</signal>
<receiver>browserCombo</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>20</x>
<y>20</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>radioExec</sender>
<signal>toggled(bool)</signal>
<receiver>lineExec</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>20</x>
<y>20</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>radioExec</sender>
<signal>toggled(bool)</signal>
<receiver>btnSelectApplication</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>20</x>
<y>20</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>
......@@ -31,15 +31,13 @@ public:
bool isDefaults() const override;
protected Q_SLOTS:
void selectBrowser();
void configChanged();
void selectBrowserApp();
void selectBrowser(int index);
Q_SIGNALS:
void changed(bool);
private:
QString m_browserExec;
KService::Ptr m_browserService;
int m_currentIndex = -1;
int m_falkonIndex = -1;
};
#endif /* COMPONENTCHOOSERBROWSER_H */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment