From b769b53cb781b8f5f51de297ce5465a9e0045e3e Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sun, 24 Mar 2013 13:33:27 +0100 Subject: [PATCH 1/3] SVN_SILENT made messages (.desktop file) --- tabbox/qml/clients/window_strip/metadata.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabbox/qml/clients/window_strip/metadata.desktop b/tabbox/qml/clients/window_strip/metadata.desktop index 6413082721..2d35c61077 100644 --- a/tabbox/qml/clients/window_strip/metadata.desktop +++ b/tabbox/qml/clients/window_strip/metadata.desktop @@ -57,7 +57,7 @@ Comment[it]=Disposizione di cambiafinestre per Plasma Active Comment[kk]=Plasma Activt-тың терезе ауыстырғышының қалыпы Comment[km]=ប្លង់​កម្មវិធី​ប្ដូរ​បង្អួជ​សម្រាប់​ប្លាស្មា​សកម្ម Comment[ko]=Plasma Active 창 전환기 레이아웃 -Comment[mr]=प्लाज्मा एक्टीव्ह करिता चौकट बदल रचना +Comment[mr]=प्लाज्मा एक्टिव्ह करिता चौकट बदल रचना Comment[nb]=Vindusbytterutforming for Plasma Active Comment[nl]=Indeling van de vensterwisselaar voor Plasma Active Comment[pa]=ਪਲਾਜ਼ਮਾ ਐਕਟਿਵ ਲਈ ਵਿੰਡੋ ਸਵਿੱਚਰ ਲੇਆਉਟ From c43c6f39cfb2a230597abace25e123210573e32e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 3 Mar 2013 21:46:43 +0100 Subject: [PATCH 2/3] fix aurorae theme loading I've no real idea what breaks the theme -> qml assignment but the patch re/creates the theme object (just as the engine and component) with the theme BUG: 316033 FIXED-IN: 4.10.2 REVIEW: 109273 --- clients/aurorae/src/aurorae.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp index ccbb1cb6eb..ef0ad112b6 100644 --- a/clients/aurorae/src/aurorae.cpp +++ b/clients/aurorae/src/aurorae.cpp @@ -159,11 +159,8 @@ bool AuroraeFactory::reset(unsigned long changed) const QString themeName = group.readEntry("ThemeName", "example-deco"); const KConfig config("aurorae/themes/" + themeName + '/' + themeName + "rc", KConfig::FullConfig, "data"); const KConfigGroup themeGroup(&conf, themeName); - if (themeName != m_theme->themeName()) { - delete m_engine; - m_engine = new QDeclarativeEngine(this); - delete m_component; - m_component = new QDeclarativeComponent(m_engine, this); + if (themeName != m_themeName) { + m_engine->clearComponentCache(); init(); // recreate all decorations return true; From f6bad91b172eba790a31b3060cd0a526aedea858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 24 Mar 2013 21:57:26 +0100 Subject: [PATCH 3/3] use QWidgetAction for activity setting in alt+f3 not that i really like using QWidgetAction, but it'll prevent the popup from autoclosing. Introduce activityUpdateBlocking to prevent users from removing the popup under their fingertips BUG: 283309 FIXED-IN: 4.10.2 REVIEW: 107762 --- client.cpp | 23 +++++++++++++++++++---- client.h | 3 +++ useractions.cpp | 29 ++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 9 deletions(-) diff --git a/client.cpp b/client.cpp index e16a1fe7e4..a694cdd426 100644 --- a/client.cpp +++ b/client.cpp @@ -97,6 +97,8 @@ Client::Client(Workspace* ws) , wrapper(None) , decoration(NULL) , bridge(new Bridge(this)) + , m_activityUpdatesBlocked(false) + , m_blockedActivityUpdatesRequireTransients(false) , move_resize_grab_window(None) , move_resize_has_keyboard_grab(false) , m_managed(false) @@ -1548,15 +1550,28 @@ void Client::setOnActivities(QStringList newActivitiesList) updateActivities(false); } +void Client::blockActivityUpdates(bool b) +{ + if (b) { + ++m_activityUpdatesBlocked; + } else { + Q_ASSERT(m_activityUpdatesBlocked); + --m_activityUpdatesBlocked; + if (!m_activityUpdatesBlocked) + updateActivities(m_blockedActivityUpdatesRequireTransients); + } +} + /** * update after activities changed */ void Client::updateActivities(bool includeTransients) { - /* FIXME do I need this? - if ( decoration != NULL ) - decoration->desktopChange(); - */ + if (m_activityUpdatesBlocked) { + m_blockedActivityUpdatesRequireTransients |= includeTransients; + return; + } + m_blockedActivityUpdatesRequireTransients = false; // reset if (includeTransients) workspace()->updateOnAllActivitiesOfTransients(this); workspace()->updateFocusChains(this, Workspace::FocusChainMakeFirst); diff --git a/client.h b/client.h index 663fa3cb59..f020d8cf31 100644 --- a/client.h +++ b/client.h @@ -363,6 +363,7 @@ public: void setOnAllActivities(bool set); void setOnActivities(QStringList newActivitiesList); void updateActivities(bool includeTransients); + void blockActivityUpdates(bool b = true); /// Is not minimized and not hidden. I.e. normally visible on some virtual desktop. bool isShown(bool shaded_is_shown) const; @@ -842,6 +843,8 @@ private: Bridge* bridge; int desk; QStringList activityList; + int m_activityUpdatesBlocked; + bool m_blockedActivityUpdatesRequireTransients; bool buttonDown; bool moveResizeMode; Window move_resize_grab_window; diff --git a/useractions.cpp b/useractions.cpp index 7fa2225484..c4e27e16df 100755 --- a/useractions.cpp +++ b/useractions.cpp @@ -52,8 +52,8 @@ along with this program. If not, see . #include #endif #include +#include #include -#include #include #include @@ -164,9 +164,14 @@ void UserActionsMenu::show(const QRect &pos, const QWeakPointer &cl) Workspace *ws = Workspace::self(); int x = pos.left(); int y = pos.bottom(); - if (y == pos.top()) + if (y == pos.top()) { + m_client.data()->blockActivityUpdates(true); m_menu->exec(QPoint(x, y)); + if (!m_client.isNull()) + m_client.data()->blockActivityUpdates(false); + } else { + m_client.data()->blockActivityUpdates(true); QRect area = ws->clientArea(ScreenArea, QPoint(x, y), ws->currentDesktop()); menuAboutToShow(); // needed for sizeHint() to be correct :-/ int popupHeight = m_menu->sizeHint().height(); @@ -174,6 +179,8 @@ void UserActionsMenu::show(const QRect &pos, const QWeakPointer &cl) m_menu->exec(QPoint(x, y)); else m_menu->exec(QPoint(x, pos.top() - popupHeight)); + if (!m_client.isNull()) + m_client.data()->blockActivityUpdates(true); } } @@ -718,13 +725,22 @@ void UserActionsMenu::activityPopupAboutToShow() KActivities::Info activity(id); QString name = activity.name(); name.replace('&', "&&"); - action = m_activityMenu->addAction(KIcon(activity.icon()), name); + QWidgetAction *action = new QWidgetAction(m_activityMenu); + QCheckBox *box = new QCheckBox(name, m_activityMenu); + action->setDefaultWidget(box); + const QString icon = activity.icon(); + if (!icon.isEmpty()) + box->setIcon(KIcon(icon)); + box->setBackgroundRole(m_activityMenu->backgroundRole()); + box->setForegroundRole(m_activityMenu->foregroundRole()); + box->setPalette(m_activityMenu->palette()); + connect (box, SIGNAL(clicked(bool)), action, SIGNAL(triggered(bool))); + m_activityMenu->addAction(action); action->setData(id); - action->setCheckable(true); if (!m_client.isNull() && !m_client.data()->isOnAllActivities() && m_client.data()->isOnActivity(id)) - action->setChecked(true); + box->setChecked(true); } #endif } @@ -799,6 +815,9 @@ void UserActionsMenu::slotToggleOnActivity(QAction *action) } Workspace::self()->toggleClientOnActivity(m_client.data(), activity, false); + if (m_activityMenu && m_activityMenu->isVisible() && m_activityMenu->actions().count()) { + m_activityMenu->actions().at(0)->setChecked(m_client.data()->isOnAllActivities()); + } } //****************************************