Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Unmaintained
KDE Workspace
Commits
441ad0f8
Commit
441ad0f8
authored
Feb 01, 2011
by
Aaron J. Seigo
Browse files
toggle the activity manager
BUG:265075
parent
5fe9fde0
Changes
2
Hide whitespace changes
Inline
Side-by-side
plasma/desktop/shell/plasmaapp.cpp
View file @
441ad0f8
...
...
@@ -479,23 +479,26 @@ ControllerWindow *PlasmaApp::showWidgetExplorer(int screen, Plasma::Containment
return
showController
(
screen
,
containment
,
true
);
}
//FIXME it'd be easier if we knew which containment triggered this action
ControllerWindow
*
PlasmaApp
::
showActivityManager
()
void
PlasmaApp
::
toggleActivityManager
()
{
const
int
currentScreen
=
m_corona
->
screenId
(
QCursor
::
pos
());
QWeakPointer
<
ControllerWindow
>
controllerPtr
=
m_widgetExplorers
.
value
(
currentScreen
);
ControllerWindow
*
controller
=
controllerPtr
.
data
();
if
(
controller
)
{
controller
->
deleteLater
();
return
;
}
//try to find the "active" containment
int
currentScreen
=
m_corona
->
screenId
(
QCursor
::
pos
());
int
currentDesktop
=
-
1
;
if
(
AppSettings
::
perVirtualDesktopViews
())
{
currentDesktop
=
KWindowSystem
::
currentDesktop
()
-
1
;
currentDesktop
=
KWindowSystem
::
currentDesktop
()
-
1
;
}
Plasma
::
Containment
*
containment
=
m_corona
->
containmentForScreen
(
currentScreen
,
currentDesktop
);
return
showController
(
currentScreen
,
containment
,
false
);
}
Plasma
::
Containment
*
containment
=
m_corona
->
containmentForScreen
(
currentScreen
,
currentDesktop
);
ControllerWindow
*
PlasmaApp
::
showActivityManager
(
int
screen
,
Plasma
::
Containment
*
containment
)
{
return
showController
(
screen
,
containment
,
false
);
showController
(
currentScreen
,
containment
,
false
);
}
ControllerWindow
*
PlasmaApp
::
showController
(
int
screen
,
Plasma
::
Containment
*
containment
,
bool
widgetExplorerMode
)
...
...
@@ -779,7 +782,7 @@ DesktopCorona* PlasmaApp::corona()
//actions!
KAction
*
activityAction
=
c
->
addAction
(
"manage activities"
);
connect
(
activityAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
show
ActivityManager
()));
connect
(
activityAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
toggle
ActivityManager
()));
activityAction
->
setText
(
i18n
(
"Activities..."
));
activityAction
->
setIcon
(
KIcon
(
"preferences-activities"
));
activityAction
->
setData
(
Plasma
::
AbstractToolBox
::
ConfigureTool
);
...
...
plasma/desktop/shell/plasmaapp.h
View file @
441ad0f8
...
...
@@ -75,7 +75,6 @@ public:
QList
<
PanelView
*>
panelViews
()
const
;
ControllerWindow
*
showWidgetExplorer
(
int
screen
,
Plasma
::
Containment
*
c
);
ControllerWindow
*
showActivityManager
(
int
screen
,
Plasma
::
Containment
*
c
);
void
hideController
(
int
screen
);
static
bool
isPanelContainment
(
Plasma
::
Containment
*
containment
);
...
...
@@ -108,7 +107,8 @@ public Q_SLOTS:
void
createWaitingDesktops
();
void
createView
(
Plasma
::
Containment
*
containment
);
ControllerWindow
*
showActivityManager
();
void
toggleActivityManager
();
/**
* create a new activity based on the active one
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment