httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r767819 - in /httpd/httpd/trunk/support/win32: ApacheMonitor.c ApacheMonitor.h ApacheMonitor.rc
Date Thu, 23 Apr 2009 06:48:56 GMT
Author: wrowe
Date: Thu Apr 23 06:48:55 2009
New Revision: 767819

URL: http://svn.apache.org/viewvc?rev=767819&view=rev
Log:
Escape should simply close the dialog; Enter should perform the
appropriate button, or within the list, start and stop.  (also
clear up the transitions between the list focus and nonfocus).

Modified:
    httpd/httpd/trunk/support/win32/ApacheMonitor.c
    httpd/httpd/trunk/support/win32/ApacheMonitor.h
    httpd/httpd/trunk/support/win32/ApacheMonitor.rc

Modified: httpd/httpd/trunk/support/win32/ApacheMonitor.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/win32/ApacheMonitor.c?rev=767819&r1=767818&r2=767819&view=diff
==============================================================================
--- httpd/httpd/trunk/support/win32/ApacheMonitor.c (original)
+++ httpd/httpd/trunk/support/win32/ApacheMonitor.c Thu Apr 23 06:48:55 2009
@@ -970,8 +970,8 @@
                       g_lpMsg[IDS_MSG_SERVICES - IDS_MSG_FIRST]);
         SetWindowText(GetDlgItem(hDlg, IDC_SCONNECT),
                       g_lpMsg[IDS_MSG_CONNECT - IDS_MSG_FIRST]);
-        SetWindowText(GetDlgItem(hDlg, IDC_SEXIT),
-                      g_lpMsg[IDS_MSG_MNUEXIT - IDS_MSG_FIRST]);
+        SetWindowText(GetDlgItem(hDlg, IDCANCEL),
+                      g_lpMsg[IDS_MSG_OK - IDS_MSG_FIRST]);
         hListBox = GetDlgItem(hDlg, IDL_SERVICES);
         g_hwndStdoutList = GetDlgItem(hDlg, IDL_STDOUT);
         hStatusBar = CreateStatusWindow(0x0800 /* SBT_TOOLTIPS */
@@ -1050,6 +1050,7 @@
         }
         switch (lpdis->itemAction)
         {
+        case ODA_FOCUS:
         case ODA_SELECT:
         case ODA_DRAWENTIRE:
             g_hBmpPicture = (HBITMAP)SendMessage(lpdis->hwndItem,
@@ -1082,6 +1083,7 @@
                 if (g_hBmpPicture == g_hBmpStop)
                 {
                     Button_Enable(GetDlgItem(hDlg, IDC_SSTART), TRUE);
+                    Button_SetStyle(GetDlgItem(hDlg, IDC_SSTART), BS_DEFPUSHBUTTON, TRUE);
                     Button_Enable(GetDlgItem(hDlg, IDC_SSTOP), FALSE);
                     Button_Enable(GetDlgItem(hDlg, IDC_SRESTART), FALSE);
                 }
@@ -1089,6 +1091,7 @@
                 {
                     Button_Enable(GetDlgItem(hDlg, IDC_SSTART), FALSE);
                     Button_Enable(GetDlgItem(hDlg, IDC_SSTOP), TRUE);
+                    Button_SetStyle(GetDlgItem(hDlg, IDC_SSTOP), BS_DEFPUSHBUTTON, TRUE);
                     Button_Enable(GetDlgItem(hDlg, IDC_SRESTART), TRUE);
                 }
                 else {
@@ -1111,9 +1114,16 @@
                 else {
                     SendMessage(hStatusBar, SB_SETTEXT, 0, (LPARAM)_T(""));
                 }
-                SetTextColor(lpdis->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
-                SetBkColor(lpdis->hDC, GetSysColor(COLOR_HIGHLIGHT));
-                FillRect(lpdis->hDC, &rcBitmap, (HBRUSH)(COLOR_HIGHLIGHTTEXT));
+                if (lpdis->itemState & ODS_FOCUS) {
+                    SetTextColor(lpdis->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
+                    SetBkColor(lpdis->hDC, GetSysColor(COLOR_HIGHLIGHT));
+                    FillRect(lpdis->hDC, &rcBitmap, (HBRUSH)(COLOR_HIGHLIGHT+1));
+                }
+                else {
+                    SetTextColor(lpdis->hDC, GetSysColor(COLOR_INACTIVECAPTIONTEXT));
+                    SetBkColor(lpdis->hDC, GetSysColor(COLOR_INACTIVECAPTION));
+                    FillRect(lpdis->hDC, &rcBitmap, (HBRUSH)(COLOR_INACTIVECAPTION+1));
+                }
             }
             else
             {
@@ -1123,9 +1133,6 @@
             }
             TextOut(lpdis->hDC, XBITMAP + 6, y, szBuf, (int)_tcslen(szBuf));
             break;
-
-        case ODA_FOCUS:
-            break;
         }
         return TRUE;
     case WM_COMMAND:
@@ -1157,7 +1164,7 @@
             }
             break;
 
-        case IDOK:
+        case IDCANCEL:
             EndDialog(hDlg, TRUE);
             return TRUE;
 
@@ -1204,11 +1211,6 @@
             }
             return TRUE;
 
-        case IDC_SEXIT:
-            EndDialog(hDlg, TRUE);
-            SendMessage(g_hwndMain, WM_COMMAND, (WPARAM)IDM_EXIT, 0);
-            return TRUE;
-
         case IDC_SCONNECT:
             DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_DLGCONNECT),
                       hDlg, (DLGPROC)ConnectDlgProc);

