summaryrefslogtreecommitdiffstats
path: root/kicker/applets/launcher/quicklauncher.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-05 07:19:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-05 07:19:55 +0000
commitcec8fe0157b0ab37d4919d0f04c131c11f2c9a9e (patch)
tree7063e9fe9a4205b926c181924c226bcf1112d51e /kicker/applets/launcher/quicklauncher.cpp
parent80035308b1907d75e7e09be7c8f6e14098edd533 (diff)
downloadtdebase-cec8fe0157b0ab37d4919d0f04c131c11f2c9a9e.tar.gz
tdebase-cec8fe0157b0ab37d4919d0f04c131c11f2c9a9e.zip
Fix up a few Deep Buttons glitches
Add an option to include the clock in the system tray applet Majorly enhance the Quick Launch Kicker applet git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1245129 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker/applets/launcher/quicklauncher.cpp')
-rw-r--r--kicker/applets/launcher/quicklauncher.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/kicker/applets/launcher/quicklauncher.cpp b/kicker/applets/launcher/quicklauncher.cpp
index 85bea706e..b5b512d20 100644
--- a/kicker/applets/launcher/quicklauncher.cpp
+++ b/kicker/applets/launcher/quicklauncher.cpp
@@ -287,6 +287,10 @@ void QuickLauncher::removeApp(int index, bool manuallyRemoved)
TQString removeAppUrl = (*m_buttons)[index]->url();
TQString removeAppMenuId = (*m_buttons)[index]->menuId();
+
+ if (removeAppUrl == "SPECIAL_BUTTON__SHOW_DESKTOP") {
+ m_settings->setShowDesktopEnabled(false);
+ }
delete (*m_buttons)[index];
m_buttons->eraseAt(index);
@@ -689,6 +693,31 @@ void QuickLauncher::clearTempButtons()
void QuickLauncher::refreshContents()
{
int idim, d(dimension());
+
+ // make sure show desktop setting is honored
+ TQStringList urls, volatileUrls;
+ ButtonIter iter = m_buttons->begin();
+ while (iter != m_buttons->end()) {
+ if ((*iter)->sticky() == false)
+ {
+ volatileUrls.append((*iter)->menuId());
+ }
+ urls.append((*iter)->menuId());
+ ++iter;
+ }
+ if (m_settings->showDesktopEnabled()) {
+ if (!urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP")) {
+ urls.prepend("SPECIAL_BUTTON__SHOW_DESKTOP");
+ addApp("SPECIAL_BUTTON__SHOW_DESKTOP", 0, true);
+ }
+ }
+ else {
+ if (urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP")) {
+ urls.remove("SPECIAL_BUTTON__SHOW_DESKTOP");
+ removeApp("SPECIAL_BUTTON__SHOW_DESKTOP", true);
+ }
+ }
+
// determine button size
if (m_settings->iconDim() == SIZE_AUTO)
{
@@ -814,6 +843,14 @@ void QuickLauncher::loadConfig()
DEBUGSTR << " DragEnabled=" << isDragEnabled() << endl << flush;*/
TQStringList volatileButtons = m_settings->volatileButtons();
TQStringList urls = m_settings->buttons();
+ if (m_settings->showDesktopEnabled()) {
+ if (!urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP"))
+ urls.prepend("SPECIAL_BUTTON__SHOW_DESKTOP");
+ }
+ else {
+ if (urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP"))
+ urls.remove("SPECIAL_BUTTON__SHOW_DESKTOP");
+ }
kdDebug() << "GetButtons " << urls.join("/") << endl;
TQStringList::Iterator iter(urls.begin());
int n = 0;