diff options
author | Mavridis Philippe <[email protected]> | 2023-12-21 17:32:43 +0200 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2023-12-25 17:35:38 +0200 |
commit | 94cec968a8bdb4c51fe68c814b1d864fe887e65e (patch) | |
tree | c0b01bd3ea80f9484c8e1273f73e6ffb3b9830b7 /kxkb/kxkbtraywindow.cpp | |
parent | c55cad68e9f36ddbf028f3bbf2674861057905a3 (diff) | |
download | tdebase-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.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++; |