Modified: httpd/httpd/trunk/support/win32/ApacheMonitor.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/win32/ApacheMonitor.h?rev=767819&r1=767818&r2=767819&view=diff
==============================================================================
--- httpd/httpd/trunk/support/win32/ApacheMonitor.h (original)
+++ httpd/httpd/trunk/support/win32/ApacheMonitor.h Thu Apr 23 06:48:55 2009
@@ -38,7 +38,6 @@
 #define IDC_SSTART                      117
 #define IDC_SSTOP                       118
 #define IDC_SRESTART                    119
-#define IDC_SEXIT                       120
 #define IDC_SMANAGER                    121
 #define IDD_DLGCONNECT                  122
 #define IDC_LREMOTE                     123
@@ -69,7 +68,8 @@
 #define IDS_MSG_SERVICES                275
 #define IDS_MSG_CONNECT                 276
 #define IDS_MSG_ECONNECT                277
-#define IDS_MSG_LAST                    277
+#define IDS_MSG_OK                      278
+#define IDS_MSG_LAST                    278
 #define IDM_SM_SERVICE                  0x1100
 #define IDM_SM_START                    0x1200
 #define IDM_SM_STOP                     0x1400

Modified: httpd/httpd/trunk/support/win32/ApacheMonitor.rc
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/win32/ApacheMonitor.rc?rev=767819&r1=767818&r2=767819&view=diff
==============================================================================
--- httpd/httpd/trunk/support/win32/ApacheMonitor.rc (original)
+++ httpd/httpd/trunk/support/win32/ApacheMonitor.rc Thu Apr 23 06:48:55 2009
@@ -34,21 +34,20 @@
 CAPTION "Apache Service Monitor"
 FONT 8, "MS Sans Serif"
 BEGIN
-    DEFPUSHBUTTON   "&OK",IDOK,298,49,50,14
+    PUSHBUTTON      "OK",IDCANCEL,298,161,50,14
+    CONTROL         IDB_BMPHEADER,IDC_STATIC,"Static",SS_BITMAP,0,0,349,38
     LTEXT           "Service St&atus :",IDC_SSTATUS,3,40,272,8
     LISTBOX         IDL_SERVICES,2,49,285,73,LBS_OWNERDRAWFIXED | 
                     LBS_HASSTRINGS | LBS_USETABSTOPS | LBS_NOINTEGRALHEIGHT | 
                     LBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP
     LISTBOX         IDL_STDOUT,2,124,285,51,LBS_NOINTEGRALHEIGHT | 
                     LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL
-    PUSHBUTTON      "&Start",IDC_SSTART,298,65,50,14
-    PUSHBUTTON      "S&top",IDC_SSTOP,298,81,50,14
-    PUSHBUTTON      "&Restart",IDC_SRESTART,298,97,50,14
-    PUSHBUTTON      "Ser&vices",IDC_SMANAGER,298,113,50,14
-    CONTROL         IDB_BMPHEADER,IDC_STATIC,"Static",SS_BITMAP,0,0,349,38
-    PUSHBUTTON      "&Connect",IDC_SCONNECT,298,129,50,14
-    PUSHBUTTON      "&Disconnect",IDC_SDISCONN,298,145,50,14
-    PUSHBUTTON      "E&xit",IDC_SEXIT,298,161,50,14
+    PUSHBUTTON      "&Start",IDC_SSTART,298,49,50,14
+    PUSHBUTTON      "S&top",IDC_SSTOP,298,65,50,14
+    PUSHBUTTON      "&Restart",IDC_SRESTART,298,81,50,14
+    PUSHBUTTON      "Ser&vices",IDC_SMANAGER,298,97,50,14
+    PUSHBUTTON      "&Connect",IDC_SCONNECT,298,113,50,14
+    PUSHBUTTON      "&Disconnect",IDC_SDISCONN,298,129,50,14
 END
 
 IDD_DLGCONNECT DIALOGEX 0, 0, 240, 54
@@ -86,6 +85,7 @@
     IDS_MSG_MNUSERVICES     "Open &Services"
     IDS_MSG_MNUSHOW         "&Open Apache Monitor"
     IDS_MSG_MNUEXIT         "E&xit"
+    IDS_MSG_OK              "OK"
     IDS_MSG_SRVSTART        "The %s service is starting."
     IDS_MSG_SRVSTARTED      "The %s service has started."
     IDS_MSG_SRVSTOP         "The %s service is stopping."



Mime
View raw message