summaryrefslogtreecommitdiffstats
path: root/kcontrol/icons
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-05-10 03:04:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-05-10 03:04:21 +0000
commit5ccb957341daaf5c223a49391f3076e95832ac1f (patch)
tree0e23ba8717f429560881bedc107e1f6de2c78075 /kcontrol/icons
parent4d3847fc45c6700ec1667d9616c8f91b734cb75d (diff)
downloadtdebase-5ccb957341daaf5c223a49391f3076e95832ac1f.tar.gz
tdebase-5ccb957341daaf5c223a49391f3076e95832ac1f.zip
Part of batch commit to enable true tasktray resize support for Trinity applications
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1124757 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/icons')
-rw-r--r--kcontrol/icons/icons.cpp44
-rw-r--r--kcontrol/icons/icons.h5
2 files changed, 30 insertions, 19 deletions
diff --git a/kcontrol/icons/icons.cpp b/kcontrol/icons/icons.cpp
index 37bc31210..4ce1e4d98 100644
--- a/kcontrol/icons/icons.cpp
+++ b/kcontrol/icons/icons.cpp
@@ -62,12 +62,12 @@ KIconConfig::KIconConfig(QWidget *parent, const char *name)
QPushButton *push;
- push = addPreviewIcon(0, i18n("Default"), this, g_lay);
- connect(push, SIGNAL(clicked()), SLOT(slotEffectSetup0()));
- push = addPreviewIcon(1, i18n("Active"), this, g_lay);
- connect(push, SIGNAL(clicked()), SLOT(slotEffectSetup1()));
- push = addPreviewIcon(2, i18n("Disabled"), this, g_lay);
- connect(push, SIGNAL(clicked()), SLOT(slotEffectSetup2()));
+ mPreviewButton1 = addPreviewIcon(0, i18n("Default"), this, g_lay);
+ connect(mPreviewButton1, SIGNAL(clicked()), SLOT(slotEffectSetup0()));
+ mPreviewButton2 = addPreviewIcon(1, i18n("Active"), this, g_lay);
+ connect(mPreviewButton2, SIGNAL(clicked()), SLOT(slotEffectSetup1()));
+ mPreviewButton3 = addPreviewIcon(2, i18n("Disabled"), this, g_lay);
+ connect(mPreviewButton3, SIGNAL(clicked()), SLOT(slotEffectSetup2()));
m_pTab1 = new QWidget(this, "General Tab");
top->addWidget(m_pTab1, 0, 1);
@@ -278,12 +278,6 @@ void KIconConfig::read()
mpKickerConfig->setGroup("General");
mQuickLaunchSize = mpKickerConfig->readNumEntry("panelIconWidth", KIcon::SizeLarge);
-
- // FIXME
- // Due to issues with the system tray handling code, mpSysTraySizeBox should be be disabled
- // This should be fixed ASAP
- // Specifically, kicker does not automatically reconfigure the system tray icon sizes on its configure() DCOP call
- //mpSysTraySizeBox->setEnabled(false);
}
void KIconConfig::apply()
@@ -455,6 +449,11 @@ void KIconConfig::save()
}
}
+ // Reload kicker/systray configuration files; we have no way of knowing if any other parameters changed
+ // from initial read to this write request
+ mpSystrayConfig->reparseConfiguration();
+ mpKickerConfig->reparseConfiguration();
+
mpSystrayConfig->setGroup("System Tray");
mpSystrayConfig->writeEntry("systrayIconWidth", mSysTraySize);
mpKickerConfig->setGroup("General");
@@ -478,6 +477,9 @@ void KIconConfig::save()
// Signal kicker to reload icon configuration
kapp->dcopClient()->send("kicker", "kicker", "configure()", QByteArray());
+
+ // Signal system tray to reload icon configuration
+ kapp->dcopClient()->send("kicker", "SystemTrayApplet", "iconSizeChanged()", QByteArray());
}
void KIconConfig::defaults()
@@ -496,27 +498,35 @@ void KIconConfig::slotUsage(int index)
mpSizeBox->setEnabled(true);
mpDPCheck->setEnabled(false);
mpAnimatedCheck->setEnabled(false);
+ mPreviewButton1->setEnabled(false);
+ mPreviewButton2->setEnabled(false);
+ mPreviewButton3->setEnabled(false);
}
else if (mpUsageList->text(index) == i18n("System Tray Icons")) {
- // FIXME
- // Due to issues with the system tray handling code, mpSysTraySizeBox should be be disabled
- // This should be fixed ASAP
- // Specifically, kicker does not automatically reconfigure the system tray icon sizes on its configure() DCOP call
- mpSizeBox->setEnabled(false);
+ mpSizeBox->setEnabled(true);
mpDPCheck->setEnabled(false);
mpAnimatedCheck->setEnabled(false);
+ mPreviewButton1->setEnabled(false);
+ mPreviewButton2->setEnabled(false);
+ mPreviewButton3->setEnabled(false);
}
else if ( mUsage == KIcon::Panel || mUsage == KIcon::LastGroup )
{
mpSizeBox->setEnabled(false);
mpDPCheck->setEnabled(false);
mpAnimatedCheck->setEnabled( mUsage == KIcon::Panel );
+ mPreviewButton1->setEnabled(true);
+ mPreviewButton2->setEnabled(true);
+ mPreviewButton3->setEnabled(true);
}
else
{
mpSizeBox->setEnabled(true);
mpDPCheck->setEnabled(true);
mpAnimatedCheck->setEnabled( mUsage == KIcon::Desktop );
+ mPreviewButton1->setEnabled(true);
+ mPreviewButton2->setEnabled(true);
+ mPreviewButton3->setEnabled(true);
}
apply();
diff --git a/kcontrol/icons/icons.h b/kcontrol/icons/icons.h
index 7e29e377a..6fa27eee3 100644
--- a/kcontrol/icons/icons.h
+++ b/kcontrol/icons/icons.h
@@ -115,6 +115,7 @@ private:
QCheckBox *mpDPCheck, *wordWrapCB, *underlineCB, *mpAnimatedCheck;
QTabWidget *m_pTabWidget;
QWidget *m_pTab1;
+ QPushButton *mPreviewButton1, *mPreviewButton2, *mPreviewButton3;
};
class KIconEffectSetupDialog: public KDialogBase
@@ -152,6 +153,6 @@ private:
QImage mExample;
QGroupBox *mpEffectGroup;
QLabel *mpPreview, *mpEffectLabel, *mpEffectColor, *mpEffectColor2;
-};
-
+};
+
#endif