Accepting request 507552 from KDE:Frameworks5
1 OBS-URL: https://build.opensuse.org/request/show/507552 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/plasma5-workspace?expand=0&rev=68
This commit is contained in:
commit
5c854a962f
182
applauncher-allow-to-show-apps-by-name.patch
Normal file
182
applauncher-allow-to-show-apps-by-name.patch
Normal file
@ -0,0 +1,182 @@
|
||||
From bdaaaedbfbbe72673c288a5acc8a8366d3f6bc1e Mon Sep 17 00:00:00 2001
|
||||
From: Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
Date: Fri, 30 Jun 2017 10:43:38 +0200
|
||||
Subject: [AppLauncher Containment Action] Add option to "show apps by name"
|
||||
|
||||
This will have it show the actual application name instead of the description.
|
||||
|
||||
BUG: 358423
|
||||
FIXED-IN: 5.11.0
|
||||
|
||||
CHANGELOG: Application launcher mouse action can now be configured to show application names instead of their description
|
||||
|
||||
Differential Revision: https://phabricator.kde.org/D6441
|
||||
---
|
||||
containmentactions/applauncher/CMakeLists.txt | 5 +++-
|
||||
containmentactions/applauncher/Messages.sh | 2 ++
|
||||
containmentactions/applauncher/config.ui | 25 ++++++++++++++++
|
||||
containmentactions/applauncher/launch.cpp | 33 +++++++++++++++++++++-
|
||||
containmentactions/applauncher/launch.h | 11 ++++++++
|
||||
.../plasma-containmentactions-applauncher.desktop | 1 +
|
||||
6 files changed, 75 insertions(+), 2 deletions(-)
|
||||
create mode 100755 containmentactions/applauncher/Messages.sh
|
||||
create mode 100644 containmentactions/applauncher/config.ui
|
||||
|
||||
diff --git a/containmentactions/applauncher/CMakeLists.txt b/containmentactions/applauncher/CMakeLists.txt
|
||||
index ead6e81..084ec28 100644
|
||||
--- a/containmentactions/applauncher/CMakeLists.txt
|
||||
+++ b/containmentactions/applauncher/CMakeLists.txt
|
||||
@@ -1,12 +1,15 @@
|
||||
+add_definitions(-DTRANSLATION_DOMAIN=\"plasma_containmentactions_applauncher\")
|
||||
+
|
||||
set(applauncher_SRCS
|
||||
launch.cpp
|
||||
)
|
||||
+ki18n_wrap_ui(applauncher_SRCS config.ui)
|
||||
|
||||
add_library(plasma_containmentactions_applauncher MODULE ${applauncher_SRCS})
|
||||
|
||||
kcoreaddons_desktop_to_json(plasma_containmentactions_applauncher plasma-containmentactions-applauncher.desktop)
|
||||
|
||||
-target_link_libraries(plasma_containmentactions_applauncher KF5::Plasma KF5::KIOCore KF5::KIOWidgets)
|
||||
+target_link_libraries(plasma_containmentactions_applauncher KF5::Plasma KF5::KIOCore KF5::KIOWidgets KF5::I18n)
|
||||
|
||||
install(TARGETS plasma_containmentactions_applauncher DESTINATION ${KDE_INSTALL_PLUGINDIR})
|
||||
install(FILES plasma-containmentactions-applauncher.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
|
||||
diff --git a/containmentactions/applauncher/Messages.sh b/containmentactions/applauncher/Messages.sh
|
||||
new file mode 100755
|
||||
index 0000000..0083c51
|
||||
--- /dev/null
|
||||
+++ b/containmentactions/applauncher/Messages.sh
|
||||
@@ -0,0 +1,2 @@
|
||||
+#! /usr/bin/env bash
|
||||
+$XGETTEXT *.cpp -o $podir/plasma_containmentactions_applauncher.pot
|
||||
diff --git a/containmentactions/applauncher/config.ui b/containmentactions/applauncher/config.ui
|
||||
new file mode 100644
|
||||
index 0000000..d2389ae
|
||||
--- /dev/null
|
||||
+++ b/containmentactions/applauncher/config.ui
|
||||
@@ -0,0 +1,25 @@
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<ui version="4.0">
|
||||
+ <class>Config</class>
|
||||
+ <widget class="QWidget" name="Config">
|
||||
+ <property name="geometry">
|
||||
+ <rect>
|
||||
+ <x>0</x>
|
||||
+ <y>0</y>
|
||||
+ <width>397</width>
|
||||
+ <height>123</height>
|
||||
+ </rect>
|
||||
+ </property>
|
||||
+ <layout class="QVBoxLayout" name="verticalLayout">
|
||||
+ <item>
|
||||
+ <widget class="QCheckBox" name="showAppsByName">
|
||||
+ <property name="text">
|
||||
+ <string>Show applications by name</string>
|
||||
+ </property>
|
||||
+ </widget>
|
||||
+ </item>
|
||||
+ </layout>
|
||||
+ </widget>
|
||||
+ <resources/>
|
||||
+ <connections/>
|
||||
+</ui>
|
||||
diff --git a/containmentactions/applauncher/launch.cpp b/containmentactions/applauncher/launch.cpp
|
||||
index abda409..7ea8ae8 100644
|
||||
--- a/containmentactions/applauncher/launch.cpp
|
||||
+++ b/containmentactions/applauncher/launch.cpp
|
||||
@@ -52,7 +52,13 @@ void AppLauncher::makeMenu(QMenu *menu, const KServiceGroup::Ptr group)
|
||||
foreach (KSycocaEntry::Ptr p, group->entries(true, false, true)) {
|
||||
if (p->isType(KST_KService)) {
|
||||
const KService::Ptr service(static_cast<KService*>(p.data()));
|
||||
- QAction *action = new QAction(QIcon::fromTheme(service->icon()), service->genericName().isEmpty() ? service->name() : service->genericName(), this);
|
||||
+
|
||||
+ QString text = service->name();
|
||||
+ if (!m_showAppsByName && !service->genericName().isEmpty()) {
|
||||
+ text = service->genericName();
|
||||
+ }
|
||||
+
|
||||
+ QAction *action = new QAction(QIcon::fromTheme(service->icon()), text, this);
|
||||
connect(action, &QAction::triggered, [action](){
|
||||
KService::Ptr service = KService::serviceByStorageId(action->data().toString());
|
||||
new KRun(QUrl("file://"+service->entryPath()), 0);
|
||||
@@ -85,6 +91,31 @@ void AppLauncher::makeMenu(QMenu *menu, const KServiceGroup::Ptr group)
|
||||
}
|
||||
}
|
||||
|
||||
+QWidget *AppLauncher::createConfigurationInterface(QWidget *parent)
|
||||
+{
|
||||
+ QWidget *widget = new QWidget(parent);
|
||||
+ m_ui.setupUi(widget);
|
||||
+ widget->setWindowTitle(i18nc("plasma_containmentactions_applauncher", "Configure Application Launcher Plugin"));
|
||||
+
|
||||
+ m_ui.showAppsByName->setChecked(m_showAppsByName);
|
||||
+
|
||||
+ return widget;
|
||||
+}
|
||||
+
|
||||
+void AppLauncher::configurationAccepted()
|
||||
+{
|
||||
+ m_showAppsByName = m_ui.showAppsByName->isChecked();
|
||||
+}
|
||||
+
|
||||
+void AppLauncher::restore(const KConfigGroup &config)
|
||||
+{
|
||||
+ m_showAppsByName = config.readEntry(QStringLiteral("showAppsByName"), false);
|
||||
+}
|
||||
+
|
||||
+void AppLauncher::save(KConfigGroup &config)
|
||||
+{
|
||||
+ config.writeEntry(QStringLiteral("showAppsByName"), m_showAppsByName);
|
||||
+}
|
||||
|
||||
K_EXPORT_PLASMA_CONTAINMENTACTIONS_WITH_JSON(applauncher, AppLauncher, "plasma-containmentactions-applauncher.json")
|
||||
|
||||
diff --git a/containmentactions/applauncher/launch.h b/containmentactions/applauncher/launch.h
|
||||
index 4738c89..95b5123 100644
|
||||
--- a/containmentactions/applauncher/launch.h
|
||||
+++ b/containmentactions/applauncher/launch.h
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#include <plasma/containmentactions.h>
|
||||
|
||||
+#include "ui_config.h"
|
||||
+
|
||||
class QAction;
|
||||
class QMenu;
|
||||
|
||||
@@ -40,12 +42,21 @@ class AppLauncher : public Plasma::ContainmentActions
|
||||
|
||||
QList<QAction*> contextualActions() override;
|
||||
|
||||
+ QWidget *createConfigurationInterface(QWidget* parent) override;
|
||||
+ void configurationAccepted() override;
|
||||
+
|
||||
+ void restore(const KConfigGroup &config) override;
|
||||
+ void save(KConfigGroup &config) override;
|
||||
+
|
||||
protected:
|
||||
void makeMenu(QMenu *menu, const KServiceGroup::Ptr group);
|
||||
|
||||
private:
|
||||
KServiceGroup::Ptr m_group;
|
||||
QList<QAction *> m_actions;
|
||||
+
|
||||
+ Ui::Config m_ui;
|
||||
+ bool m_showAppsByName = false;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/containmentactions/applauncher/plasma-containmentactions-applauncher.desktop b/containmentactions/applauncher/plasma-containmentactions-applauncher.desktop
|
||||
index b5112c8..5d955cf 100644
|
||||
--- a/containmentactions/applauncher/plasma-containmentactions-applauncher.desktop
|
||||
+++ b/containmentactions/applauncher/plasma-containmentactions-applauncher.desktop
|
||||
@@ -165,3 +165,4 @@ X-KDE-PluginInfo-Depends=
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
||||
|
||||
+X-Plasma-HasConfigurationInterface=true
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c2618cebc922efe95d231a7064286c869c0f355378538f2accdc09ede2b80187
|
||||
size 6954252
|
3
plasma-workspace-5.10.3.tar.xz
Normal file
3
plasma-workspace-5.10.3.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:69d7513ad0ba0acc224cd0dee824795c20e8733f52704e3cf3dca5f6ae6cdf71
|
||||
size 6994932
|
@ -1,3 +1,37 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 1 10:48:32 UTC 2017 - wbauer@tmo.at
|
||||
|
||||
- Add applauncher-allow-to-show-apps-by-name.patch to provide an
|
||||
option to display application names instead of the generic names
|
||||
in the desktop containment's application launcher mouse action
|
||||
(kde#358423, boo#974513)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 28 20:57:32 UTC 2017 - wbauer@tmo.at
|
||||
|
||||
- Delete org.kde.plasma.Notifications.service, this causes problem
|
||||
for KDE applications when they are being run on a different
|
||||
desktop or remotely via ssh (boo#1046458)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 27 17:50:56 CEST 2017 - fabian@ritter-vogt.de
|
||||
|
||||
- Update to 5.10.3
|
||||
* New bugfix release
|
||||
* For more details please see:
|
||||
* https://www.kde.org/announcements/plasma-5.10.3.php
|
||||
- Changes since 5.10.2:
|
||||
* [xembedsniproxy] Free windowAttributes in every case
|
||||
* Use KRun::runApplication when possible; split out and share more code.
|
||||
* Use KRun::runApplication, add missing KActivities::notifyAccessed calls. (kde#381500)
|
||||
* [AppMenu Applet] Workaround Connections bug in Qt >= 5.8 (kde#375535)
|
||||
* [AppMenu Applet] Wire up DBusMenuImporter::actionActivationRequested (kde#376726)
|
||||
* fix attachment signals
|
||||
* [xembedsniproxy] Fix memleak and possible crash
|
||||
- Remove patches, now upstream:
|
||||
* xembedsniproxy-fix-possible-crash.patch
|
||||
- Use %kf5_find_htmldocs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 17 17:36:55 UTC 2017 - wbauer@tmo.at
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
%bcond_without lang
|
||||
Name: plasma5-workspace
|
||||
Version: 5.10.2
|
||||
Version: 5.10.3
|
||||
Release: 0
|
||||
# Full Plasma 5 version (e.g. 5.9.1)
|
||||
%{!?_plasma5_bugfix: %global _plasma5_bugfix %{version}}
|
||||
@ -37,8 +37,8 @@ Patch0: 0001-Rename-qdbus-in-startkde.patch
|
||||
# PATCH-FIX-OPENSUSE 0001-Ignore-default-sddm-face-icons.patch boo#1001364 fabian@ritter-vogt.de -- Ignore default sddm face icons
|
||||
Patch1: 0001-Ignore-default-sddm-face-icons.patch
|
||||
# PATCHES 100-200 and above are from upstream 5.10 branch
|
||||
Patch100: xembedsniproxy-fix-possible-crash.patch
|
||||
# PATCHES 201-300 and above are from upstream master/5.11 branch
|
||||
Patch201: applauncher-allow-to-show-apps-by-name.patch
|
||||
BuildRequires: breeze5-icons
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: kf5-filesystem
|
||||
@ -210,7 +210,7 @@ workspace. Development files.
|
||||
%setup -q -n plasma-workspace-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch100 -p1
|
||||
%patch201 -p1
|
||||
|
||||
%build
|
||||
%cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
|
||||
@ -220,6 +220,7 @@ workspace. Development files.
|
||||
%kf5_makeinstall -C build
|
||||
%if %{with lang}
|
||||
%kf5_find_lang
|
||||
%kf5_find_htmldocs
|
||||
%endif
|
||||
install -p -D -m755 drkonqi/doc/examples/installdbgsymbols_suse.sh \
|
||||
%{buildroot}/usr/bin/installdbgsymbols.sh
|
||||
@ -232,6 +233,9 @@ workspace. Development files.
|
||||
# we have a separate package for Plasma5 session
|
||||
rm -rfv %{buildroot}%{_kf5_sharedir}/xsessions
|
||||
rm -rfv %{buildroot}%{_kf5_sharedir}/wayland-sessions
|
||||
# this causes problem for KDE applications when they are being run on a different desktop or remotely via ssh (boo#1046458)
|
||||
# can be removed when https://bugs.kde.org/show_bug.cgi?id=380974 is resolved
|
||||
rm %{buildroot}%{_kf5_sharedir}/dbus-1/services/org.kde.plasma.Notifications.service
|
||||
%fdupes %{buildroot}/%{_prefix}
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
@ -295,7 +299,7 @@ workspace. Development files.
|
||||
%{_kf5_configkcfgdir}/freespacenotifier.kcfg
|
||||
%{_kf5_sharedir}/dbus-1/services/kf5_org.kde.kuiserver.service
|
||||
%{_kf5_sharedir}/dbus-1/services/org.kde.krunner.service
|
||||
%{_kf5_sharedir}/dbus-1/services/org.kde.plasma.Notifications.service
|
||||
#{_kf5_sharedir}/dbus-1/services/org.kde.plasma.Notifications.service
|
||||
%{_kf5_sharedir}/desktop-directories/
|
||||
%{_kf5_sharedir}/kconf_update/
|
||||
%dir %{_kf5_htmldir}
|
||||
@ -344,7 +348,6 @@ workspace. Development files.
|
||||
|
||||
%if %{with lang}
|
||||
%files lang -f %{name}.lang
|
||||
%doc %lang(de) %{_kf5_htmldir}/de/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
@ -1,33 +0,0 @@
|
||||
From a17de5957d4ba0f07c77fa99860c9046ff8aa1be Mon Sep 17 00:00:00 2001
|
||||
From: Wolfgang Bauer <wbauer@tmo.at>
|
||||
Date: Sat, 17 Jun 2017 19:19:40 +0200
|
||||
Subject: [xembedsniproxy] Fix memleak and possible crash
|
||||
|
||||
Check the return value of xcb_get_window_attributes_reply() to prevent a crash if getting the window attributes would fail for some reason.
|
||||
|
||||
Also free the returned structure after usage to avoid memleaks.
|
||||
This is necessary according to https://xcb.freedesktop.org/windowcontextandmanipulation (see the end of the page).
|
||||
|
||||
Differential Revision: https://phabricator.kde.org/D6252
|
||||
---
|
||||
xembed-sni-proxy/sniproxy.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xembed-sni-proxy/sniproxy.cpp b/xembed-sni-proxy/sniproxy.cpp
|
||||
index 5974baf..b2f64fb 100644
|
||||
--- a/xembed-sni-proxy/sniproxy.cpp
|
||||
+++ b/xembed-sni-proxy/sniproxy.cpp
|
||||
@@ -209,8 +209,9 @@ SNIProxy::SNIProxy(xcb_window_t wid, QObject* parent):
|
||||
//if the client does supports that we send directly, otherwise we'll use xtest
|
||||
auto waCookie = xcb_get_window_attributes(c, wid);
|
||||
auto windowAttributes = xcb_get_window_attributes_reply(c, waCookie, nullptr);
|
||||
- if (! (windowAttributes->all_event_masks & XCB_EVENT_MASK_BUTTON_PRESS)) {
|
||||
+ if (windowAttributes && ! (windowAttributes->all_event_masks & XCB_EVENT_MASK_BUTTON_PRESS)) {
|
||||
m_injectMode = XTest;
|
||||
+ free(windowAttributes);
|
||||
}
|
||||
|
||||
//there's no damage event for the first paint, and sometimes it's not drawn immediately
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user