summaryrefslogtreecommitdiffstats
path: root/twin/useractions.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-20 02:24:32 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-20 02:24:32 -0600
commitd160a6fc0101dd094195f8d0782e8aefcf94d376 (patch)
treebf7ebde63e93fb2f54b2bcaf5b0427b7f8de845f /twin/useractions.cpp
parenta515552a21960aeffbe12e24c6d64da32c646829 (diff)
downloadtdebase-d160a6fc0101dd094195f8d0782e8aefcf94d376.tar.gz
tdebase-d160a6fc0101dd094195f8d0782e8aefcf94d376.zip
Update twin with initial framework for application suspend/resume
This needs some additional work before it can be enabled
Diffstat (limited to 'twin/useractions.cpp')
-rw-r--r--twin/useractions.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/twin/useractions.cpp b/twin/useractions.cpp
index a265a1784..6542cdb99 100644
--- a/twin/useractions.cpp
+++ b/twin/useractions.cpp
@@ -68,6 +68,10 @@ TQPopupMenu* Workspace::clientPopup()
advanced_popup->insertItem( i18n("Shad&ow"), Options::ShadowOp );
advanced_popup->insertItem( SmallIconSet("key_bindings"),
i18n("Window &Shortcut...")+'\t'+keys->shortcut("Setup Window Shortcut").seq(0).toString(), Options::SetupWindowShortcutOp );
+// FIXME
+// Uncomment these actions when twin can handle suspended applications in a user friendly manner
+// advanced_popup->insertItem( SmallIconSet( "suspend" ), i18n("&Suspend Application"), Options::SuspendWindowOp );
+// advanced_popup->insertItem( SmallIconSet( "exec" ), i18n("&Resume Application"), Options::ResumeWindowOp );
advanced_popup->insertItem( SmallIconSet( "wizard" ), i18n("&Special Window Settings..."), Options::WindowRulesOp );
advanced_popup->insertItem( SmallIconSet( "wizard" ), i18n("&Special Application Settings..."), Options::ApplicationRulesOp );
@@ -171,6 +175,8 @@ void Workspace::clientPopupAboutToShow()
advanced_popup->setItemChecked( Options::KeepBelowOp, active_popup_client->keepBelow() );
advanced_popup->setItemChecked( Options::FullScreenOp, active_popup_client->isFullScreen() );
advanced_popup->setItemEnabled( Options::FullScreenOp, active_popup_client->userCanSetFullScreen() );
+ advanced_popup->setItemEnabled( Options::SuspendWindowOp, active_popup_client->isSuspendable() );
+ advanced_popup->setItemEnabled( Options::ResumeWindowOp, active_popup_client->isResumeable() );
advanced_popup->setItemChecked( Options::NoBorderOp, active_popup_client->noBorder() );
advanced_popup->setItemEnabled( Options::NoBorderOp, active_popup_client->userCanSetNoBorder() );
@@ -436,6 +442,12 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op )
case Options::OperationsOp:
c->performMouseCommand( Options::MouseShade, TQCursor::pos());
break;
+ case Options::SuspendWindowOp:
+ c->suspendWindow();
+ break;
+ case Options::ResumeWindowOp:
+ c->resumeWindow();
+ break;
case Options::WindowRulesOp:
editWindowRules( c, false );
break;
@@ -992,6 +1004,22 @@ void Workspace::slotKillWindow()
}
/*!
+ Suspend Window feature
+ */
+void Workspace::slotSuspendWindow()
+ {
+ active_popup_client->suspendWindow();
+ }
+
+/*!
+ Resume Window feature
+ */
+void Workspace::slotResumeWindow()
+ {
+ active_popup_client->resumeWindow();
+ }
+
+/*!
Sends the popup client to desktop \a desk
Internal slot for the window operation menu