Author: gedmurphy
Date: Sat Aug 25 19:51:55 2007
New Revision: 28549
URL:
http://svn.reactos.org/svn/reactos?rev=28549&view=rev
Log:
- implement restarting of services
- update the main interface to reflect the state of the service after an attempt to change
it's status
Modified:
trunk/reactos/base/applications/mscutils/servman/control.c
trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc
trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc
trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc
trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc
trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc
trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc
trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc
trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc
trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc
trunk/reactos/base/applications/mscutils/servman/mainwnd.c
Modified: trunk/reactos/base/applications/mscutils/servman/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/control.c (original)
+++ trunk/reactos/base/applications/mscutils/servman/control.c Sat Aug 25 19:51:55 2007
@@ -140,7 +140,6 @@
hProgDlg = CreateProgressDialog(Info->hMainWnd,
Info->CurrentService->lpServiceName,
IDS_PROGRESS_INFO_STOP);
-
if (hProgDlg)
{
ret = Control(Info,
@@ -161,7 +160,6 @@
hProgDlg = CreateProgressDialog(Info->hMainWnd,
Info->CurrentService->lpServiceName,
IDS_PROGRESS_INFO_PAUSE);
-
if (hProgDlg)
{
ret = Control(Info,
@@ -182,7 +180,6 @@
hProgDlg = CreateProgressDialog(Info->hMainWnd,
Info->CurrentService->lpServiceName,
IDS_PROGRESS_INFO_RESUME);
-
if (hProgDlg)
{
ret = Control(Info,
Modified: trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc Sat Aug 25 19:51:55
2007
@@ -68,7 +68,7 @@
FONT 8, "MS Shell Dlg",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Service Manager v0.5.1\nCopyright (C) 2005-2006\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
+ LTEXT "Service Manager v0.5.1\nCopyright (C) 2005-2007\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
PUSHBUTTON "Close", IDOK, 75, 162, 44, 15
ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
Modified: trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc Sat Aug 25 19:51:55
2007
@@ -68,7 +68,7 @@
FONT 8, "MS Shell Dlg",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Dienst-Manager v0.5.1\nCopyright (C) 2005-2006\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
+ LTEXT "Dienst-Manager v0.5.1\nCopyright (C) 2005-2007\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
PUSHBUTTON "Schließen", IDOK, 75, 162, 44, 15
ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
Modified: trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc Sat Aug 25 19:51:55
2007
@@ -68,7 +68,7 @@
FONT 8, "MS Shell Dlg",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Service Manager v0.5.1\nCopyright (C) 2005-2006\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
+ LTEXT "Service Manager v0.5.1\nCopyright (C) 2005-2007\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
PUSHBUTTON "Close", IDOK, 75, 162, 44, 15
ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
Modified: trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc Sat Aug 25 19:51:55
2007
@@ -69,7 +69,7 @@
FONT 8, "MS Shell Dlg",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Gestionnaire de services v0.5.1\nCopyright (C) 2005-2006\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
+ LTEXT "Gestionnaire de services v0.5.1\nCopyright (C) 2005-2007\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
PUSHBUTTON "Fermer", IDOK, 75, 162, 44, 15
ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
Modified: trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc Sat Aug 25 19:51:55
2007
@@ -68,7 +68,7 @@
FONT 8, "MS Shell Dlg",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Manajer Layanan v0.5.1\nHak Cipta (C) 2005-2006\noleh Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
+ LTEXT "Manajer Layanan v0.5.1\nHak Cipta (C) 2005-2007\noleh Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
PUSHBUTTON "Tutup", IDOK, 75, 162, 44, 15
ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
Modified: trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc Sat Aug 25 19:51:55
2007
@@ -68,7 +68,7 @@
FONT 8, "MS Shell Dlg",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Gestione Servizi v0.5.1\nCopyright (C) 2005-2006\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
+ LTEXT "Gestione Servizi v0.5.1\nCopyright (C) 2005-2007\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
PUSHBUTTON "Chiudi", IDOK, 75, 162, 44, 15
ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
Modified: trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc Sat Aug 25 19:51:55
2007
@@ -75,7 +75,7 @@
FONT 8, "MS Shell Dlg",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Service Manager v0.5.1\nCopyright (C) 2005-2006\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
+ LTEXT "Service Manager v0.5.1\nCopyright (C) 2005-2007\nby Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
PUSHBUTTON "Zamknij", IDOK, 75, 162, 44, 15
ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
Modified: trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc Sat Aug 25 19:51:55
2007
@@ -67,7 +67,7 @@
FONT 8, "MS Shell Dlg",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "Ìåíåäæåð ñëóæá v0.5\nCopyright (C) 2005-2006\nîò Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 30
+ LTEXT "Ìåíåäæåð ñëóæá v0.5\nCopyright (C) 2005-2007\nîò Ged Murphy
(gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 30
PUSHBUTTON "Çàêðûòü", IDOK, 75, 162, 44, 15
ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
Modified: trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc Sat Aug 25 19:51:55
2007
@@ -77,7 +77,7 @@
FONT 8, "MS Shell Dlg",0,0
STYLE WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
BEGIN
- LTEXT "â»Ãá¡ÃÁ¡ÒúÃÔ¡ÒèѴ¡Òà ÃØè¹ 0.5.1\nÅÔ¢ÊÔ·¸Ôì (C) 2005-2006\nâ´Â à¡é´
àÁÍÃì¿Õè (gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
+ LTEXT "â»Ãá¡ÃÁ¡ÒúÃÔ¡ÒèѴ¡Òà ÃØè¹ 0.5.1\nÅÔ¢ÊÔ·¸Ôì (C) 2005-2007\nâ´Â à¡é´
àÁÍÃì¿Õè (gedmurphy(a)gmail.com)"quot;, IDC_STATIC, 48, 7, 130, 26
PUSHBUTTON "»Ô´", IDOK, 75, 162, 44, 15
ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30
EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
ES_READONLY | ES_MULTILINE
Modified: trunk/reactos/base/applications/mscutils/servman/mainwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/mainwnd.c (original)
+++ trunk/reactos/base/applications/mscutils/servman/mainwnd.c Sat Aug 25 19:51:55 2007
@@ -639,13 +639,48 @@
case ID_START:
{
if (DoStart(Info))
+ {
+ LVITEM item;
+ TCHAR szStatus[64];
+ TCHAR buf[25];
+
+ LoadString(hInstance,
+ IDS_SERVICES_STARTED,
+ szStatus,
+ sizeof(szStatus) / sizeof(TCHAR));
+ item.pszText = szStatus;
+ item.iItem = Info->SelectedItem;
+ item.iSubItem = 2;
+ SendMessage(Info->hListView,
+ LVM_SETITEMTEXT,
+ item.iItem,
+ (LPARAM) &item);
+
+ Info->CurrentService->ServiceStatusProcess.dwCurrentState =
SERVICE_RUNNING;
SetMenuAndButtonStates(Info);
+ SetFocus(Info->hListView);
+ }
}
break;
case ID_STOP:
if (DoStop(Info))
+ {
+ LVITEM item;
+ TCHAR buf[25];
+
+ item.pszText = 0;
+ item.iItem = Info->SelectedItem;
+ item.iSubItem = 2;
+ SendMessage(Info->hListView,
+ LVM_SETITEMTEXT,
+ item.iItem,
+ (LPARAM) &item);
+
+ Info->CurrentService->ServiceStatusProcess.dwCurrentState =
SERVICE_STOPPED;
SetMenuAndButtonStates(Info);
+ SetFocus(Info->hListView);
+ }
break;
case ID_PAUSE:
@@ -657,17 +692,26 @@
break;
case ID_RESTART:
- {
- /* FIXME: remove this hack */
- SendMessage(Info->hMainWnd,
- WM_COMMAND,
- 0,
- ID_STOP);
- SendMessage(Info->hMainWnd,
- WM_COMMAND,
- 0,
- ID_START);
- }
+ if (DoStop(Info))
+ {
+ if(!DoStart(Info))
+ {
+ LVITEM item;
+ TCHAR buf[25];
+
+ item.pszText = 0;
+ item.iItem = Info->SelectedItem;
+ item.iSubItem = 2;
+ SendMessage(Info->hListView,
+ LVM_SETITEMTEXT,
+ item.iItem,
+ (LPARAM) &item);
+
+ Info->CurrentService->ServiceStatusProcess.dwCurrentState =
SERVICE_STOPPED;
+ SetMenuAndButtonStates(Info);
+ SetFocus(Info->hListView);
+ }
+ }
break;
case ID_HELP: