summaryrefslogtreecommitdiffstats
path: root/kxkb/kcmlayout.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2024-11-12 23:23:00 +0200
committerMavridis Philippe <[email protected]>2025-01-12 13:28:25 +0200
commit883676477b7b1368c14f9bcd49d135407cc6b456 (patch)
tree7ba009ebf1f45a7834d2f1ef640e8395cccb9849 /kxkb/kcmlayout.cpp
parentcb419b248d8795082cd91b4a1e6d677f5560f039 (diff)
downloadtdebase-883676477b7b1368c14f9bcd49d135407cc6b456.tar.gz
tdebase-883676477b7b1368c14f9bcd49d135407cc6b456.zip
Kxkb: Improvements for tray window pixmap manager, optimize settings reloadings
* Rename LayoutIcon to LayoutIconManager for clarity * Remove use of singleton pattern for LayoutIconManager * Do not reload all Kxkb settings every time we are requested to get a pixmap! * Use pointer to global KxkbConfig instance instead of keeping own copy * Make "Transparent background" checkbox available for theme colors in the GUI * Minor code cleanup in LayoutIconManager * KxkbConfig: do not reload settings every time getKxkbOptions() is called; if settings actually need to be re-read, it must be done maunally before calling this function Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'kxkb/kcmlayout.cpp')
-rw-r--r--kxkb/kcmlayout.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/kxkb/kcmlayout.cpp b/kxkb/kcmlayout.cpp
index fac058a6f..236acb3d9 100644
--- a/kxkb/kcmlayout.cpp
+++ b/kxkb/kcmlayout.cpp
@@ -107,6 +107,9 @@ LayoutConfig::LayoutConfig(TQWidget *parent, const char *name)
m_forceGrpOverwrite(false)
{
X11Helper::initializeTranslations();
+
+ m_icoMgr = new LayoutIconManager(&m_kxkbConfig);
+
TQVBoxLayout *main = new TQVBoxLayout(this, 0, KDialog::spacingHint());
widget = new LayoutConfigWidget(this, "widget");
@@ -189,7 +192,8 @@ LayoutConfig::LayoutConfig(TQWidget *parent, const char *name)
LayoutConfig::~LayoutConfig()
{
- delete m_rules;
+ delete m_rules;
+ delete m_icoMgr;
}
@@ -1141,7 +1145,7 @@ void LayoutConfig::loadRules()
TQString layoutName = it2.current();
TQListViewItem *item = new TQListViewItem(widget->listLayoutsSrc);
- item->setPixmap(LAYOUT_COLUMN_FLAG, LayoutIcon::getInstance().findPixmap(layout, false));
+ item->setPixmap(LAYOUT_COLUMN_FLAG, m_icoMgr->find(layout, PIXMAP_STYLE_CONTEXTMENU));
item->setText(LAYOUT_COLUMN_NAME, i18n(layoutName.latin1()));
item->setText(LAYOUT_COLUMN_MAP, layout);
++it2;