diff options
author | Mavridis Philippe <[email protected]> | 2023-12-21 17:32:43 +0200 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2023-12-25 16:38:10 +0200 |
commit | 9647d4c7ff182c1fadffb9c6218bc00132fe682e (patch) | |
tree | 2628ae8b408bc1ee90d4fbbfec35b023ee94bbd7 /kxkb/kxkbtraywindow.cpp | |
parent | f2dbf5b9035e9a4861b7d0ad348f4f86c4caba03 (diff) | |
download | tdebase-9647d4c7ff182c1fadffb9c6218bc00132fe682e.tar.gz tdebase-9647d4c7ff182c1fadffb9c6218bc00132fe682e.zip |
Kxkb: move LayoutUnit struct into its own file and add getLayoutName function
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'kxkb/kxkbtraywindow.cpp')
-rw-r--r-- | kxkb/kxkbtraywindow.cpp | 14 |
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++; |