diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-07 16:25:16 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-07 16:25:16 -0500 |
commit | 97c65270b2d50c99da341da6c04f86a5644b4b4b (patch) | |
tree | 5fe0e79d321fd31712decdc4885f7c6b36221fb1 /kicker | |
parent | 8d2f9ae31522a472de122e849d206a869f248773 (diff) | |
download | tdebase-97c65270b2d50c99da341da6c04f86a5644b4b4b.tar.gz tdebase-97c65270b2d50c99da341da6c04f86a5644b4b4b.zip |
Wait for all kicker containers to load before sending desktop size to kdesktop
This resolves a long standing bug where icons would not stay put across logout / login cycles
Properly handle desktop area changes when align to grid is enabled
Diffstat (limited to 'kicker')
-rw-r--r-- | kicker/kicker/core/extensionmanager.cpp | 41 | ||||
-rw-r--r-- | kicker/kicker/core/extensionmanager.h | 1 |
2 files changed, 32 insertions, 10 deletions
diff --git a/kicker/kicker/core/extensionmanager.cpp b/kicker/kicker/core/extensionmanager.cpp index 927a84f76..26b792271 100644 --- a/kicker/kicker/core/extensionmanager.cpp +++ b/kicker/kicker/core/extensionmanager.cpp @@ -62,7 +62,8 @@ ExtensionManager::ExtensionManager() : TQObject(0, "ExtensionManager"), m_menubarPanel(0), m_mainPanel(0), - m_panelCounter(-1) + m_panelCounter(-1), + m_loadingContainers(false) { } @@ -86,6 +87,8 @@ ExtensionManager::~ExtensionManager() void ExtensionManager::initialize() { + m_loadingContainers = true; + // kdDebug(1210) << "ExtensionManager::loadContainerConfig()" << endl; TDEConfig* config = TDEGlobal::config(); PluginManager* pm = PluginManager::the(); @@ -136,6 +139,13 @@ void ExtensionManager::initialize() TQStringList::iterator itEnd = elist.end(); for (TQStringList::iterator it = elist.begin(); it != elist.end(); ++it) { + // last container? + TQStringList::iterator lastcheck(it); + lastcheck++; + if (lastcheck == elist.end()) { + m_loadingContainers = false; + } + // extension id TQString extensionId(*it); @@ -166,6 +176,7 @@ void ExtensionManager::initialize() kapp->processEvents(); } } + m_loadingContainers = false; pm->clearUntrustedLists(); connect(Kicker::the(), TQT_SIGNAL(configurationChanged()), TQT_SLOT(configurationChanged())); @@ -219,7 +230,9 @@ void ExtensionManager::configureMenubar(bool duringInit) delete m_menubarPanel; m_menubarPanel = 0; - emit desktopIconsAreaChanged(desktopIconsArea(screen), screen); + if (!m_loadingContainers) { + emit desktopIconsAreaChanged(desktopIconsArea(screen), screen); + } } } @@ -374,8 +387,10 @@ void ExtensionManager::updateMenubar() tmpmenu.sizeHint().height()); m_menubarPanel->writeConfig(); - emit desktopIconsAreaChanged(desktopIconsArea(m_menubarPanel->xineramaScreen()), - m_menubarPanel->xineramaScreen()); + if (!m_loadingContainers) { + emit desktopIconsAreaChanged(desktopIconsArea(m_menubarPanel->xineramaScreen()), + m_menubarPanel->xineramaScreen()); + } } bool ExtensionManager::isMainPanel(const TQWidget* panel) const @@ -425,8 +440,10 @@ void ExtensionManager::addContainer(ExtensionContainer* e) connect(e, TQT_SIGNAL(removeme(ExtensionContainer*)), this, TQT_SLOT(removeContainer(ExtensionContainer*))); - emit desktopIconsAreaChanged(desktopIconsArea(e->xineramaScreen()), - e->xineramaScreen()); + if (!m_loadingContainers) { + emit desktopIconsAreaChanged(desktopIconsArea(e->xineramaScreen()), + e->xineramaScreen()); + } } void ExtensionManager::removeContainer(ExtensionContainer* e) @@ -441,8 +458,10 @@ void ExtensionManager::removeContainer(ExtensionContainer* e) e->deleteLater(); // Wait till we return to the main event loop saveContainerConfig(); - emit desktopIconsAreaChanged(desktopIconsArea(e->xineramaScreen()), - e->xineramaScreen()); + if (!m_loadingContainers) { + emit desktopIconsAreaChanged(desktopIconsArea(e->xineramaScreen()), + e->xineramaScreen()); + } } void ExtensionManager::removeAllContainers() @@ -766,8 +785,10 @@ void ExtensionManager::extensionSizeChanged(ExtensionContainer *extension) return; } - emit desktopIconsAreaChanged(desktopIconsArea(extension->xineramaScreen()), - extension->xineramaScreen()); + if (!m_loadingContainers) { + emit desktopIconsAreaChanged(desktopIconsArea(extension->xineramaScreen()), + extension->xineramaScreen()); + } } #include "extensionmanager.moc" diff --git a/kicker/kicker/core/extensionmanager.h b/kicker/kicker/core/extensionmanager.h index 47db7006e..b4a53ec31 100644 --- a/kicker/kicker/core/extensionmanager.h +++ b/kicker/kicker/core/extensionmanager.h @@ -85,6 +85,7 @@ private: ExtensionContainer* m_menubarPanel; ExtensionContainer* m_mainPanel; int m_panelCounter; + bool m_loadingContainers; static ExtensionManager* m_self; }; |