moved settings entries into submenu
authorMartin Fuchs <fuchs.martin@gmail.com>
Sun, 28 Sep 2003 21:28:30 +0000 (21:28 +0000)
committerMartin Fuchs <fuchs.martin@gmail.com>
Sun, 28 Sep 2003 21:28:30 +0000 (21:28 +0000)
svn path=/trunk/; revision=6189

reactos/subsys/system/explorer/explorer_intres.h
reactos/subsys/system/explorer/explorer_intres.rc
reactos/subsys/system/explorer/taskbar/desktopbar.h
reactos/subsys/system/explorer/taskbar/startmenu.cpp
reactos/subsys/system/explorer/taskbar/startmenu.h

index 0e3e922..25893f0 100644 (file)
@@ -24,6 +24,7 @@
 #define IDS_SETTINGS_MENU               20
 #define IDS_CONTROL_PANEL               21
 #define IDS_PRINTERS                    22
+#define IDS_BROWSE                      23
 #define IDI_REACTOS                     100
 #define IDI_EXPLORER                    101
 #define IDI_STARTMENU                   102
@@ -51,6 +52,7 @@
 #define ID_REFRESH                      1704
 #define ID_ABOUT                        1803
 #define IDC_FILETREE                    10001
+#define ID_EXPLORER_FAQ                 10002
 #define ID_WINDOW_AUTOSORT              0x8003
 #define ID_VIEW_FULLSCREEN              0x8004
 #define ID_PREFERED_SIZES               0x8005
@@ -68,7 +70,6 @@
 #define ID_FILE_EXIT                    0xE141
 #define ID_HELP_USING                   0xE144
 #define ID_HELP                         0xE146
-#define ID_EXPLORER_FAQ                 10002
 
 // Next default values for new objects
 // 
index 86e9d63..0be9922 100644 (file)
@@ -110,6 +110,7 @@ BEGIN
     IDS_SETTINGS_MENU       "Settings Menu"
     IDS_CONTROL_PANEL       "Control Panel"
     IDS_PRINTERS            "Printers"
+    IDS_BROWSE              "Browse Files..."
 END
 
 #endif    // Romanian resources
@@ -370,6 +371,7 @@ BEGIN
     IDS_SETTINGS_MENU       "Einstellungen-Menu"
     IDS_CONTROL_PANEL       "Systemsteuerung"
     IDS_PRINTERS            "Drucker"
+    IDS_BROWSE              "Dateien..."
 END
 
 #endif    // German (Germany) resources
@@ -583,6 +585,7 @@ BEGIN
     IDS_SETTINGS_MENU       "Settings Menu"
     IDS_CONTROL_PANEL       "Control Panel"
     IDS_PRINTERS            "Printers"
+    IDS_BROWSE              "Browse Files..."
 END
 
 #endif    // English (U.S.) resources
index f7ed8a4..131ad5c 100644 (file)
@@ -56,6 +56,7 @@
 #define        IDC_SETTINGS_MENU               0x1011
 #define        IDC_CONTROL_PANEL               0x1012
 #define        IDC_PRINTERS                    0x1013
+#define        IDC_BROWSE                              0x1014
 
 #define        IDC_FIRST_MENU                  0x3000
 
index 5eb4873..c184640 100644 (file)
@@ -677,8 +677,7 @@ LRESULT     StartMenuRoot::Init(LPCREATESTRUCT pcs)
        AddButton(ResString(IDS_RECENT),                0, true, IDC_RECENT);
        AddButton(ResString(IDS_FAVORITES),             0, true, IDC_FAVORITES);
        AddButton(ResString(IDS_SETTINGS),              0, true, IDC_SETTINGS);
-       AddButton(ResString(IDS_DRIVES),                0, true, IDC_DRIVES);
-       AddButton(ResString(IDS_NETWORK),               0, true, IDC_NETWORK);
+       AddButton(ResString(IDS_BROWSE),                0, true, IDC_BROWSE);
        AddButton(ResString(IDS_SEARCH),                0, false, IDC_SEARCH);
        AddButton(ResString(IDS_SEARCH_COMPUTER),0,false, IDC_SEARCH_COMPUTER);
        AddButton(ResString(IDS_START_HELP),    0, false, IDC_START_HELP);
