aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-12-15 22:52:34 +0000
committerWeblate <noreply@weblate.org>2017-12-15 22:52:34 +0000
commit9155556b94b0fe25ef3d5398a7f70dcdc1841d69 (patch)
treeae5af06e4741c8767344be6d90a7307bcddb5b5d /src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
parentTranslated using Weblate (Russian) (diff)
parentAnother minor networking fix. (diff)
downloadlumina-9155556b94b0fe25ef3d5398a7f70dcdc1841d69.tar.gz
lumina-9155556b94b0fe25ef3d5398a7f70dcdc1841d69.tar.bz2
lumina-9155556b94b0fe25ef3d5398a7f70dcdc1841d69.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
index 8e0a9d28..294b37be 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
@@ -14,9 +14,9 @@ LDesktopSwitcher::LDesktopSwitcher(QWidget *parent, QString id, bool horizontal)
label = new QToolButton(this);
label->setPopupMode(QToolButton::DelayedPopup);
label->setAutoRaise(true);
- label->setToolButtonStyle(Qt::ToolButtonIconOnly);
+ label->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
label->setIcon( LXDG::findIcon("format-view-carousel", "preferences-desktop-display") );
- label->setToolTip(QString("Workspace 1"));
+ label->setToolTip(QString(tr("Workspace 1")));
connect(label, SIGNAL(clicked()), this, SLOT(openMenu()));
menu = new QMenu(this);
connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(menuActionTriggered(QAction*)));
@@ -44,7 +44,7 @@ void LDesktopSwitcher::setNumberOfDesktops(int number) {
Atom atom = XInternAtom(display, "_NET_NUMBER_OF_DESKTOPS", False);
XEvent xevent;
xevent.type = ClientMessage;
- xevent.xclient.type = ClientMessage;
+ xevent.xclient.type = ClientMessage;
xevent.xclient.display = display;
xevent.xclient.window = rootWindow;
xevent.xclient.message_type = atom;
@@ -129,7 +129,7 @@ void LDesktopSwitcher::createMenu() {
int cur = LSession::handle()->XCB->CurrentWorkspace(); //current desktop number
int tot = LSession::handle()->XCB->NumberOfWorkspaces(); //total number of desktops
//qDebug() << "-- vor getCurrentDesktop SWITCH";
- qDebug() << "Virtual Desktops:" << tot << cur;
+ //qDebug() << "Virtual Desktops:" << tot << cur;
menu->clear();
for (int i = 0; i < tot; i++) {
QString name = QString(tr("Workspace %1")).arg( QString::number(i+1) );
@@ -137,6 +137,7 @@ void LDesktopSwitcher::createMenu() {
menu->addAction(newAction(i, name));
}
label->setToolTip(QString(tr("Workspace %1")).arg(QString::number(cur + 1)));
+ label->setText( QString::number(cur+1) );
}
void LDesktopSwitcher::menuActionTriggered(QAction* act) {
bgstack15