[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/libs/plasmagenericshell/widgetsexplorer
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2010-12-15 18:53:19
Message-ID: 20101215185319.14328AC8A8 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1206753 by aseigo:
* re-use the OpenAssistant dialog if already shown (now that it's non-modal this \
matters; kills that TODO)
* bring the #includes into this centry
M +23 -16 appletsfiltering.cpp
M +2 -0 appletsfiltering.h
--- trunk/KDE/kdebase/workspace/libs/plasmagenericshell/widgetsexplorer/appletsfiltering.cpp \
#1206752:1206753 @@ -21,20 +21,21 @@
#include <QMenu>
-#include <kglobalsettings.h>
-#include <klineedit.h>
-#include <kmenu.h>
-#include <kservicetypetrader.h>
-#include <kpushbutton.h>
+#include <KGlobalSettings>
+#include <KLineEdit>
+#include <KMenu>
+#include <KPushButton>
+#include <KServiceTypeTrader>
+#include <KWindowSystem>
-#include <plasma/theme.h>
-#include <plasma/corona.h>
-#include <plasma/packagestructure.h>
-#include <plasma/framesvg.h>
-#include <plasma/widgets/label.h>
-#include <plasma/widgets/lineedit.h>
-#include <plasma/widgets/pushbutton.h>
-#include <plasma/widgets/toolbutton.h>
+#include <Plasma/Theme>
+#include <Plasma/Corona>
+#include <Plasma/PackageStructure>
+#include <Plasma/FrameSvg>
+#include <Plasma/Label>
+#include <Plasma/LineEdit>
+#include <Plasma/PushButton>
+#include <Plasma/ToolButton>
#include <kephal/kephal/screens.h>
@@ -367,10 +368,16 @@
void FilteringWidget::openWidgetFile()
{
- // TODO: if we already have one of these showing and the user clicks to
- // add it again, show the same window?
- Plasma::OpenWidgetAssistant *assistant = new Plasma::OpenWidgetAssistant(0);
+ Plasma::OpenWidgetAssistant *assistant = m_openAssistant.data();
+ if (!assistant) {
+ assistant = new Plasma::OpenWidgetAssistant(0);
+ m_openAssistant = assistant;
+ }
+
+ KWindowSystem::setOnDesktop(assistant->winId(), \
KWindowSystem::currentDesktop()); assistant->setAttribute(Qt::WA_DeleteOnClose, \
true); assistant->show();
+ assistant->raise();
+ assistant->setFocus();
}
--- trunk/KDE/kdebase/workspace/libs/plasmagenericshell/widgetsexplorer/appletsfiltering.h \
#1206752:1206753 @@ -28,6 +28,7 @@
class KMenu;
namespace Plasma {
class LineEdit;
+ class OpenWidgetAssistant;
class PushButton;
class ToolButton;
class WidgetExplorer;
@@ -117,6 +118,7 @@
Plasma::WidgetExplorer *m_widgetExplorer;
QList<QWeakPointer<Plasma::PushButton> > m_actionButtons;
Plasma::ToolButton *m_closeButton;
+ QWeakPointer<Plasma::OpenWidgetAssistant> m_openAssistant;
};
#endif // APPLETSFILTERING_H
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic