From d99cbc1ee2dcd8bafe0c3bd43d870bb76e2a5076 Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Wed, 30 Sep 2009 20:59:21 +0000 Subject: [PATCH] Patch by Viliam Lejcik (lejcik =at= gmail com). Fixes bug #4858. With the blessing of Ged Murphy. svn path=/trunk/; revision=43245 --- .../applications/mscutils/servman/dependencies.c | 6 +++--- .../applications/mscutils/servman/lang/bg-BG.rc | 2 ++ .../applications/mscutils/servman/lang/de-DE.rc | 2 ++ .../applications/mscutils/servman/lang/el-GR.rc | 2 ++ .../applications/mscutils/servman/lang/es-ES.rc | 2 ++ .../applications/mscutils/servman/lang/fr-FR.rc | 2 ++ .../applications/mscutils/servman/lang/id-ID.rc | 2 ++ .../applications/mscutils/servman/lang/ko-KR.rc | 2 ++ .../applications/mscutils/servman/lang/no-NO.rc | 2 ++ .../applications/mscutils/servman/lang/pl-PL.rc | 2 ++ .../applications/mscutils/servman/lang/ru-RU.rc | 2 ++ .../applications/mscutils/servman/lang/sk-SK.rc | 1 + .../applications/mscutils/servman/lang/th-TH.rc | 2 ++ .../applications/mscutils/servman/lang/uk-UA.rc | 2 ++ .../base/applications/mscutils/servman/mainwnd.c | 15 ++++++++++++++- 15 files changed, 42 insertions(+), 4 deletions(-) diff --git a/reactos/base/applications/mscutils/servman/dependencies.c b/reactos/base/applications/mscutils/servman/dependencies.c index a36618abf01..7e753f5931e 100644 --- a/reactos/base/applications/mscutils/servman/dependencies.c +++ b/reactos/base/applications/mscutils/servman/dependencies.c @@ -88,7 +88,7 @@ GetServiceDependents(SC_HANDLE hService, DWORD dwCount; if (EnumDependentServices(hService, - SERVICE_ACTIVE, + SERVICE_STATE_ALL, NULL, 0, &dwBytesNeeded, @@ -108,7 +108,7 @@ GetServiceDependents(SC_HANDLE hService, if (lpDependencies) { if (EnumDependentServices(hService, - SERVICE_ACTIVE, + SERVICE_STATE_ALL, lpDependencies, dwBytesNeeded, &dwBytesNeeded, @@ -141,7 +141,7 @@ HasDependentServices(SC_HANDLE hService) if (hService) { if (!EnumDependentServices(hService, - SERVICE_ACTIVE, + SERVICE_STATE_ALL, NULL, 0, &dwBytesNeeded, diff --git a/reactos/base/applications/mscutils/servman/lang/bg-BG.rc b/reactos/base/applications/mscutils/servman/lang/bg-BG.rc index 72bb184af6b..fe916278ab3 100644 --- a/reactos/base/applications/mscutils/servman/lang/bg-BG.rc +++ b/reactos/base/applications/mscutils/servman/lang/bg-BG.rc @@ -194,6 +194,8 @@ STRINGTABLE DISCARDABLE BEGIN /* IDS_NUM_SERVICES "Num Services: %d" */ IDS_NUM_SERVICES "Áðîé óñëóãè: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program 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 General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/de-DE.rc b/reactos/base/applications/mscutils/servman/lang/de-DE.rc index 15f61651ac8..5f0f3587399 100644 --- a/reactos/base/applications/mscutils/servman/lang/de-DE.rc +++ b/reactos/base/applications/mscutils/servman/lang/de-DE.rc @@ -191,6 +191,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Anzahl der Dienste: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "Dieses Programm ist kostenlos; Sie können es frei verteilen mit od. ohne Änderungen unter der GNU Lesser General Public License wie es von der Free Software Foundation veröffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine spätere Version (ihrer Wahl).\r\n\r\nThis program 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 General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/el-GR.rc b/reactos/base/applications/mscutils/servman/lang/el-GR.rc index b5544526934..2fc3fb0db1c 100644 --- a/reactos/base/applications/mscutils/servman/lang/el-GR.rc +++ b/reactos/base/applications/mscutils/servman/lang/el-GR.rc @@ -191,6 +191,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Num Services: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program 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 General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/es-ES.rc b/reactos/base/applications/mscutils/servman/lang/es-ES.rc index 6e4c68a047a..df08aca3d57 100644 --- a/reactos/base/applications/mscutils/servman/lang/es-ES.rc +++ b/reactos/base/applications/mscutils/servman/lang/es-ES.rc @@ -191,6 +191,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Núm Servicios: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program 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 General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/fr-FR.rc b/reactos/base/applications/mscutils/servman/lang/fr-FR.rc index 7a204f3276c..2193e30eef4 100644 --- a/reactos/base/applications/mscutils/servman/lang/fr-FR.rc +++ b/reactos/base/applications/mscutils/servman/lang/fr-FR.rc @@ -195,6 +195,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Services: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publiée par la Free Software Foundation; dans sa version 2 (ou selon votre préférence) toute version ultérieure.\r\n\r\nCe programme est distribué dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE; sans même une garantie implicite de COMMERCIABILITÉ ou DE CONFORMITÉ A UNE UTILISATION PARTICULIÈRE. \r\n\r\nVoir la Licence Publique Générale GNU pour plus de détails. Vous devriez avoir reçu un exemplaire de la Licence Publique Générale GNU avec ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/id-ID.rc b/reactos/base/applications/mscutils/servman/lang/id-ID.rc index e2b1be77af3..1e8ee5a3805 100644 --- a/reactos/base/applications/mscutils/servman/lang/id-ID.rc +++ b/reactos/base/applications/mscutils/servman/lang/id-ID.rc @@ -191,6 +191,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Jumlah Layanan: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "Program ini adalah software bebas; anda dapat mendistribusikan dan/atau mengubahnya di bawah term GNU General Public License seperti dipublikasikan oleh Free Software Foundation; baik Lisensi versi 2, atau (menurut opini anda) setiap versi berikutnya.\r\n\r\nProgram ini didistribusikan dengan harapan ia akan berguna, tetapi TANPA JAMINAN APAPUN; bahkan tanpa jaminan berarti dari MERCANTABILITAS atau KECUKUPAN UNTUK KEPERLUAN TERTENTU. Lihat GNU General Public License untuk lebih jelasnya.\r\n\r\nAnda seharusnya menerima duplikat GNU General Public License bersamaan dengan program ini; jika tidak, tulis ke Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/ko-KR.rc b/reactos/base/applications/mscutils/servman/lang/ko-KR.rc index b932c3124ef..c9e192063e5 100644 --- a/reactos/base/applications/mscutils/servman/lang/ko-KR.rc +++ b/reactos/base/applications/mscutils/servman/lang/ko-KR.rc @@ -194,6 +194,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "¸ðµç ¼­ºñ½º: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program 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 General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/no-NO.rc b/reactos/base/applications/mscutils/servman/lang/no-NO.rc index d8a3d9e833e..2193f6bd7ca 100644 --- a/reactos/base/applications/mscutils/servman/lang/no-NO.rc +++ b/reactos/base/applications/mscutils/servman/lang/no-NO.rc @@ -191,6 +191,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Num tjeneste: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i håp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORMÅL. Se på GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/pl-PL.rc b/reactos/base/applications/mscutils/servman/lang/pl-PL.rc index d8a11857738..cb285073ef0 100644 --- a/reactos/base/applications/mscutils/servman/lang/pl-PL.rc +++ b/reactos/base/applications/mscutils/servman/lang/pl-PL.rc @@ -198,6 +198,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Numer us³ugi: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; mo¿esz go rozprowadzaæ dalej i/lub modyfikowaæ na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundacjê Wolnego Oprogramowania - wed³ug wersji 2 tej Licencji lub (wed³ug Twojego wyboru) którejœ z póŸniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadziej¹, i¿ bêdzie on u¿yteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyœlnej gwarancji PRZYDATNOŒCI HANDLOWEJ albo PRZYDATNOŒCI DO OKREŒLONYCH ZASTOSOWAÑ. W celu uzyskania bli¿szych informacji siêgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnoœci¹ wraz z niniejszym programem otrzyma³eœ te¿ egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeœli nie - napisz do Free Software Foundation, Inc., 59 Temple Place, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/ru-RU.rc b/reactos/base/applications/mscutils/servman/lang/ru-RU.rc index 43b95521254..c814b38df9d 100644 --- a/reactos/base/applications/mscutils/servman/lang/ru-RU.rc +++ b/reactos/base/applications/mscutils/servman/lang/ru-RU.rc @@ -190,6 +190,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Íîìåð ñëóæáû: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "Ýòà ïðîãðàììà ÿâëÿåòñÿ ñâîáîäíûì ïðîãðàììíûì îáåñïå÷åíèåì; Âû ìîæåòå ðàñïðîñòðàíÿòü è/èëè èçìåíÿòü åå â ñîîòâåòñòâèè ñ ëèöåíçèåé GNU General Public License âåðñèè 2 èëè áîëåå ïîçäíåé, îïóáëèêîâàííîé Free Software Foundation.\r\n\r\nÝòà ïðîãðàììà ðàñïðîñòðàíÿåòñÿ ñ íàäåæäîé, ÷òî îíà ìîæåò áûòü ïîëåçíà, íî ÁÅÇ ÂÑßÊÎÉ ÃÀÐÀÍÒÈÈ; íå ïîäðàçóìåâàåòñÿ äàæå ÐÀÁÎÒÎÑÏÎÑÎÁÍÎÑÒÜ èëè ÏÐÈÃÎÄÍÎÑÒÜ ÄËß ÂÛÏÎËÍÅÍÈß ÍÅÎÁÕÎÄÈÌÛÕ ÇÀÄÀ×. Ñì. GNU General Public License äëÿ ïîëó÷åíèÿ äîïîëíèòåëüíûõ ñâåäåíèé.\r\n\r\nÂû äîëæíû ïîëó÷èòü êîïèþ ëèöåíçèè GNU âìåñòå ñ ýòîé ïðîãðàììîé, â ïðîòèâíîì ñëó÷àå îáðàùàéòåñü â Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/sk-SK.rc b/reactos/base/applications/mscutils/servman/lang/sk-SK.rc index d01af597474..420ee38116b 100644 --- a/reactos/base/applications/mscutils/servman/lang/sk-SK.rc +++ b/reactos/base/applications/mscutils/servman/lang/sk-SK.rc @@ -210,6 +210,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Poèet služieb: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "<Žiadne závislosti>" IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program 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 General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/th-TH.rc b/reactos/base/applications/mscutils/servman/lang/th-TH.rc index 54ed6f5c52a..1bb2e2ea427 100644 --- a/reactos/base/applications/mscutils/servman/lang/th-TH.rc +++ b/reactos/base/applications/mscutils/servman/lang/th-TH.rc @@ -200,6 +200,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Num Services: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program 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 General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/lang/uk-UA.rc b/reactos/base/applications/mscutils/servman/lang/uk-UA.rc index 573575927f2..4a13377b8c4 100644 --- a/reactos/base/applications/mscutils/servman/lang/uk-UA.rc +++ b/reactos/base/applications/mscutils/servman/lang/uk-UA.rc @@ -199,6 +199,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_NUM_SERVICES "Íîìåð ñëóæáè: %d" + IDS_STOP_DEPENDS "When %s stops, these other services will also stop" + IDS_NO_DEPENDS "" IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program 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 General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." END diff --git a/reactos/base/applications/mscutils/servman/mainwnd.c b/reactos/base/applications/mscutils/servman/mainwnd.c index 6c72e0a91b5..d4534b96f9d 100644 --- a/reactos/base/applications/mscutils/servman/mainwnd.c +++ b/reactos/base/applications/mscutils/servman/mainwnd.c @@ -643,11 +643,14 @@ MainWndProc(HWND hwnd, if (!InitMainWnd(Info)) return -1; + /* Fill the list-view before showing the main window */ + RefreshServiceList(Info); + /* Show the window */ ShowWindow(hwnd, Info->nCmdShow); - RefreshServiceList(Info); + SetFocus(Info->hListView); } break; @@ -686,6 +689,16 @@ MainWndProc(HWND hwnd, } break; + case NM_RETURN: + { + SendMessage(hwnd, + WM_COMMAND, + //ID_PROP, + MAKEWPARAM((WORD)ID_PROP, (WORD)0), + 0); + } + break; + case LVN_COLUMNCLICK: { LPNMLISTVIEW pnmv = (LPNMLISTVIEW) lParam;