diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-05-01 15:14:43 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-05-16 15:59:46 +0300 |
commit | eff93621daf43e9a7d3672175a6503a633e9d4a0 (patch) | |
tree | 640e746cab9a3a8eb19a8e9082b7e70d574b18b3 /kxkb/kxkbtraywindow.cpp | |
parent | bbdeb170a48b469e1b0d2005141fa61a58fb71f1 (diff) | |
download | tdebase-eff93621daf43e9a7d3672175a6503a633e9d4a0.tar.gz tdebase-eff93621daf43e9a7d3672175a6503a633e9d4a0.zip |
Added customization options for Kxkb
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'kxkb/kxkbtraywindow.cpp')
-rw-r--r-- | kxkb/kxkbtraywindow.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kxkb/kxkbtraywindow.cpp b/kxkb/kxkbtraywindow.cpp index ec91df670..46b03da15 100644 --- a/kxkb/kxkbtraywindow.cpp +++ b/kxkb/kxkbtraywindow.cpp @@ -1,7 +1,7 @@ // // C++ Implementation: kxkbtraywindow // -// Description: +// Description: // // // Author: Andriy Rysin <rysin@kde.org>, (C) 2006 @@ -25,7 +25,7 @@ #include "kxkbconfig.h" -KxkbLabelController::KxkbLabelController(TQLabel* label_, TQPopupMenu* contextMenu_) : +KxkbLabelController::KxkbLabelController(TQLabel* label_, TDEPopupMenu* contextMenu_) : label(label_), contextMenu(contextMenu_), m_menuStartIndex(contextMenu_->count()), @@ -51,7 +51,7 @@ void KxkbLabelController::setPixmap(const TQPixmap& pixmap) void KxkbLabelController::setCurrentLayout(const LayoutUnit& layoutUnit) { setToolTip(m_descriptionMap[layoutUnit.toPair()]); - setPixmap( LayoutIcon::getInstance().findPixmap(layoutUnit.layout, m_showFlag, layoutUnit.displayName) ); + setPixmap( LayoutIcon::getInstance().findPixmap(layoutUnit.layout, PIXMAP_STYLE_INDICATOR, layoutUnit.displayName) ); } @@ -60,14 +60,14 @@ void KxkbLabelController::setError(const TQString& layoutInfo) TQString msg = i18n("Error changing keyboard layout to '%1'").arg(layoutInfo); setToolTip(msg); - label->setPixmap(LayoutIcon::getInstance().findPixmap("error", m_showFlag)); + label->setPixmap(LayoutIcon::getInstance().findPixmap("error", PIXMAP_STYLE_NORMAL)); } void KxkbLabelController::initLayoutList(const TQValueList<LayoutUnit>& layouts, const XkbRules& rules) { -// TDEPopupMenu* menu = contextMenu(); - TQPopupMenu* menu = contextMenu; + TDEPopupMenu* menu = contextMenu; +// TQPopupMenu* menu = contextMenu; // int index = menu->indexOf(0); m_descriptionMap.clear(); @@ -80,30 +80,30 @@ void KxkbLabelController::initLayoutList(const TQValueList<LayoutUnit>& layouts, } /* menu->removeItem(CONFIG_MENU_ID); menu->removeItem(HELP_MENU_ID);*/ - + TDEIconEffect iconeffect; - + int cnt = 0; TQValueList<LayoutUnit>::ConstIterator it; for (it=layouts.begin(); it != layouts.end(); ++it) { const TQString layoutName = (*it).layout; const TQString variantName = (*it).variant; - - const TQPixmap& layoutPixmap = LayoutIcon::getInstance().findPixmap(layoutName, m_showFlag, (*it).displayName); + + const TQPixmap& layoutPixmap = LayoutIcon::getInstance().findPixmap(layoutName, PIXMAP_STYLE_CONTEXTMENU, (*it).displayName); const TQPixmap pix = iconeffect.apply(layoutPixmap, TDEIcon::Small, TDEIcon::DefaultState); - + 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++; } m_prevLayoutCount = cnt; - + // if show config, if show help if( menu->indexOf(CONFIG_MENU_ID) == -1 ) { contextMenu->insertSeparator(); |