diff options
author | Weblate <noreply@weblate.org> | 2017-09-20 13:42:32 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-09-20 13:42:32 +0000 |
commit | a4fd58c9aae62207b131a13cc13187970495bdb5 (patch) | |
tree | cdabc3a0816c41f6f2a6f5191f3e38f698595c13 /src-qt5/core/lumina-desktop/panel-plugins/taskmanager | |
parent | Translated using Weblate (Lithuanian) (diff) | |
parent | Streamline a bit more of the new Lumina2 window embed functionality. (diff) | |
download | lumina-a4fd58c9aae62207b131a13cc13187970495bdb5.tar.gz lumina-a4fd58c9aae62207b131a13cc13187970495bdb5.tar.bz2 lumina-a4fd58c9aae62207b131a13cc13187970495bdb5.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/taskmanager')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | 7 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h | 13 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp index ab4e786f..8f867261 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp @@ -30,7 +30,7 @@ LTaskButton::LTaskButton(QWidget *parent, bool smallDisplay) : LTBWidget(parent) } LTaskButton::~LTaskButton(){ - + } //=========== @@ -81,11 +81,12 @@ LWinInfo LTaskButton::currentWindow(){ //============= // PUBLIC SLOTS //============= + void LTaskButton::UpdateButton(){ if(winMenu->isVisible()){ return; } //skip this if the window menu is currently visible for now bool statusOnly = (WINLIST.length() == LWINLIST.length()); LWINLIST = WINLIST; - + winMenu->clear(); LXCB::WINDOWVISIBILITY showstate = LXCB::IGNORE; for(int i=0; i<WINLIST.length(); i++){ @@ -98,7 +99,7 @@ void LTaskButton::UpdateButton(){ //Update the button visuals from the first window this->setIcon(WINLIST[i].icon(noicon)); cname = WINLIST[i].Class(); - if(cname.isEmpty()){ + if(cname.isEmpty()){ //Special case (chrome/chromium does not register *any* information with X except window title) cname = WINLIST[i].text(); if(cname.contains(" - ")){ cname = cname.section(" - ",-1); } diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h index 6b171c6a..ff551998 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h @@ -15,6 +15,7 @@ #include <QMenu> #include <QEvent> #include <QAction> +#include <QTimer> // libLumina includes #include <LuminaXDG.h> @@ -29,7 +30,7 @@ class LTaskButton : public LTBWidget{ public: LTaskButton(QWidget *parent=0, bool smallDisplay = true); ~LTaskButton(); - + //Window Information QList<WId> windows(); QString classname(); @@ -56,6 +57,7 @@ public slots: void UpdateMenus(); //re-create the menus (text + icons) private slots: + void buttonClicked(); void closeWindow(); //send the signal to close a window void maximizeWindow(); //send the signal to maximize/restore a window @@ -66,7 +68,14 @@ private slots: void triggerWindow(); //change b/w visible and invisible void winClicked(QAction*); void openActionMenu(); - +protected: + void changeEvent(QEvent *ev){ + LTBWidget::changeEvent(ev); + QEvent::Type tmp = ev->type(); + if(tmp==QEvent::ThemeChange || tmp==QEvent::LanguageChange || tmp==QEvent::LocaleChange){ + QTimer::singleShot(qrand()%100+500, this, SLOT(UpdateButton()) ); + } + } signals: void MenuClosed(); }; |