diff --git a/reactos/base/shell/explorer/explorer-bg.rc b/reactos/base/shell/explorer/explorer-bg.rc index c08b490f83c..81714f1298f 100644 --- a/reactos/base/shell/explorer/explorer-bg.rc +++ b/reactos/base/shell/explorer/explorer-bg.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "" IDS_LOGOFF "..." IDS_SHUTDOWN "..." + IDS_RESTART "Restart..." IDS_LAUNCH "..." IDS_START_HELP "" IDS_SEARCH_FILES "" @@ -397,3 +398,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-bn.rc b/reactos/base/shell/explorer/explorer-bn.rc index eea7c3c9965..2d9b11ec97c 100644 --- a/reactos/base/shell/explorer/explorer-bn.rc +++ b/reactos/base/shell/explorer/explorer-bn.rc @@ -327,6 +327,7 @@ BEGIN IDS_START "KvhKvix ZvwjKv" IDS_LOGOFF "Log Off..." IDS_SHUTDOWN "e Kiv..." + IDS_RESTART "Restart..." IDS_LAUNCH "cwiPvjbv..." IDS_START_HELP "mvnvh" IDS_SEARCH_FILES "Abymvb..." @@ -394,3 +395,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-cn.rc b/reactos/base/shell/explorer/explorer-cn.rc index 46254052847..94e7b1f31b9 100644 --- a/reactos/base/shell/explorer/explorer-cn.rc +++ b/reactos/base/shell/explorer/explorer-cn.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "ʼ" IDS_LOGOFF "ע..." IDS_SHUTDOWN "ر..." + IDS_RESTART "Restart..." IDS_LAUNCH "..." IDS_START_HELP "" IDS_SEARCH_FILES "..." diff --git a/reactos/base/shell/explorer/explorer-cz.rc b/reactos/base/shell/explorer/explorer-cz.rc index d9bbb3b4e1c..238687c421c 100644 --- a/reactos/base/shell/explorer/explorer-cz.rc +++ b/reactos/base/shell/explorer/explorer-cz.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "Start" IDS_LOGOFF "Odhlsit se..." IDS_SHUTDOWN "Vypnout..." + IDS_RESTART "Restart..." IDS_LAUNCH "Spustit..." IDS_START_HELP "Pomoc" IDS_SEARCH_FILES "Hledat" @@ -398,3 +399,4 @@ END #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-de.rc b/reactos/base/shell/explorer/explorer-de.rc index f748a93795e..97e4066f02e 100644 --- a/reactos/base/shell/explorer/explorer-de.rc +++ b/reactos/base/shell/explorer/explorer-de.rc @@ -336,6 +336,7 @@ BEGIN IDS_START "Start" IDS_LOGOFF "Abmelden..." IDS_SHUTDOWN "Herunterfahren..." + IDS_RESTART "Restart..." IDS_LAUNCH "Ausfhren..." IDS_START_HELP "Hilfe" IDS_SEARCH_FILES "Suche Dateien..." @@ -403,3 +404,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-en.rc b/reactos/base/shell/explorer/explorer-en.rc index 27d40c9e4a4..d2b345d6542 100644 --- a/reactos/base/shell/explorer/explorer-en.rc +++ b/reactos/base/shell/explorer/explorer-en.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "Start" IDS_LOGOFF "Log Off..." IDS_SHUTDOWN "Turn Off..." + IDS_RESTART "Restart..." IDS_LAUNCH "Run..." IDS_START_HELP "Help" IDS_SEARCH_FILES "Search..." @@ -398,3 +399,4 @@ END #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-es.rc b/reactos/base/shell/explorer/explorer-es.rc index 07220b93768..bb388ed3055 100644 --- a/reactos/base/shell/explorer/explorer-es.rc +++ b/reactos/base/shell/explorer/explorer-es.rc @@ -315,6 +315,7 @@ BEGIN IDS_START "Iniciar" IDS_LOGOFF "Salir..." IDS_SHUTDOWN "Apagar..." + IDS_RESTART "Restart..." IDS_LAUNCH "Ejecutar..." IDS_START_HELP "Ayuda" IDS_SEARCH_FILES "Buscar..." @@ -382,3 +383,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-fr.rc b/reactos/base/shell/explorer/explorer-fr.rc index 44ea0d3821c..2e0b4cd01de 100644 --- a/reactos/base/shell/explorer/explorer-fr.rc +++ b/reactos/base/shell/explorer/explorer-fr.rc @@ -329,6 +329,7 @@ BEGIN IDS_START "Dmarrer" IDS_LOGOFF "Se dconnecter..." IDS_SHUTDOWN "Arrter..." + IDS_RESTART "Restart..." IDS_LAUNCH "Excuter..." IDS_START_HELP "Aide" IDS_SEARCH_FILES "Rechercher..." @@ -396,3 +397,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-gr.rc b/reactos/base/shell/explorer/explorer-gr.rc index 7f2fc3ccd9b..3836c9bd9a5 100644 --- a/reactos/base/shell/explorer/explorer-gr.rc +++ b/reactos/base/shell/explorer/explorer-gr.rc @@ -332,6 +332,7 @@ BEGIN IDS_START "" IDS_LOGOFF "..." IDS_SHUTDOWN "..." + IDS_RESTART "Restart..." IDS_LAUNCH "..." IDS_START_HELP "" IDS_SEARCH_FILES "..." @@ -399,3 +400,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-hu.rc b/reactos/base/shell/explorer/explorer-hu.rc index 29e7cae8a58..1f1bf7f1e17 100644 --- a/reactos/base/shell/explorer/explorer-hu.rc +++ b/reactos/base/shell/explorer/explorer-hu.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "Start" IDS_LOGOFF "Kijelentkezs..." IDS_SHUTDOWN "Kikapcsols..." + IDS_RESTART "Restart..." IDS_LAUNCH "Futtats..." IDS_START_HELP "Sg" IDS_SEARCH_FILES "Keress..." @@ -397,3 +398,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-id.rc b/reactos/base/shell/explorer/explorer-id.rc index f736acf4c74..90a74f8a6db 100644 --- a/reactos/base/shell/explorer/explorer-id.rc +++ b/reactos/base/shell/explorer/explorer-id.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "Mulai" IDS_LOGOFF "Keluar..." IDS_SHUTDOWN "Matikan..." + IDS_RESTART "Restart..." IDS_LAUNCH "Jalankan..." IDS_START_HELP "Bantuan" IDS_SEARCH_FILES "Cari..." @@ -397,3 +398,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-it.rc b/reactos/base/shell/explorer/explorer-it.rc index 02913d99d10..317fe929e29 100644 --- a/reactos/base/shell/explorer/explorer-it.rc +++ b/reactos/base/shell/explorer/explorer-it.rc @@ -294,6 +294,7 @@ BEGIN IDS_START "Start" IDS_LOGOFF "Disconnetti..." IDS_SHUTDOWN "Chiudi sessione..." + IDS_RESTART "Restart..." IDS_LAUNCH "Esegui..." IDS_START_HELP "Guida" IDS_SEARCH_FILES "Cerca..." @@ -361,3 +362,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-jp.rc b/reactos/base/shell/explorer/explorer-jp.rc index 37a728dbac1..1f3a07888c1 100644 --- a/reactos/base/shell/explorer/explorer-jp.rc +++ b/reactos/base/shell/explorer/explorer-jp.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "" IDS_LOGOFF "OIt..." IDS_SHUTDOWN "Vbg_E..." + IDS_RESTART "Restart..." IDS_LAUNCH "t@Cw肵Ďs..." IDS_START_HELP "wv" IDS_SEARCH_FILES "t@CtH_..." @@ -397,3 +398,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-nl.rc b/reactos/base/shell/explorer/explorer-nl.rc index 36fd9804c0e..cac718637c3 100644 --- a/reactos/base/shell/explorer/explorer-nl.rc +++ b/reactos/base/shell/explorer/explorer-nl.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "Start" IDS_LOGOFF "Afmelden..." IDS_SHUTDOWN "Uitschakelen..." + IDS_RESTART "Restart..." IDS_LAUNCH "Uitvoeren..." IDS_START_HELP "Help" IDS_SEARCH_FILES "Zoeken..." @@ -397,3 +398,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-no.rc b/reactos/base/shell/explorer/explorer-no.rc index 2401e787986..4f179711937 100644 --- a/reactos/base/shell/explorer/explorer-no.rc +++ b/reactos/base/shell/explorer/explorer-no.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "Start" IDS_LOGOFF "Logg av..." IDS_SHUTDOWN "Sl av..." + IDS_RESTART "Restart..." IDS_LAUNCH "Kjr..." IDS_START_HELP "Hjelp" IDS_SEARCH_FILES "Sk..." @@ -398,3 +399,4 @@ END #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-pl.rc b/reactos/base/shell/explorer/explorer-pl.rc index 06207712bd0..b79b3604d2b 100644 --- a/reactos/base/shell/explorer/explorer-pl.rc +++ b/reactos/base/shell/explorer/explorer-pl.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "Start" IDS_LOGOFF "Wyloguj..." IDS_SHUTDOWN "Zamknij system..." + IDS_RESTART "Restart..." IDS_LAUNCH "Uruchom..." IDS_START_HELP "Pomoc" IDS_SEARCH_FILES "Szukaj..." @@ -398,3 +399,4 @@ END #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-pt.rc b/reactos/base/shell/explorer/explorer-pt.rc index 07e74b9b3e2..1b760a0719a 100644 --- a/reactos/base/shell/explorer/explorer-pt.rc +++ b/reactos/base/shell/explorer/explorer-pt.rc @@ -98,6 +98,7 @@ BEGIN IDS_START "Iniciar" IDS_LOGOFF "Terminar sesso..." IDS_SHUTDOWN "Desligar..." + IDS_RESTART "Restart..." IDS_LAUNCH "Executar..." IDS_START_HELP "Ajuda" IDS_SEARCH_FILES "Procurar..." @@ -165,3 +166,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-ro.rc b/reactos/base/shell/explorer/explorer-ro.rc index 7247fc082b9..e65f2e833e3 100644 --- a/reactos/base/shell/explorer/explorer-ro.rc +++ b/reactos/base/shell/explorer/explorer-ro.rc @@ -134,6 +134,7 @@ BEGIN IDS_START "ncepe" IDS_LOGOFF "nchide sesiunea ..." IDS_SHUTDOWN "Oprire calculator ..." + IDS_RESTART "Restart..." IDS_LAUNCH "Pornire ..." IDS_START_HELP "Ajutor" IDS_SEARCH_FILES "Cutare Files..." @@ -243,3 +244,4 @@ END #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-ru.rc b/reactos/base/shell/explorer/explorer-ru.rc index c363fe531d5..2453f89f405 100644 --- a/reactos/base/shell/explorer/explorer-ru.rc +++ b/reactos/base/shell/explorer/explorer-ru.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "" IDS_LOGOFF " ..." IDS_SHUTDOWN "..." + IDS_RESTART "Restart..." IDS_LAUNCH "..." IDS_START_HELP "" IDS_SEARCH_FILES "..." @@ -398,3 +399,4 @@ END #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-sk.rc b/reactos/base/shell/explorer/explorer-sk.rc index 6a3f7aabcf9..fda3884e777 100644 --- a/reactos/base/shell/explorer/explorer-sk.rc +++ b/reactos/base/shell/explorer/explorer-sk.rc @@ -340,6 +340,7 @@ BEGIN IDS_START "tart" IDS_LOGOFF "Odhlsi..." IDS_SHUTDOWN "Vypn..." + IDS_RESTART "Restart..." IDS_LAUNCH "Spusti..." IDS_START_HELP "Pomocnk" IDS_SEARCH_FILES "Hada..." @@ -407,3 +408,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-sv.rc b/reactos/base/shell/explorer/explorer-sv.rc index fb83dd67314..0200675178c 100644 --- a/reactos/base/shell/explorer/explorer-sv.rc +++ b/reactos/base/shell/explorer/explorer-sv.rc @@ -325,6 +325,7 @@ BEGIN IDS_START "Start" IDS_LOGOFF "Logga ut..." IDS_SHUTDOWN "Stng av..." + IDS_RESTART "Restart..." IDS_LAUNCH "Kr..." IDS_START_HELP "Hjlp" IDS_SEARCH_FILES "Sk..." @@ -392,3 +393,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer-uk.rc b/reactos/base/shell/explorer/explorer-uk.rc index b63c904705b..921ed61cc94 100644 --- a/reactos/base/shell/explorer/explorer-uk.rc +++ b/reactos/base/shell/explorer/explorer-uk.rc @@ -330,6 +330,7 @@ BEGIN IDS_START "" IDS_LOGOFF " ..." IDS_SHUTDOWN "..." + IDS_RESTART "Restart..." IDS_LAUNCH "..." IDS_START_HELP "" IDS_SEARCH_FILES "..." @@ -397,3 +398,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/explorer.cpp b/reactos/base/shell/explorer/explorer.cpp index a37104ce9a2..4de57f68858 100644 --- a/reactos/base/shell/explorer/explorer.cpp +++ b/reactos/base/shell/explorer/explorer.cpp @@ -402,6 +402,7 @@ void IconCache::init() _icons[ICID_COMPUTER] = Icon(ICID_COMPUTER, IDI_COMPUTER, icon_size); _icons[ICID_LOGOFF] = Icon(ICID_LOGOFF, IDI_LOGOFF, icon_size); _icons[ICID_SHUTDOWN] = Icon(ICID_SHUTDOWN, IDI_SHUTDOWN, icon_size); + _icons[ICID_RESTART] = Icon(ICID_RESTART, IDI_RESTART, icon_size); _icons[ICID_BOOKMARK] = Icon(ICID_BOOKMARK, IDI_DOT_TRANS, icon_size); _icons[ICID_MINIMIZE] = Icon(ICID_MINIMIZE, IDI_MINIMIZE, icon_size); _icons[ICID_CONTROLPAN] = Icon(ICID_CONTROLPAN, IDI_CONTROLPAN, icon_size); diff --git a/reactos/base/shell/explorer/explorer_intres.rc b/reactos/base/shell/explorer/explorer_intres.rc index 71b34e513c4..050e128c70b 100644 --- a/reactos/base/shell/explorer/explorer_intres.rc +++ b/reactos/base/shell/explorer/explorer_intres.rc @@ -152,6 +152,7 @@ IDI_EXPLORER ICON DISCARDABLE "res/explorer.ico" IDI_STARTMENU ICON DISCARDABLE "res/startmenu.ico" IDI_LOGOFF ICON DISCARDABLE "res/logoff.ico" IDI_SHUTDOWN ICON DISCARDABLE "res/shutdown.ico" +IDI_RESTART ICON DISCARDABLE "res/restart.ico" IDI_ARROW ICON DISCARDABLE "res/arrow.ico" IDI_ARROW_SELECTED ICON DISCARDABLE "res/arrowsel.ico" IDI_APPICON ICON DISCARDABLE "res/appicon.ico" @@ -244,3 +245,4 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE "explorer.exe.ma ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/reactos/base/shell/explorer/globals.h b/reactos/base/shell/explorer/globals.h index 899ca7cf87f..1848771c139 100644 --- a/reactos/base/shell/explorer/globals.h +++ b/reactos/base/shell/explorer/globals.h @@ -81,6 +81,7 @@ enum ICON_ID { ICID_COMPUTER, ICID_LOGOFF, ICID_SHUTDOWN, + ICID_RESTART, ICID_BOOKMARK, ICID_MINIMIZE, ICID_CONTROLPAN, diff --git a/reactos/base/shell/explorer/res/restart.ico b/reactos/base/shell/explorer/res/restart.ico new file mode 100644 index 00000000000..31c1b5cd299 Binary files /dev/null and b/reactos/base/shell/explorer/res/restart.ico differ diff --git a/reactos/base/shell/explorer/resource.h b/reactos/base/shell/explorer/resource.h index 60872988f9f..678c106e50a 100644 --- a/reactos/base/shell/explorer/resource.h +++ b/reactos/base/shell/explorer/resource.h @@ -48,6 +48,7 @@ #define IDS_SHOW_HIDDEN_ICONS 43 #define IDS_HIDE_ICONS 44 #define IDS_TERMINATE 45 +#define IDS_RESTART 46 #define IDI_REACTOS 100 #define IDI_EXPLORER 101 #define IDI_STARTMENU 102 @@ -123,6 +124,7 @@ #define IDI_NETCONNS 175 #define IDI_ADMIN 176 #define IDI_RECENT 178 +#define IDI_RESTART 179 #define ID_VIEW_NAME 401 #define ID_VIEW_ALL_ATTRIBUTES 402 #define ID_VIEW_SELECTED_ATTRIBUTES 403 diff --git a/reactos/base/shell/explorer/taskbar/desktopbar.h b/reactos/base/shell/explorer/taskbar/desktopbar.h index 288142210a2..fd17c16a759 100644 --- a/reactos/base/shell/explorer/taskbar/desktopbar.h +++ b/reactos/base/shell/explorer/taskbar/desktopbar.h @@ -59,6 +59,7 @@ #define IDC_SEARCH_PROGRAM 0x1016 #define IDC_SEARCH 0x1017 #define IDC_TERMINATE 0x1018 +#define IDC_RESTART 0x1019 #define IDC_FIRST_MENU 0x3000 diff --git a/reactos/base/shell/explorer/taskbar/startmenu.cpp b/reactos/base/shell/explorer/taskbar/startmenu.cpp index d44db044dd5..7ba98ad51d5 100644 --- a/reactos/base/shell/explorer/taskbar/startmenu.cpp +++ b/reactos/base/shell/explorer/taskbar/startmenu.cpp @@ -1752,21 +1752,23 @@ LRESULT StartMenuRoot::Init(LPCREATESTRUCT pcs) #ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) - if (!g_Globals._SHRestricted || !SHRestricted(REST_NOCLOSE)) + if (!g_Globals._SHRestricted || SHRestricted(REST_STARTMENULOGOFF) != 1) #else if (IS_VALUE_NOT_ZERO(hkeyAdv, _T("StartMenuLogoff"))) #endif AddButton(ResString(IDS_LOGOFF), ICID_LOGOFF, false, IDC_LOGOFF); +#ifdef _ROS_ + AddButton(ResString(IDS_RESTART), ICID_RESTART, false, IDC_RESTART); +#endif #ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) - if (!g_Globals._SHRestricted || SHRestricted(REST_STARTMENULOGOFF) != 1) + if (!g_Globals._SHRestricted || !SHRestricted(REST_NOCLOSE)) #else if (IS_VALUE_ZERO(hkey, _T("NoClose"))) #endif AddButton(ResString(IDS_SHUTDOWN), ICID_SHUTDOWN, false, IDC_SHUTDOWN); - #ifndef _ROS_ AddButton(ResString(IDS_TERMINATE), ICID_LOGOFF, false, IDC_TERMINATE); #endif @@ -1940,9 +1942,15 @@ int StartMenuHandler::Command(int id, int code) case IDC_SHUTDOWN: CloseStartMenu(id); - ShowExitWindowsDialog(g_Globals._hwndDesktopBar); + ShowExitWindowsDialog(g_Globals._hwndDesktop); break; + case IDC_RESTART: + CloseStartMenu(id); + ShowRestartDialog(g_Globals._hwndDesktop, EWX_REBOOT); + /* An alternative way to do restart without shell32 help */ + //launch_file(_hwnd, TEXT("shutdown.exe"), SW_HIDE, TEXT("-r")); + break; // settings menu @@ -2149,6 +2157,15 @@ void ShowExitWindowsDialog(HWND hwndOwner) MessageBox(hwndOwner, TEXT("ExitWindowsDialog() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); } +void StartMenuHandler::ShowRestartDialog(HWND hwndOwner, UINT flags) +{ + static DynamicFct RestartDlg(TEXT("SHELL32"), 59); + + if (RestartDlg) + (*RestartDlg)(hwndOwner, (LPWSTR)L"You selected restart.\n\n", flags); + else + MessageBox(hwndOwner, TEXT("RestartDlg() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); +} void SettingsMenu::AddEntries() { diff --git a/reactos/base/shell/explorer/taskbar/startmenu.h b/reactos/base/shell/explorer/taskbar/startmenu.h index db9cc63902d..53bb6592e9f 100644 --- a/reactos/base/shell/explorer/taskbar/startmenu.h +++ b/reactos/base/shell/explorer/taskbar/startmenu.h @@ -348,6 +348,7 @@ protected: static void ShowLaunchDialog(HWND hwndOwner); static void ShowLogoffDialog(HWND hwndOwner); + static void ShowRestartDialog(HWND hwndOwner, UINT flags); static void ShowSearchDialog(); static void ShowSearchComputer(); };