From ea7bc6c78ac8644bd67311fced6785ec822aa91b Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sat, 17 Jan 2004 17:25:18 +0000 Subject: [PATCH] output warning message before launching more than one program at one time svn path=/trunk/; revision=7725 --- reactos/subsys/system/explorer/dialogs/searchprogram.cpp | 5 ++++- reactos/subsys/system/explorer/explorer_intres.h | 1 + reactos/subsys/system/explorer/explorer_intres.rc | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/reactos/subsys/system/explorer/dialogs/searchprogram.cpp b/reactos/subsys/system/explorer/dialogs/searchprogram.cpp index c9c671be913..bd6ca84fef7 100644 --- a/reactos/subsys/system/explorer/dialogs/searchprogram.cpp +++ b/reactos/subsys/system/explorer/dialogs/searchprogram.cpp @@ -290,7 +290,10 @@ void FindProgramDlg::LaunchSelected() Lock lock(_thread._crit_sect); int count = ListView_GetSelectedCount(_list_ctrl); - ///@todo ask user if there are many selected items + + if (count > 1) + if (MessageBox(_hwnd, ResString(IDS_LAUNCH_MANY_PROGRAMS), ResString(IDS_TITLE), MB_OKCANCEL) != IDOK) + return; for(int idx=-1; (idx=ListView_GetNextItem(_list_ctrl, idx, LVNI_SELECTED))!=-1; ) { LPARAM lparam = ListView_GetItemData(_list_ctrl, idx); diff --git a/reactos/subsys/system/explorer/explorer_intres.h b/reactos/subsys/system/explorer/explorer_intres.h index 8ecef06fb3f..c0afdbfe633 100644 --- a/reactos/subsys/system/explorer/explorer_intres.h +++ b/reactos/subsys/system/explorer/explorer_intres.h @@ -29,6 +29,7 @@ #define IDS_ALL_USERS 25 #define IDS_SEARCH 26 #define IDS_ABOUT_EXPLORER 27 +#define IDS_LAUNCH_MANY_PROGRAMS 28 #define IDI_REACTOS 100 #define IDI_EXPLORER 101 #define IDI_STARTMENU 102 diff --git a/reactos/subsys/system/explorer/explorer_intres.rc b/reactos/subsys/system/explorer/explorer_intres.rc index 1dad39db2a2..059b5215602 100644 --- a/reactos/subsys/system/explorer/explorer_intres.rc +++ b/reactos/subsys/system/explorer/explorer_intres.rc @@ -116,6 +116,8 @@ BEGIN IDS_ALL_USERS "All Users\\" IDS_SEARCH "Cãutare..." IDS_ABOUT_EXPLORER "&Despre Explorer..." + IDS_LAUNCH_MANY_PROGRAMS + "You have selected more than one program.\nAre you sure you want to launch all of them?" END #endif // Romanian resources @@ -463,6 +465,8 @@ BEGIN IDS_ALL_USERS "Alle Benutzer\\" IDS_SEARCH "Suche" IDS_ABOUT_EXPLORER "&Über Explorer..." + IDS_LAUNCH_MANY_PROGRAMS + "Sie haben mehrere Programme ausgewählt.\nSind Sie sicher, daß sie diese alle starten wollen?" END #endif // German (Germany) resources @@ -724,6 +728,8 @@ BEGIN IDS_ALL_USERS "All Users\\" IDS_SEARCH "Search" IDS_ABOUT_EXPLORER "&About Explorer..." + IDS_LAUNCH_MANY_PROGRAMS + "You have selected more than one program.\nAre you sure you want to launch all of them?" END #endif // English (U.S.) resources @@ -834,6 +840,8 @@ BEGIN IDS_ALL_USERS "Tous les utilisateurs\\" IDS_SEARCH "Rechercher" IDS_ABOUT_EXPLORER "A propos de l'explorateur..." + IDS_LAUNCH_MANY_PROGRAMS + "You have selected more than one program.\nAre you sure you want to launch all of them?" END #endif // French (France) resources