src/osd/winui/winui.c
| r7402 | r7403 | |
| 691 | 691 | |
| 692 | 692 | /* Tool and Status bar variables */ |
| 693 | 693 | static HWND hStatusBar = 0; |
| 694 | | static HWND hToolBar = 0; |
| 694 | static HWND s_hToolBar = 0; |
| 695 | 695 | |
| 696 | 696 | /* Column Order as Displayed */ |
| 697 | 697 | static BOOL oldControl = FALSE; |
| r7402 | r7403 | |
| 1335 | 1335 | { |
| 1336 | 1336 | //nWidth = nSplitterOffset[GetSplitterCount() - 1]; |
| 1337 | 1337 | CheckMenuItem(GetMenu(hMain),ID_VIEW_PICTURE_AREA, MF_CHECKED); |
| 1338 | | ToolBar_CheckButton(hToolBar, ID_VIEW_PICTURE_AREA, MF_CHECKED); |
| 1338 | ToolBar_CheckButton(s_hToolBar, ID_VIEW_PICTURE_AREA, MF_CHECKED); |
| 1339 | 1339 | } |
| 1340 | 1340 | else |
| 1341 | 1341 | { |
| 1342 | 1342 | //nWidth = rect.right; |
| 1343 | 1343 | CheckMenuItem(GetMenu(hMain),ID_VIEW_PICTURE_AREA, MF_UNCHECKED); |
| 1344 | | ToolBar_CheckButton(hToolBar, ID_VIEW_PICTURE_AREA, MF_UNCHECKED); |
| 1344 | ToolBar_CheckButton(s_hToolBar, ID_VIEW_PICTURE_AREA, MF_UNCHECKED); |
| 1345 | 1345 | } |
| 1346 | 1346 | |
| 1347 | 1347 | ResizeTreeAndListViews(FALSE); |
| r7402 | r7403 | |
| 1432 | 1432 | |
| 1433 | 1433 | GetWindowRect(hStatusBar, &rWindow); |
| 1434 | 1434 | bottomMargin = rWindow.bottom - rWindow.top; |
| 1435 | | GetWindowRect(hToolBar, &rWindow); |
| 1435 | GetWindowRect(s_hToolBar, &rWindow); |
| 1436 | 1436 | topMargin = rWindow.bottom - rWindow.top; |
| 1437 | 1437 | /*buttonMargin = (sRect.bottom + 4); */ |
| 1438 | 1438 | |
| r7402 | r7403 | |
| 1868 | 1868 | /* Stash hInstance for later use */ |
| 1869 | 1869 | hInst = hInstance; |
| 1870 | 1870 | |
| 1871 | | hToolBar = InitToolbar(hMain); |
| 1871 | s_hToolBar = InitToolbar(hMain); |
| 1872 | 1872 | hStatusBar = InitStatusBar(hMain); |
| 1873 | 1873 | hProgWnd = InitProgressBar(hStatusBar); |
| 1874 | 1874 | |
| 1875 | | main_resize_items[0].u.hwnd = hToolBar; |
| 1875 | main_resize_items[0].u.hwnd = s_hToolBar; |
| 1876 | 1876 | main_resize_items[1].u.hwnd = hStatusBar; |
| 1877 | 1877 | |
| 1878 | 1878 | /* In order to handle 'Large Fonts' as the Windows |
| r7402 | r7403 | |
| 1928 | 1928 | bShowTabCtrl = GetShowTabCtrl(); |
| 1929 | 1929 | |
| 1930 | 1930 | CheckMenuItem(GetMenu(hMain), ID_VIEW_FOLDERS, (bShowTree) ? MF_CHECKED : MF_UNCHECKED); |
| 1931 | | ToolBar_CheckButton(hToolBar, ID_VIEW_FOLDERS, (bShowTree) ? MF_CHECKED : MF_UNCHECKED); |
| 1931 | ToolBar_CheckButton(s_hToolBar, ID_VIEW_FOLDERS, (bShowTree) ? MF_CHECKED : MF_UNCHECKED); |
| 1932 | 1932 | CheckMenuItem(GetMenu(hMain), ID_VIEW_TOOLBARS, (bShowToolBar) ? MF_CHECKED : MF_UNCHECKED); |
| 1933 | | ShowWindow(hToolBar, (bShowToolBar) ? SW_SHOW : SW_HIDE); |
| 1933 | ShowWindow(s_hToolBar, (bShowToolBar) ? SW_SHOW : SW_HIDE); |
| 1934 | 1934 | CheckMenuItem(GetMenu(hMain), ID_VIEW_STATUS, (bShowStatusBar) ? MF_CHECKED : MF_UNCHECKED); |
| 1935 | 1935 | ShowWindow(hStatusBar, (bShowStatusBar) ? SW_SHOW : SW_HIDE); |
| 1936 | 1936 | CheckMenuItem(GetMenu(hMain), ID_VIEW_PAGETAB, (bShowTabCtrl) ? MF_CHECKED : MF_UNCHECKED); |
| r7402 | r7403 | |
| 3816 | 3816 | |
| 3817 | 3817 | // first uncheck previous menu item, check new one |
| 3818 | 3818 | CheckMenuRadioItem(GetMenu(hMain), ID_VIEW_LARGE_ICON, ID_VIEW_GROUPED, menu_id, MF_CHECKED); |
| 3819 | | ToolBar_CheckButton(hToolBar, menu_id, MF_CHECKED); |
| 3819 | ToolBar_CheckButton(s_hToolBar, menu_id, MF_CHECKED); |
| 3820 | 3820 | |
| 3821 | 3821 | if (Picker_GetViewID(hwndList) == VIEW_GROUPED || menu_id == ID_VIEW_GROUPED) |
| 3822 | 3822 | { |
| r7402 | r7403 | |
| 4182 | 4182 | bShowTree = !bShowTree; |
| 4183 | 4183 | SetShowFolderList(bShowTree); |
| 4184 | 4184 | CheckMenuItem(GetMenu(hMain), ID_VIEW_FOLDERS, (bShowTree) ? MF_CHECKED : MF_UNCHECKED); |
| 4185 | | ToolBar_CheckButton(hToolBar, ID_VIEW_FOLDERS, (bShowTree) ? MF_CHECKED : MF_UNCHECKED); |
| 4185 | ToolBar_CheckButton(s_hToolBar, ID_VIEW_FOLDERS, (bShowTree) ? MF_CHECKED : MF_UNCHECKED); |
| 4186 | 4186 | UpdateScreenShot(); |
| 4187 | 4187 | break; |
| 4188 | 4188 | |
| r7402 | r7403 | |
| 4190 | 4190 | bShowToolBar = !bShowToolBar; |
| 4191 | 4191 | SetShowToolBar(bShowToolBar); |
| 4192 | 4192 | CheckMenuItem(GetMenu(hMain), ID_VIEW_TOOLBARS, (bShowToolBar) ? MF_CHECKED : MF_UNCHECKED); |
| 4193 | | ToolBar_CheckButton(hToolBar, ID_VIEW_TOOLBARS, (bShowToolBar) ? MF_CHECKED : MF_UNCHECKED); |
| 4194 | | ShowWindow(hToolBar, (bShowToolBar) ? SW_SHOW : SW_HIDE); |
| 4193 | ToolBar_CheckButton(s_hToolBar, ID_VIEW_TOOLBARS, (bShowToolBar) ? MF_CHECKED : MF_UNCHECKED); |
| 4194 | ShowWindow(s_hToolBar, (bShowToolBar) ? SW_SHOW : SW_HIDE); |
| 4195 | 4195 | ResizePickerControls(hMain); |
| 4196 | 4196 | UpdateScreenShot(); |
| 4197 | 4197 | break; |
| r7402 | r7403 | |
| 4200 | 4200 | bShowStatusBar = !bShowStatusBar; |
| 4201 | 4201 | SetShowStatusBar(bShowStatusBar); |
| 4202 | 4202 | CheckMenuItem(GetMenu(hMain), ID_VIEW_STATUS, (bShowStatusBar) ? MF_CHECKED : MF_UNCHECKED); |
| 4203 | | ToolBar_CheckButton(hToolBar, ID_VIEW_STATUS, (bShowStatusBar) ? MF_CHECKED : MF_UNCHECKED); |
| 4203 | ToolBar_CheckButton(s_hToolBar, ID_VIEW_STATUS, (bShowStatusBar) ? MF_CHECKED : MF_UNCHECKED); |
| 4204 | 4204 | ShowWindow(hStatusBar, (bShowStatusBar) ? SW_SHOW : SW_HIDE); |
| 4205 | 4205 | ResizePickerControls(hMain); |
| 4206 | 4206 | UpdateScreenShot(); |
| r7402 | r7403 | |
| 4233 | 4233 | switch (codeNotify) |
| 4234 | 4234 | { |
| 4235 | 4235 | case TOOLBAR_EDIT_ACCELERATOR_PRESSED: |
| 4236 | | hToolbarEdit = GetDlgItem( hToolBar, ID_TOOLBAR_EDIT); |
| 4236 | hToolbarEdit = GetDlgItem( s_hToolBar, ID_TOOLBAR_EDIT); |
| 4237 | 4237 | SetFocus(hToolbarEdit); |
| 4238 | 4238 | break; |
| 4239 | 4239 | case EN_CHANGE: |
| r7402 | r7403 | |
| 6901 | 6901 | BOOL res; |
| 6902 | 6902 | |
| 6903 | 6903 | htree = TreeView_GetSelection(hTreeView); |
| 6904 | | |
| 6905 | 6904 | if (htree != NULL) |
| 6906 | 6905 | { |
| 6907 | 6906 | tvi.hItem = htree; |
src/osd/winui/properties.c
| r7402 | r7403 | |
| 201 | 201 | static void InitializeEffectUI(HWND hWnd); |
| 202 | 202 | static void InitializeBIOSUI(HWND hwnd); |
| 203 | 203 | static void InitializeControllerMappingUI(HWND hwnd); |
| 204 | | static void UpdateOptions(HWND hDlg, datamap *properties_datamap, core_options *opts); |
| 205 | | static void UpdateProperties(HWND hDlg, datamap *properties_datamap, core_options *opts); |
| 204 | static void UpdateOptions(HWND hDlg, datamap *map, core_options *opts); |
| 205 | static void UpdateProperties(HWND hDlg, datamap *map, core_options *opts); |
| 206 | 206 | static void PropToOptions(HWND hWnd, core_options *o); |
| 207 | 207 | static void OptionsToProp(HWND hWnd, core_options *o); |
| 208 | 208 | static void SetPropEnabledControls(HWND hWnd); |
| r7402 | r7403 | |
| 1582 | 1582 | } |
| 1583 | 1583 | |
| 1584 | 1584 | /* Update options from the dialog */ |
| 1585 | | static void UpdateOptions(HWND hDlg, datamap *properties_datamap, core_options *opts) |
| 1585 | static void UpdateOptions(HWND hDlg, datamap *map, core_options *opts) |
| 1586 | 1586 | { |
| 1587 | 1587 | /* These are always called together, so make one conveniece function. */ |
| 1588 | | datamap_read_all_controls(properties_datamap, hDlg, opts); |
| 1588 | datamap_read_all_controls(map, hDlg, opts); |
| 1589 | 1589 | PropToOptions(hDlg, opts); |
| 1590 | 1590 | } |
| 1591 | 1591 | |
| 1592 | 1592 | /* Update the dialog from the options */ |
| 1593 | | static void UpdateProperties(HWND hDlg, datamap *properties_datamap, core_options *opts) |
| 1593 | static void UpdateProperties(HWND hDlg, datamap *map, core_options *opts) |
| 1594 | 1594 | { |
| 1595 | 1595 | /* These are always called together, so make one conviniece function. */ |
| 1596 | | datamap_populate_all_controls(properties_datamap, hDlg, opts); |
| 1596 | datamap_populate_all_controls(map, hDlg, opts); |
| 1597 | 1597 | OptionsToProp(hDlg, opts); |
| 1598 | 1598 | SetPropEnabledControls(hDlg); |
| 1599 | 1599 | } |