Introduce new signal configChanged() to Workspace

To get rid of direct method calls and numerous #ifdefs a new signal
configChanged() is introduced to class Workspace. Every module
which is interested in reloading the configuration is needed to connect to
this signal.
Initially this is done for the reconfiguration of DesktopChangeOSD().
This commit is contained in:
Arthur Arlt 2011-07-13 11:36:49 +02:00
parent 3d2f0c8ace
commit c1c883a8a7
4 changed files with 4 additions and 5 deletions

View file

@ -65,6 +65,7 @@ DesktopChangeOSD::DesktopChangeOSD(Workspace* ws)
connect(&m_delayedHideTimer, SIGNAL(timeout()), this, SLOT(hide()));
connect(ws, SIGNAL(currentDesktopChanged(int)), this, SLOT(desktopChanged(int)));
connect(ws, SIGNAL(numberDesktopsChanged(int)), this, SLOT(numberDesktopsChanged()));
connect(ws, SIGNAL(configChanged()), this, SLOT(reconfigure()));
m_scene = new QGraphicsScene(0);
setScene(m_scene);

View file

@ -70,8 +70,6 @@ public:
DesktopChangeOSD(Workspace* ws);
~DesktopChangeOSD();
void reconfigure();
inline Plasma::FrameSvg* itemFrame() {
return &m_item_frame;
};
@ -98,6 +96,7 @@ private:
private Q_SLOTS:
void desktopChanged(int old);
void numberDesktopsChanged();
void reconfigure();
};
class DesktopChangeItem : public QObject, public QGraphicsItem

View file

@ -933,9 +933,7 @@ void Workspace::slotReconfigure()
#ifdef KWIN_BUILD_TABBOX
tab_box->reconfigure();
#endif
#ifdef KWIN_BUILD_DESKTOPCHANGEOSD
desktop_change_osd->reconfigure();
#endif
emit configChanged();
initPositioning->reinitCascading(0);
discardPopup();
forEachClient(CheckIgnoreFocusStealingProcedure());

View file

@ -718,6 +718,7 @@ signals:
Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons,
Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
void propertyNotify(long a);
void configChanged();
private:
void init();