summaryrefslogtreecommitdiffstats
path: root/kxkb/kxkbtraywindow.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2023-12-21 17:32:43 +0200
committerMavridis Philippe <[email protected]>2023-12-25 17:35:38 +0200
commit94cec968a8bdb4c51fe68c814b1d864fe887e65e (patch)
treec0b01bd3ea80f9484c8e1273f73e6ffb3b9830b7 /kxkb/kxkbtraywindow.cpp
parentc55cad68e9f36ddbf028f3bbf2674861057905a3 (diff)
downloadtdebase-94cec968a8bdb4c51fe68c814b1d864fe887e65e.tar.gz
tdebase-94cec968a8bdb4c51fe68c814b1d864fe887e65e.zip
Kxkb: move LayoutUnit struct into its own file and add getLayoutName function
Signed-off-by: Mavridis Philippe <[email protected]> (cherry picked from commit 9647d4c7ff182c1fadffb9c6218bc00132fe682e)
Diffstat (limited to 'kxkb/kxkbtraywindow.cpp')
-rw-r--r--kxkb/kxkbtraywindow.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/kxkb/kxkbtraywindow.cpp b/kxkb/kxkbtraywindow.cpp
index 46b03da15..d84c529c6 100644
--- a/kxkb/kxkbtraywindow.cpp
+++ b/kxkb/kxkbtraywindow.cpp
@@ -90,13 +90,15 @@ void KxkbLabelController::initLayoutList(const TQValueList<LayoutUnit>& layouts,
const TQString layoutName = (*it).layout;
const TQString variantName = (*it).variant;
- const TQPixmap& layoutPixmap = LayoutIcon::getInstance().findPixmap(layoutName, PIXMAP_STYLE_CONTEXTMENU, (*it).displayName);
- const TQPixmap pix = iconeffect.apply(layoutPixmap, TDEIcon::Small, TDEIcon::DefaultState);
+ const TQPixmap& layoutPixmap = LayoutIcon::getInstance().findPixmap(
+ (*it).layout, PIXMAP_STYLE_CONTEXTMENU, (*it).displayName);
+ const TQPixmap pix = iconeffect.apply(layoutPixmap, TDEIcon::Small,
+ TDEIcon::DefaultState);
+
+ TQString fullName = rules.getLayoutName((*it));
+ contextMenu->insertItem(pix, fullName, START_MENU_ID + cnt,
+ m_menuStartIndex + cnt);
- TQString fullName = i18n((rules.layouts()[layoutName]));
- if( variantName.isEmpty() == false )
- fullName += " (" + variantName + ")";
- contextMenu->insertItem(pix, fullName, START_MENU_ID + cnt, m_menuStartIndex + cnt);
m_descriptionMap.insert((*it).toPair(), fullName);
cnt++;