From a51daca2bf519448c9039ec68c3ecfb92a82a1adf12be7d19944d6d24184019e Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sun, 28 Sep 2014 18:48:52 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=24 --- 0002-Fix-NotificationPopup-size.patch | 37 +++++++++ ...-title-if-Status-Notifier-Item-does-.patch | 78 +++++++++++++++++++ plasma5-workspace.changes | 4 + plasma5-workspace.spec | 7 ++ 4 files changed, 126 insertions(+) create mode 100644 0002-Fix-NotificationPopup-size.patch create mode 100644 0004-Show-application-title-if-Status-Notifier-Item-does-.patch diff --git a/0002-Fix-NotificationPopup-size.patch b/0002-Fix-NotificationPopup-size.patch new file mode 100644 index 0000000..289f025 --- /dev/null +++ b/0002-Fix-NotificationPopup-size.patch @@ -0,0 +1,37 @@ +From 268c1d250fad9421c1787355a2b6fae4e8d1ef2a Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Sat, 27 Sep 2014 21:32:17 +0200 +Subject: [PATCH 2/5] Fix NotificationPopup size + +REVIEW: 120390 +--- + applets/notifications/package/contents/ui/NotificationPopup.qml | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/applets/notifications/package/contents/ui/NotificationPopup.qml b/applets/notifications/package/contents/ui/NotificationPopup.qml +index 63036f1..26c7ed2 100644 +--- a/applets/notifications/package/contents/ui/NotificationPopup.qml ++++ b/applets/notifications/package/contents/ui/NotificationPopup.qml +@@ -18,6 +18,8 @@ + */ + + import QtQuick 2.0 ++import QtQuick.Layouts 1.1 ++ + import org.kde.plasma.core 2.0 as PlasmaCore + import org.kde.plasma.components 2.0 as PlasmaComponents + import org.kde.plasma.extras 2.0 as PlasmaExtras +@@ -57,8 +59,8 @@ PlasmaCore.Dialog { + + mainItem: MouseEventListener { + id: root +- height: Math.max(actionsColumn.height + closeButton.height + (3 * units.smallSpacing), (4.5 * units.gridUnit)) +- width: Math.round(23 * units.gridUnit) ++ Layout.minimumWidth: Math.round(23 * units.gridUnit) ++ Layout.minimumHeight: Math.max(actionsColumn.height + closeButton.height + (3 * units.smallSpacing), (4.5 * units.gridUnit)) + + state: "controlsHidden" + hoverEnabled: true +-- +2.1.0 + diff --git a/0004-Show-application-title-if-Status-Notifier-Item-does-.patch b/0004-Show-application-title-if-Status-Notifier-Item-does-.patch new file mode 100644 index 0000000..8599244 --- /dev/null +++ b/0004-Show-application-title-if-Status-Notifier-Item-does-.patch @@ -0,0 +1,78 @@ +From 909f1f1ad82248aea6581f8b6576675877ea18b5 Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Sun, 28 Sep 2014 19:41:15 +0200 +Subject: [PATCH 4/5] Show application title if Status Notifier Item does not + provide a tooltip + +A custom tooltip text is not mandated by the SNI spec. Instead, we just show +the application name and icon if none is given. +This fixes Steam not having a tooltip and restores Plasma 4.x behavior. + +REVIEW: 120407 +BUG: 337710 +FIXED-IN: 5.1 +--- + .../dbussystemtray/dbussystemtraytask.cpp | 42 ++++++++++++++++------ + 1 file changed, 31 insertions(+), 11 deletions(-) + +diff --git a/applets/systemtray/plugin/protocols/dbussystemtray/dbussystemtraytask.cpp b/applets/systemtray/plugin/protocols/dbussystemtray/dbussystemtraytask.cpp +index 14458e9..f878ffd 100644 +--- a/applets/systemtray/plugin/protocols/dbussystemtray/dbussystemtraytask.cpp ++++ b/applets/systemtray/plugin/protocols/dbussystemtray/dbussystemtraytask.cpp +@@ -420,22 +420,42 @@ void DBusSystemTrayTask::syncIcons(const Plasma::DataEngine::Data &properties) + + void DBusSystemTrayTask::syncToolTip(const QString &title, const QString &subTitle, const QIcon &toolTipIcon) + { +- if (title != m_tooltipTitle) { +- m_tooltipTitle = title; +- emit changedTooltipTitle(); +- } ++ if (title.isEmpty() && subTitle.isEmpty()) { ++ // if empty tooltip use application name as fallback ++ if (m_tooltipTitle != name()) { ++ m_tooltipTitle = name(); ++ emit changedTooltipTitle(); ++ } ++ ++ if (!m_tooltipText.isEmpty()) { ++ m_tooltipText.clear(); ++ emit changedTooltipText(); ++ } ++ } else { ++ if (title != m_tooltipTitle) { ++ m_tooltipTitle = title; ++ emit changedTooltipTitle(); ++ } + +- if (subTitle != m_tooltipText) { +- m_tooltipText = subTitle; +- emit changedTooltipText(); ++ if (subTitle != m_tooltipText) { ++ m_tooltipText = subTitle; ++ emit changedTooltipText(); ++ } + } + +- bool is_icon_name_changed = (m_tooltipIcon.name() != toolTipIcon.name()); ++ bool iconNameChanged = false; + +- m_tooltipIcon = toolTipIcon; +- emit changedTooltip(); ++ if (toolTipIcon.isNull()) { ++ iconNameChanged = m_tooltipIcon.name() != m_icon.name(); ++ m_tooltipIcon = m_icon; ++ } else { ++ iconNameChanged = m_tooltipIcon.name() != toolTipIcon.name(); ++ m_tooltipIcon = toolTipIcon; ++ emit changedTooltip(); ++ } + +- if (is_icon_name_changed) { ++ emit changedTooltip(); ++ if (iconNameChanged) { + emit changedTooltipIconName(); + } + } +-- +2.1.0 + diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index 35ed1e8..7533cb6 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -8,6 +8,10 @@ Fri Sep 26 09:20:21 UTC 2014 - hrvoje.senjan@gmail.com find_lang macro as it doesn't searches in subdirectories - Swap wallpaper.diff for 0001-take-the-proper-default-at-first-start.patch it is a simpler solution (kde#339216, kde#339414) +- Add 0002-Fix-NotificationPopup-size.patch: fixes notifications + with latest plasma-framework +- Add 0004-Show-application-title-if-Status-Notifier-Item-does-.patch: + show the application name and icon if none is given. kde#337710 ------------------------------------------------------------------- Tue Sep 23 20:24:35 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index 5fa7a3d..b03af66 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -34,6 +34,11 @@ Patch1: create_kdehome.patch Patch2: 0003-Remove-export-of-QT_PLUGIN_PATH.patch # PATCH-FIX_UPSTREAM 0001-take-the-proper-default-at-first-start.patch -- kde#339216, kde#339414 Patch3: 0001-take-the-proper-default-at-first-start.patch +# PATCHES 100-200 are taken from upstream +# PATCH-FIX_UPSTREAM 0002-Fix-NotificationPopup-size.patch +Patch100: 0002-Fix-NotificationPopup-size.patch +# PATCH-FIX_UPSTREAM 0004-Show-application-title-if-Status-Notifier-Item-does-.patch +Patch101: 0004-Show-application-title-if-Status-Notifier-Item-does-.patch BuildRequires: alsa-devel BuildRequires: baloo5-devel >= 5.0.0 BuildRequires: kactivities5-devel >= 5.0.0 @@ -175,6 +180,8 @@ workspace. Development files. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch100 -p1 +%patch101 -p1 %build %cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5