Index: base/applications/taskmgr/CMakeLists.txt =================================================================== --- base/applications/taskmgr/CMakeLists.txt (revision 62597) +++ base/applications/taskmgr/CMakeLists.txt (working copy) @@ -15,6 +15,7 @@ procpage.c proclist.c run.c + shutdown.c trayicon.c taskmgr.c graphctl.c Index: base/applications/taskmgr/lang/bg-BG.rc =================================================================== --- base/applications/taskmgr/lang/bg-BG.rc (revision 62597) +++ base/applications/taskmgr/lang/bg-BG.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "На&дипляне", ID_WINDOWS_CASCADE MENUITEM "Изваждане &отпред ", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "Помо&щ" BEGIN MENUITEM "Съдържание на помо&щта за задачния управител", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/cs-CZ.rc =================================================================== --- base/applications/taskmgr/lang/cs-CZ.rc (revision 62597) +++ base/applications/taskmgr/lang/cs-CZ.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "&Kaskáda", ID_WINDOWS_CASCADE MENUITEM "&Přenést do popředí", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Nápověda" BEGIN MENUITEM "&Nápověda pro správce úloh", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/da-DK.rc =================================================================== --- base/applications/taskmgr/lang/da-DK.rc (revision 62597) +++ base/applications/taskmgr/lang/da-DK.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "&Bring til front", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Hjælp" BEGIN MENUITEM "Opgavestyring &Hjælpe Emner", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/de-DE.rc =================================================================== --- base/applications/taskmgr/lang/de-DE.rc (revision 62597) +++ base/applications/taskmgr/lang/de-DE.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "Übe&rlappend", ID_WINDOWS_CASCADE MENUITEM "&In Vordergrund", ID_WINDOWS_BRINGTOFRONT END + POPUP "&Herunterfahren" + BEGIN + MENUITEM "&Standby", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Ruhezustand", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "&Ausschalten", ID_SHUTDOWN_TURNOFF + MENUITEM "&Neu starten", ID_SHUTDOWN_RESTART + MENUITEM "Ab&melden", ID_SHUTDOWN_LOGOFF + MENUITEM "&Benutzer wechseln \t Windows-Taste+L", ID_SHUTDOWN_SWITCH + END POPUP "&?" BEGIN MENUITEM "&Hilfethemen", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/el-GR.rc =================================================================== --- base/applications/taskmgr/lang/el-GR.rc (revision 62597) +++ base/applications/taskmgr/lang/el-GR.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Βοήθεια" BEGIN MENUITEM "Θέματα &Βοήθειας του Διαχειριστή Διεργασιών", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/en-US.rc =================================================================== --- base/applications/taskmgr/lang/en-US.rc (revision 62597) +++ base/applications/taskmgr/lang/en-US.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Help" BEGIN MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/es-ES.rc =================================================================== --- base/applications/taskmgr/lang/es-ES.rc (revision 62597) +++ base/applications/taskmgr/lang/es-ES.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "&Cascada", ID_WINDOWS_CASCADE MENUITEM "&Traer al Frente", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "A&yuda" BEGIN MENUITEM "&Temas de Ayuda del Administrador de Tareas", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/fr-FR.rc =================================================================== --- base/applications/taskmgr/lang/fr-FR.rc (revision 62597) +++ base/applications/taskmgr/lang/fr-FR.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "Mettre au &premier plan", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Aide" BEGIN MENUITEM "&Rubriques d'aide du Gestionnaire des tâches", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/he-IL.rc =================================================================== --- base/applications/taskmgr/lang/he-IL.rc (revision 62597) +++ base/applications/taskmgr/lang/he-IL.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "מדורג", ID_WINDOWS_CASCADE MENUITEM "ה&בא לפנים", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&עזרה" BEGIN MENUITEM "&נושאי עזרה של מנהל המשימות", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/hu-HU.rc =================================================================== --- base/applications/taskmgr/lang/hu-HU.rc (revision 62597) +++ base/applications/taskmgr/lang/hu-HU.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "&Lépcsõzetes rendezés", ID_WINDOWS_CASCADE MENUITEM "&Elõtérbe helyezés", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Súgó" BEGIN MENUITEM "&Témakörök", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/id-ID.rc =================================================================== --- base/applications/taskmgr/lang/id-ID.rc (revision 62597) +++ base/applications/taskmgr/lang/id-ID.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Help" BEGIN MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/it-IT.rc =================================================================== --- base/applications/taskmgr/lang/it-IT.rc (revision 62597) +++ base/applications/taskmgr/lang/it-IT.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "&Sovrapponi", ID_WINDOWS_CASCADE MENUITEM "&Porta in primo piano", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Aiuto" BEGIN MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/ja-JP.rc =================================================================== --- base/applications/taskmgr/lang/ja-JP.rc (revision 62597) +++ base/applications/taskmgr/lang/ja-JP.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "重ねて表示(&C)", ID_WINDOWS_CASCADE MENUITEM "手前に表示(&B)", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "ヘルプ(&H)" BEGIN MENUITEM "トピックの検索(&H)", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/ko-KR.rc =================================================================== --- base/applications/taskmgr/lang/ko-KR.rc (revision 62597) +++ base/applications/taskmgr/lang/ko-KR.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "계단식 창 배열(&C)", ID_WINDOWS_CASCADE MENUITEM "맨 앞으로 가져오기(&B)", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "도움말(&H)" BEGIN MENUITEM "작업 관리자 도움말 항목(&H)", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/nl-NL.rc =================================================================== --- base/applications/taskmgr/lang/nl-NL.rc (revision 62597) +++ base/applications/taskmgr/lang/nl-NL.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "&Trapsgewijs", ID_WINDOWS_CASCADE MENUITEM "Naar &voorgrond", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Help" BEGIN MENUITEM "&Help-onderwerpen", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/no-NO.rc =================================================================== --- base/applications/taskmgr/lang/no-NO.rc (revision 62597) +++ base/applications/taskmgr/lang/no-NO.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "&Overlappet", ID_WINDOWS_CASCADE MENUITEM "&Plasser lengst frem", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Hjelp" BEGIN MENUITEM "Emner i &hjelp for Oppgavebehandling", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/pl-PL.rc =================================================================== --- base/applications/taskmgr/lang/pl-PL.rc (revision 62597) +++ base/applications/taskmgr/lang/pl-PL.rc (working copy) @@ -53,6 +53,15 @@ MENUITEM "&Kaskadowo", ID_WINDOWS_CASCADE MENUITEM "&Przesuń na wierzch", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "Pomo&c" BEGIN MENUITEM "Menedżer zadań - tematy &pomocy", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/pt-BR.rc =================================================================== --- base/applications/taskmgr/lang/pt-BR.rc (revision 62597) +++ base/applications/taskmgr/lang/pt-BR.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "Em &cascata", ID_WINDOWS_CASCADE MENUITEM "&Trazer para a frente", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "Aj&uda" BEGIN MENUITEM "&Tópicos da Ajuda do Gerenciador de tarefas", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/ro-RO.rc =================================================================== --- base/applications/taskmgr/lang/ro-RO.rc (revision 62597) +++ base/applications/taskmgr/lang/ro-RO.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "Aranjări în casca&dă", ID_WINDOWS_CASCADE MENUITEM "&Aduce în prim plan", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&?" BEGIN MENUITEM "&Manual…", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/ru-RU.rc =================================================================== --- base/applications/taskmgr/lang/ru-RU.rc (revision 62597) +++ base/applications/taskmgr/lang/ru-RU.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "&Каскадом", ID_WINDOWS_CASCADE MENUITEM "&На передний план", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Справка" BEGIN MENUITEM "&Вызов справки", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/sk-SK.rc =================================================================== --- base/applications/taskmgr/lang/sk-SK.rc (revision 62597) +++ base/applications/taskmgr/lang/sk-SK.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "&Kaskáda", ID_WINDOWS_CASCADE MENUITEM "Presunúť dopred&u", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Pomocník" BEGIN MENUITEM "Témy &Pomocníka pre Správcu úloh", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/sq-AL.rc =================================================================== --- base/applications/taskmgr/lang/sq-AL.rc (revision 62597) +++ base/applications/taskmgr/lang/sq-AL.rc (working copy) @@ -50,6 +50,15 @@ MENUITEM "Ujevare", ID_WINDOWS_CASCADE MENUITEM "Sjelle para", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "Ndihme" BEGIN MENUITEM "Task Manager &Ndihme me teme", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/sv-SE.rc =================================================================== --- base/applications/taskmgr/lang/sv-SE.rc (revision 62597) +++ base/applications/taskmgr/lang/sv-SE.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "&Överlappande", ID_WINDOWS_CASCADE MENUITEM "&För till förgrunden", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Hjälp" BEGIN MENUITEM "Aktivitetshanteraren &hjälpavsnitt", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/tr-TR.rc =================================================================== --- base/applications/taskmgr/lang/tr-TR.rc (revision 62597) +++ base/applications/taskmgr/lang/tr-TR.rc (working copy) @@ -48,6 +48,15 @@ MENUITEM "B&asamakla", ID_WINDOWS_CASCADE MENUITEM "&Öne Getir", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Yardım" BEGIN MENUITEM "&Yardım Konuları", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/uk-UA.rc =================================================================== --- base/applications/taskmgr/lang/uk-UA.rc (revision 62597) +++ base/applications/taskmgr/lang/uk-UA.rc (working copy) @@ -46,6 +46,15 @@ MENUITEM "&Каскадом", ID_WINDOWS_CASCADE MENUITEM "На передні&й план", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "&Довідка" BEGIN MENUITEM "&Зміст", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/zh-CN.rc =================================================================== --- base/applications/taskmgr/lang/zh-CN.rc (revision 62597) +++ base/applications/taskmgr/lang/zh-CN.rc (working copy) @@ -52,6 +52,15 @@ MENUITEM "层叠(&C)", ID_WINDOWS_CASCADE MENUITEM "前置(&B)", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "帮助(&H)" BEGIN MENUITEM "任务管理器帮助主题(&H)", ID_HELP_TOPICS Index: base/applications/taskmgr/lang/zh-TW.rc =================================================================== --- base/applications/taskmgr/lang/zh-TW.rc (revision 62597) +++ base/applications/taskmgr/lang/zh-TW.rc (working copy) @@ -54,6 +54,15 @@ MENUITEM "層疊(&C)", ID_WINDOWS_CASCADE MENUITEM "前置(&B)", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY, GRAYED + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE, GRAYED + MENUITEM "T&urn OFF", ID_SHUTDOWN_TURNOFF + MENUITEM "&Restart", ID_SHUTDOWN_RESTART + MENUITEM "&Log Off", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCH + END POPUP "說明(&H)" BEGIN MENUITEM "工作管理員說明主题(&H)", ID_HELP_TOPICS Index: base/applications/taskmgr/resource.h =================================================================== --- base/applications/taskmgr/resource.h (revision 62597) +++ base/applications/taskmgr/resource.h (working copy) @@ -133,6 +133,12 @@ #define IDS_KERNEL_MEMORY_PAGED 1070 #define IDS_KERNEL_MEMORY_NONPAGED 1071 +#define ID_SHUTDOWN_STANDBY 32765 +#define ID_SHUTDOWN_HIBERNATE 32766 +#define ID_SHUTDOWN_TURNOFF 32767 +#define ID_SHUTDOWN_RESTART 32768 +#define ID_SHUTDOWN_LOGOFF 32769 +#define ID_SHUTDOWN_SWITCH 32770 #define ID_FILE_NEW 32771 #define ID_OPTIONS_ALWAYSONTOP 32773 #define ID_OPTIONS_MINIMIZEONUSE 32774 Index: base/applications/taskmgr/shutdown.c =================================================================== --- base/applications/taskmgr/shutdown.c (revision 0) +++ base/applications/taskmgr/shutdown.c (working copy) @@ -0,0 +1,85 @@ +/* + * ReactOS Task Manager + * + * shutdown.c + * + * Copyright (C) 2014 Robert Naumann + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "precomp.h" + +void ShutDown(UINT shutdown_type) +{ + HANDLE hToken; + TOKEN_PRIVILEGES priv; + + // Get a token for this process. + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) return; + + // Get the LUID for the shutdown privilege. + LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &priv.Privileges[0].Luid); + priv.PrivilegeCount = 1; // one privilege to set + priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + + // Get the shutdown privilege for this process. + AdjustTokenPrivileges(hToken, FALSE, &priv, 0, (PTOKEN_PRIVILEGES)NULL, 0); + + if (GetLastError() != ERROR_SUCCESS) return; + + if (!ExitWindowsEx(shutdown_type, + SHTDN_REASON_MAJOR_OPERATINGSYSTEM | + SHTDN_REASON_MINOR_OTHER | + SHTDN_REASON_FLAG_USER_DEFINED)) + { + DWORD err = GetLastError(); + LPTSTR Error = 0; + if(!FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, err, 0, (LPTSTR)&Error, 0, NULL) == 0) + { + MessageBox(hMainWnd,Error,TEXT("Unable to shut down!"), MB_OK|MB_ICONERROR); + if( Error ) + { + LocalFree( Error ); + Error = 0; + } + } + } +} + +void Suspend(BOOL hibernate) +{ + //todo: SetSuspendState(hibernate,FALSE,FALSE); +} + +void SwitchUser(void) +{ + if( !LockWorkStation() ) + { + DWORD err = GetLastError(); + LPTSTR Error = 0; + if(!FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, err, 0, (LPTSTR)&Error, 0, NULL) == 0) + { + MessageBox(hMainWnd,Error,TEXT("Unable to lock the workstation!"), MB_OK|MB_ICONERROR); + if( Error ) + { + LocalFree( Error ); + Error = 0; + } + } + } +} \ No newline at end of file Index: base/applications/taskmgr/shutdown.h =================================================================== --- base/applications/taskmgr/shutdown.h (revision 0) +++ base/applications/taskmgr/shutdown.h (working copy) @@ -0,0 +1,27 @@ +/* + * ReactOS Task Manager + * + * shutdown.h + * + * Copyright (C) 2014 Robert Naumann + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#pragma once + +void ShutDown(UINT); +void Suspend(BOOL); +void SwitchUser(void); \ No newline at end of file Index: base/applications/taskmgr/taskmgr.c =================================================================== --- base/applications/taskmgr/taskmgr.c (revision 62597) +++ base/applications/taskmgr/taskmgr.c (working copy) @@ -28,6 +28,7 @@ #include "affinity.h" #include "debug.h" #include "priority.h" +#include "shutdown.h" #define STATUS_WINDOW 2001 @@ -308,6 +309,24 @@ case ID_PROCESS_PAGE_DEBUGCHANNELS: ProcessPage_OnDebugChannels(); break; + case ID_SHUTDOWN_STANDBY: + Suspend(FALSE); + break; + case ID_SHUTDOWN_HIBERNATE: + Suspend(TRUE); + break; + case ID_SHUTDOWN_TURNOFF: + ShutDown(EWX_POWEROFF); + break; + case ID_SHUTDOWN_RESTART: + ShutDown(EWX_REBOOT); + break; + case ID_SHUTDOWN_LOGOFF: + ShutDown(EWX_LOGOFF); + break; + case ID_SHUTDOWN_SWITCH: + SwitchUser(); + break; case ID_HELP_ABOUT: OnAbout(); break; @@ -948,7 +967,7 @@ LoadStringW(hInst, IDS_MENU_DETAILS, szTemp, 256); AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_DETAILS, szTemp); - if (GetMenuItemCount(hMenu) <= 4) { + if (GetMenuItemCount(hMenu) <= 5) { hSubMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_WINDOWSMENU)); LoadStringW(hInst, IDS_MENU_WINDOWS, szTemp, 256); @@ -978,7 +997,7 @@ if (TaskManagerSettings.Show16BitTasks) CheckMenuItem(hOptionsMenu, ID_OPTIONS_SHOW16BITTASKS, MF_BYCOMMAND|MF_CHECKED); - if (GetMenuItemCount(hMenu) > 4) + if (GetMenuItemCount(hMenu) > 5) { DeleteMenu(hMenu, 3, MF_BYPOSITION); DrawMenuBar(hMainWnd); @@ -994,7 +1013,7 @@ ShowWindow(hProcessPage, SW_HIDE); ShowWindow(hPerformancePage, SW_SHOW); BringWindowToTop(hPerformancePage); - if (GetMenuItemCount(hMenu) > 4) { + if (GetMenuItemCount(hMenu) > 5) { DeleteMenu(hMenu, 3, MF_BYPOSITION); DrawMenuBar(hMainWnd); }