Ticket #27 (closed defect: fixed)

Opened 2 years ago

Last modified 13 months ago

Dropping a new font on menus doesn't work correctly

Reported by: gyoung Owned by: gyoung
Priority: trivial Milestone: Release_3.9
Component: fm/2 base Version: 3.09
Keywords: Cc:
Blocking: Blocked By:

Description

When you drop a new font on the menu bar the font on the files and view menu don't change. The font changes on all the other menus and the "Files" and "View" on the bar change just not the menus.

Change History

Changed 2 years ago by gyoung

This appears to be the result of the way the menus are built (see below). Since SetConditionalCascade? is used the menus don't really exits until opened so the fonts are dropped on nothing and the menu can't be dropped on while open. Perhaps making a single files menu and a view menu containing all the items for all frame windows and then use MM_REMOVEITEM to change on fly for each different frame window would work. MM_REMOVEITEM should be use instead of MM_DELETEITEM because item can be added back easily in the case of changing between the drives container focus and directory container focus. MM_DELETEITEM could be used for other windows.

Misc.c near 1567 HWND CheckMenu?(HWND * hwndMenu, USHORT id) {

/* load and adjust menus as required */

if (!*hwndMenu WinIsWindow((HAB) 0, *hwndMenu)) {

*hwndMenu = WinLoadMenu?(HWND_DESKTOP, FM3ModHandle, id); if (hwndMenu == &DirMenu?) {

WinSetWindowUShort(DirMenu?, QWS_ID, IDM_FILESMENU); SetConditionalCascade?(DirMenu?, IDM_COMMANDSMENU, IDM_DOITYOURSELF); SetConditionalCascade?(DirMenu?, IDM_COPYMENU, IDM_COPY); SetConditionalCascade?(DirMenu?, IDM_MOVEMENU, IDM_MOVE); SetConditionalCascade?(DirMenu?, IDM_SAVESUBMENU, IDM_SAVETOCLIP); SetConditionalCascade?(DirMenu?, IDM_VIEWSUBMENU, IDM_INFO); SetConditionalCascade?(DirMenu?, IDM_EDITSUBMENU, IDM_ATTRS); SetConditionalCascade?(DirMenu?, IDM_DELETESUBMENU,

(fDefaultDeletePerm) ? IDM_PERMDELETE : IDM_DELETE);

SetConditionalCascade?(DirMenu?, IDM_MISCSUBMENU, IDM_SIZES); SetConditionalCascade?(DirMenu?, IDM_OPENSUBMENU, IDM_OPENWINDOW); if (fWorkPlace) {

WinSendMsg?(DirMenu?, MM_DELETEITEM,

MPFROM2SHORT(IDM_OPENSUBMENU, TRUE), MPVOID);

WinSendMsg?(DirMenu?, MM_DELETEITEM,

MPFROM2SHORT(IDM_OBJECTSUBMENU, TRUE), MPVOID);

}

}

Changed 21 months ago by gyoung

  • owner gyoung deleted

Changed 14 months ago by gyoung

Ticket 150 is a different aspect of this problem

Changed 13 months ago by gyoung

  • owner set to gyoung
  • status changed from new to assigned
  • version set to 3.09
  • milestone set to Release_3.9

Changed 13 months ago by gyoung

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.