@@ -760,13 +759,8 @@ int StartMenuRoot::Command(int id, int code)
                CreateSubmenu(id, CSIDL_FAVORITES);
                break;
 
-         case IDC_NETWORK:
-               CreateSubmenu(id, CSIDL_NETWORK);
-               break;
-
-         case IDC_DRIVES:
-               //TODO: exclude removeable drives
-               CreateSubmenu(id, CSIDL_DRIVES);
+         case IDC_BROWSE:
+               CreateSubmenu(id, STARTMENU_CREATOR(BrowseMenu));
                break;
 
          case IDC_SETTINGS:
@@ -860,21 +854,15 @@ void StartMenuRoot::ShowSearchComputer()
 }
 
 
-SettingsMenu::SettingsMenu(HWND hwnd, const StartMenuFolders& info)
- :     super(hwnd, info)
-{
-}
-
 void SettingsMenu::AddEntries()
 {
        super::AddEntries();
 
-        // insert hard coded start entries
-       AddButton(ResString(IDS_SETTINGS_MENU), 0, true, IDC_SETTINGS_MENU);
-       AddButton(ResString(IDS_PRINTERS),              0, true, IDC_PRINTERS);
        AddButton(ResString(IDS_CONTROL_PANEL), 0, false, IDC_CONTROL_PANEL);
-       AddButton(ResString(IDS_ADMIN),                 0, true, IDC_ADMIN);
+       AddButton(ResString(IDS_PRINTERS),              0, true, IDC_PRINTERS);
        AddButton(ResString(IDS_CONNECTIONS),   0, true, IDC_CONNECTIONS);
+       AddButton(ResString(IDS_ADMIN),                 0, true, IDC_ADMIN);
+       AddButton(ResString(IDS_SETTINGS_MENU), 0, true, IDC_SETTINGS_MENU);
 }
 
 int SettingsMenu::Command(int id, int code)
@@ -909,6 +897,34 @@ int SettingsMenu::Command(int id, int code)
 }
 
 
+void BrowseMenu::AddEntries()
+{
+       super::AddEntries();
+
+       AddButton(ResString(IDS_NETWORK),       0, true, IDC_NETWORK);
+       AddButton(ResString(IDS_DRIVES),        0, true, IDC_DRIVES);
+}
+
+int BrowseMenu::Command(int id, int code)
+{
+       switch(id) {
+         case IDC_NETWORK:
+               CreateSubmenu(id, CSIDL_NETWORK);
+               break;
+
+         case IDC_DRIVES:
+               //TODO: exclude removeable drives
+               CreateSubmenu(id, CSIDL_DRIVES);
+               break;
+
+         default:
+               return super::Command(id, code);
+       }
+
+       return 0;
+}
+
+
 RecentStartMenu::RecentStartMenu(HWND hwnd, const StartMenuFolders& info)
  :     super(hwnd, info)
 {
index 2a7c74e..dd194ad 100644 (file)
@@ -227,12 +227,33 @@ protected:
 };
 
 
- // Settings sub-start menu
+ // Settings sub-startmenu
 struct SettingsMenu : public StartMenu
 {
        typedef StartMenu super;
 
-       SettingsMenu(HWND hwnd, const StartMenuFolders& info);
+       SettingsMenu(HWND hwnd, const StartMenuFolders& info)
+        :      super(hwnd, info)
+       {
+       }
+
+       void    TrackStartmenu();
+
+protected:
+       void    AddEntries();
+       int             Command(int id, int code);
+};
+
+
+ // "Browse Files..." sub-start menu
+struct BrowseMenu : public StartMenu
+{
+       typedef StartMenu super;
+
+       BrowseMenu(HWND hwnd, const StartMenuFolders& info)
+        :      super(hwnd, info)
+       {
+       }
 
        void    TrackStartmenu();