redo the toolbar and app icons and a few other minor changes
authorGed Murphy <gedmurphy@reactos.org>
Wed, 11 Jan 2006 21:31:25 +0000 (21:31 +0000)
committerGed Murphy <gedmurphy@reactos.org>
Wed, 11 Jan 2006 21:31:25 +0000 (21:31 +0000)
svn path=/trunk/; revision=20789

reactos/subsys/system/servman/En.rc
reactos/subsys/system/servman/res/system.ico
reactos/subsys/system/servman/res/toolbar.bmp
reactos/subsys/system/servman/resource.h
reactos/subsys/system/servman/servman.c
reactos/subsys/system/servman/servman.h

index f6090b5..2c07113 100644 (file)
@@ -3,27 +3,27 @@ IDR_MAINMENU MENU
 BEGIN\r
   POPUP "&File"\r
   BEGIN\r
-    MENUITEM "E&xit",ID_EXIT\r
+    MENUITEM "E&xit",       ID_EXIT\r
   END\r
   POPUP "Action"\r
   BEGIN\r
-    MENUITEM "Start",ID_START\r
-    MENUITEM "Stop",ID_STOP\r
-    MENUITEM "Pause",ID_PAUSE\r
-    MENUITEM "Resume",ID_RESUME\r
-    MENUITEM "Restart",ID_RESTART\r
+    MENUITEM "Start",       ID_START\r
+    MENUITEM "Stop",        ID_STOP\r
+    MENUITEM "Pause",       ID_PAUSE\r
+    MENUITEM "Resume",      ID_RESUME\r
+    MENUITEM "Restart",     ID_RESTART\r
     MENUITEM SEPARATOR\r
-    MENUITEM "Refresh",ID_REFRESH\r
+    MENUITEM "Refresh",     ID_REFRESH\r
     MENUITEM SEPARATOR\r
-    MENUITEM "Properties",ID_PROP\r
+    MENUITEM "Properties",  ID_PROP\r
   END\r
   POPUP "View"\r
   BEGIN\r
-    MENUITEM "Customize",ID_VIEW_CUSTOMIZE\r
+    MENUITEM "Customize",   ID_VIEW_CUSTOMIZE\r
   END\r
   POPUP "Help"\r
   BEGIN\r
-    MENUITEM "About",ID_ABOUT\r
+    MENUITEM "About",       ID_ABOUT\r
   END\r
 END\r
 \r
@@ -31,28 +31,28 @@ END
 IDR_POPUP MENU\r
 BEGIN\r
   POPUP "popup"\r
-  BEGIN  \r
-    MENUITEM "Start",ID_START\r
-    MENUITEM "Stop",ID_STOP\r
-    MENUITEM "Pause",ID_PAUSE\r
-    MENUITEM "Resume",ID_RESUME\r
-    MENUITEM "Restart",ID_RESTART\r
+  BEGIN\r
+    MENUITEM "Start",       ID_START\r
+    MENUITEM "Stop",        ID_STOP\r
+    MENUITEM "Pause",       ID_PAUSE\r
+    MENUITEM "Resume",      ID_RESUME\r
+    MENUITEM "Restart",     ID_RESTART\r
     MENUITEM SEPARATOR\r
     POPUP "All tasks"\r
     BEGIN\r
-      MENUITEM "Start",ID_START\r
-      MENUITEM "Stop",ID_STOP\r
-      MENUITEM "Pause",ID_PAUSE\r
-      MENUITEM "Resume",ID_RESUME\r
-      MENUITEM "Restart",ID_RESTART\r
-      MENUITEM "Refresh",ID_REFRESH\r
+      MENUITEM "Start",     ID_START\r
+      MENUITEM "Stop",      ID_STOP\r
+      MENUITEM "Pause",     ID_PAUSE\r
+      MENUITEM "Resume",    ID_RESUME\r
+      MENUITEM "Restart",   ID_RESTART\r
+      MENUITEM "Refresh",   ID_REFRESH\r
     END\r
     MENUITEM SEPARATOR\r
-    MENUITEM "Refresh",ID_REFRESH\r
+    MENUITEM "Refresh",     ID_REFRESH\r
     MENUITEM SEPARATOR\r
-    MENUITEM "Properties",ID_PROP\r
+    MENUITEM "Properties",  ID_PROP\r
     MENUITEM SEPARATOR\r
-    MENUITEM "About",ID_HELP\r
+    MENUITEM "Help",        ID_HELP\r
   END\r
 END\r
 \r
@@ -119,21 +119,7 @@ END
 STRINGTABLE DISCARDABLE\r
 BEGIN\r
   IDS_NUM_SERVICES "Num Services: %d"\r
