clicking an available desktop containment sets the view to that containment
now it's much easier to jump to the activity you want :) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810614
This commit is contained in:
parent
6b756dc236
commit
81985d2b00
@ -873,11 +873,16 @@ KActionCollection& Containment::Private::actions()
|
||||
|
||||
void Containment::Private::focusApplet(Plasma::Applet *applet)
|
||||
{
|
||||
kDebug();
|
||||
if (focusedApplet == applet) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (q->screen() == -1) {
|
||||
//what's the point of having focus if you're not on screen? :)
|
||||
//also, clicking a containment to switch to it makes the ZUI waay nicer.
|
||||
emit q->focusRequested(q);
|
||||
}
|
||||
|
||||
QList<QWidget *> widgets = actions().associatedWidgets();
|
||||
if (focusedApplet) {
|
||||
foreach (QWidget *w, widgets) {
|
||||
|
@ -318,6 +318,12 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
*/
|
||||
void screenChanged(int wasScreen, int isScreen, Plasma::Containment *containment);
|
||||
|
||||
/**
|
||||
* Emitted when the containment wants to become active.
|
||||
* Usually only used for desktop containments.
|
||||
*/
|
||||
void focusRequested(Plasma::Containment *containment);
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* Informs the Corona as to what position it is in. This is informational
|
||||
|
17
view.h
17
view.h
@ -112,14 +112,6 @@ public:
|
||||
*/
|
||||
int effectiveDesktop() const;
|
||||
|
||||
/**
|
||||
* Sets the containment for this view, which will also cause the view
|
||||
* to track the geometry of the containment.
|
||||
*
|
||||
* @arg containment the containment to center the view on
|
||||
*/
|
||||
virtual void setContainment(Containment *containment);
|
||||
|
||||
/**
|
||||
* @return the containment associated with this view, or 0 if none is
|
||||
*/
|
||||
@ -164,6 +156,15 @@ Q_SIGNALS:
|
||||
*/
|
||||
void sceneRectChanged();
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* Sets the containment for this view, which will also cause the view
|
||||
* to track the geometry of the containment.
|
||||
*
|
||||
* @arg containment the containment to center the view on
|
||||
*/
|
||||
virtual void setContainment(Containment *containment);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @return a KConfigGroup in the application's config file unique to the view
|
||||
|
Loading…
x
Reference in New Issue
Block a user