Added shortcut 'h' to the Switcher to hide applications.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22303 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-09-25 13:28:50 +00:00
parent 229f4986d2
commit 04d7b50bde
2 changed files with 22 additions and 0 deletions
+21
View File
@@ -984,6 +984,22 @@ TSwitchManager::QuitApp()
}
void
TSwitchManager::HideApp()
{
// hide all teams in this group
TTeamGroup *teamGroup = (TTeamGroup *)fGroupList.ItemAt(fCurrentIndex);
for (int32 i = teamGroup->TeamList()->CountItems(); i-- > 0;) {
team_id team = (team_id)teamGroup->TeamList()->ItemAt(i);
app_info info;
if (be_roster->GetRunningAppInfo(team, &info) == B_OK)
do_minimize_team(BRect(), team, false);
}
}
window_info *
TSwitchManager::WindowInfo(int32 groupIndex, int32 windowIndex)
{
@@ -1587,6 +1603,11 @@ TSwitcherWindow::DoKey(uint32 key, uint32 modifiers)
fManager->QuitApp();
break;
case 'h':
case 'H':
fManager->HideApp();
break;
#if _ALLOW_STICKY_
case 's':
case 'S':
+1
View File
@@ -64,6 +64,7 @@ class TSwitchManager : public BHandler {
int32 CountVisibleGroups();
void QuitApp();
void HideApp();
void CycleApp(bool forward, bool activate = false);
void CycleWindow(bool forward, bool wrap = true);
void SwitchToApp(int32 prevIndex, int32 newIndex, bool forward);