-\r
-  IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA."\r
-  /*"This program is free software; you can redistribute it "\r
-              "and/or modify it under the terms of the GNU Lesser General "\r
-              "Public License as published by the Free Software Foundation; "\r
-              "either version 2.1 of the License, or (at your option) any "\r
-              "later version.\r\n\r\nThis program is distributed in the hope "\r
-              "that it will be useful, but WITHOUT ANY WARRANTY; without even "\r
-              "the implied warranty of MERCHANTABILITY or FITNESS FOR A "\r
-              "PARTICULAR PURPOSE.  See the GNU General Public License for more "\r
-              "details.\r\n\r\nYou should have received a copy of the GNU "\r
-              "General Public License along with this program; if not, write "\r
-              "to the Free Software Foundation, Inc., 59 Temple Place - Suite "\r
-              "330, Boston, MA  02111-1307, USA." */\r
-\r
+  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."\r
 END\r
 \r
 STRINGTABLE DISCARDABLE\r
index 7e69845..2e37e2b 100644 (file)
Binary files a/reactos/subsys/system/servman/res/system.ico and b/reactos/subsys/system/servman/res/system.ico differ
index b706a24..5f26621 100644 (file)
Binary files a/reactos/subsys/system/servman/res/toolbar.bmp and b/reactos/subsys/system/servman/res/toolbar.bmp differ
index 8774a45..8880482 100644 (file)
 #define TBICON_PROP         0\r
 #define TBICON_REFRESH      1\r
 #define TBICON_EXPORT       2\r
-#define TBICON_START        3\r
-#define TBICON_STOP         4\r
-#define TBICON_PAUSE        5\r
-#define TBICON_RESTART      6\r
-#define TBICON_NEW          7\r
+#define TBICON_NEW          3\r
+#define TBICON_START        4\r
+#define TBICON_STOP         5\r
+#define TBICON_PAUSE        6\r
+#define TBICON_RESTART      7\r
 #define TBICON_HELP         8\r
 #define TBICON_EXIT         9\r
 \r
index 0d00680..eedc548 100644 (file)
@@ -25,8 +25,6 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
     {\r
         case WM_CREATE:\r
         {\r
-             //HFONT hfDefault;\r
-\r
             TBADDBITMAP tbab;\r
             INT iImageOffset;\r
             INT statwidths[] = {110, -1}; /* widths of status bar */\r
@@ -41,18 +39,21 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                 {TBICON_EXPORT,  ID_EXPORT,  TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},    /* export */\r
 \r
                 /* Note: First item for a seperator is its width in pixels */\r
-                {25, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},                             /* separator */\r
+                {15, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},                            /* separator */\r
+\r
+                {TBICON_NEW,     ID_NEW,   TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },     /* create */\r
+\r
+                {15, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},                            /* separator */\r
 \r
                 {TBICON_START,   ID_START,   TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },   /* start */\r
                 {TBICON_STOP,    ID_STOP,    TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },   /* stop */\r
                 {TBICON_PAUSE,   ID_PAUSE,   TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },   /* pause */\r
                 {TBICON_RESTART, ID_RESTART, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },   /* restart */\r
 \r
-                {25, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},                             /* separator */\r
+                {15, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},                            /* separator */\r
 \r
-                {TBICON_NEW,     ID_NEW,   TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },   /* start */\r
-                {TBICON_HELP,    ID_HELP,    TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },   /* stop */\r
-                {TBICON_EXIT,    ID_EXIT,   TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },   /* pause */\r
+                {TBICON_HELP,    ID_HELP,    TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },   /* help */\r
+                {TBICON_EXIT,    ID_EXIT,   TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 },    /* exit */\r
 \r
             };\r
 \r
@@ -74,25 +75,20 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
             /* Send the TB_BUTTONSTRUCTSIZE message, which is required for backward compatibility */\r
             SendMessage(hTool, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);\r
 \r
-            /* Add standard image list */\r
-            tbab.hInst = HINST_COMMCTRL;\r
-            tbab.nID = IDB_STD_SMALL_COLOR;\r
-            SendMessage(hTool, TB_ADDBITMAP, 0, (LPARAM) &tbab);\r
-\r
             /* Add custom images */\r
             tbab.hInst = hInstance;\r
             tbab.nID = IDB_BUTTONS;\r
-            iImageOffset = (INT)SendMessage(hTool, TB_ADDBITMAP, 11, (LPARAM)&tbab);\r
+            iImageOffset = (INT)SendMessage(hTool, TB_ADDBITMAP, NUM_BUTTONS, (LPARAM)&tbab);\r
             tbb[0].iBitmap += iImageOffset; /* properties */\r
             tbb[1].iBitmap += iImageOffset; /* refresh */\r
             tbb[2].iBitmap += iImageOffset; /* export */\r
-            tbb[4].iBitmap += iImageOffset; /* start */\r
-            tbb[5].iBitmap += iImageOffset; /* stop */\r
-            tbb[6].iBitmap += iImageOffset; /* pause */\r
-            tbb[7].iBitmap += iImageOffset; /* restart */\r
-            tbb[9].iBitmap += iImageOffset; /* new */\r
-            tbb[10].iBitmap += iImageOffset; /* help */\r
-            tbb[11].iBitmap += iImageOffset; /* exit */\r
+            tbb[4].iBitmap += iImageOffset; /* new */\r
+            tbb[6].iBitmap += iImageOffset; /* start */\r
+            tbb[7].iBitmap += iImageOffset; /* stop */\r
+            tbb[8].iBitmap += iImageOffset; /* pause */\r
+            tbb[9].iBitmap += iImageOffset; /* restart */\r
+            tbb[11].iBitmap += iImageOffset; /* help */\r
+            tbb[12].iBitmap += iImageOffset; /* exit */\r
 \r
             /* Add buttons to toolbar */\r
             SendMessage(hTool, TB_ADDBUTTONS, NUM_BUTTONS, (LPARAM) &tbb);\r
@@ -126,21 +122,21 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 \r
             /* name */\r
             lvc.iSubItem = 0;\r
-            lvc.cx       = 160;\r
+            lvc.cx       = 150;\r
             LoadString(hInstance, IDS_FIRSTCOLUMN, szTemp, 256);\r
             lvc.pszText  = szTemp;\r
             ListView_InsertColumn(hListView, 0, &lvc);\r
 \r
             /* description */\r
             lvc.iSubItem = 1;\r
-            lvc.cx       = 260;\r
+            lvc.cx       = 240;\r
             LoadString(hInstance, IDS_SECONDCOLUMN, szTemp, 256);\r
             lvc.pszText  = szTemp;\r
             ListView_InsertColumn(hListView, 1, &lvc);\r
 \r
             /* status */\r
             lvc.iSubItem = 2;\r
-            lvc.cx       = 75;\r
+            lvc.cx       = 55;\r
             LoadString(hInstance, IDS_THIRDCOLUMN, szTemp, 256);\r
             lvc.pszText  = szTemp;\r
             ListView_InsertColumn(hListView, 2, &lvc);\r
@@ -232,7 +228,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
            case WM_NOTIFY:\r
         {\r
             LPNMITEMACTIVATE item;\r
-            \r
+\r
 \r
             switch (((LPNMHDR) lParam)->code)\r
             {\r
@@ -247,10 +243,10 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                     UINT idButton;\r
 \r
                     lpttt = (LPTOOLTIPTEXT) lParam;\r
-                    lpttt->hinst = hInstance;\r
+                    //lpttt->hinst = hInstance;\r
 \r
-                    // Specify the resource identifier of the descriptive\r
-                    // text for the given button.\r
+                    /* Specify the resource identifier of the descriptive\r
+                     * text for the given button. */\r
                     idButton = (UINT)lpttt->hdr.idFrom;\r
                     switch (idButton)\r
                     {\r
@@ -318,10 +314,11 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
             {\r
                 int xPos, yPos;\r
 \r
-                xPos = GET_X_LPARAM(lParam); \r
+                xPos = GET_X_LPARAM(lParam);\r
                 yPos = GET_Y_LPARAM(lParam);\r
 \r
-                TrackPopupMenuEx(hShortcutMenu, TPM_RIGHTBUTTON, xPos, yPos, hwnd, NULL);\r
+                TrackPopupMenuEx(hShortcutMenu, TPM_RIGHTBUTTON,\r
+                                 xPos, yPos, hwnd, NULL);\r
             }\r
         break;\r
 \r
@@ -333,8 +330,8 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                 break;\r
 \r
                 case ID_REFRESH:\r
-                    if (! RefreshServiceList() )\r
-                        GetError(0);\r
+                    RefreshServiceList();\r
+                break;\r
 \r
                 case ID_EXPORT:\r
                 break;\r
@@ -425,7 +422,7 @@ int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance,
            ClassName,\r
            _T("ReactOS Service Manager"),\r
            WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,\r
-           CW_USEDEFAULT, CW_USEDEFAULT, 700, 500,\r
+           CW_USEDEFAULT, CW_USEDEFAULT, 650, 450,\r
            NULL, NULL, hInstance, NULL);\r
 \r
     if(hMainWnd == NULL)\r
index 8ff0c0a..8fee996 100644 (file)
@@ -10,7 +10,7 @@
 #include "resource.h"\r
 \r
 #define MAX_KEY_LENGTH 256\r
-#define NUM_BUTTONS 12\r
+#define NUM_BUTTONS 13\r
 \r
 BOOL RefreshServiceList(VOID);\r
 \r