Skip to content

Commit

Permalink
MF_GRAYED is needed for XP.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Aug 23, 2015
1 parent 54f3433 commit fb18878
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/tray.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ void ShowContextMenu(HWND hwnd) {

// Menu
InsertMenu(menu, -1, MF_BYPOSITION, SWM_TOGGLE, (ENABLED()?l10n.menu.disable:l10n.menu.enable));
InsertMenu(menu, -1, MF_BYPOSITION|(elevated || !vista?MF_DISABLED:0), SWM_ELEVATE, (elevated?l10n.menu.elevated:l10n.menu.elevate));
InsertMenu(menu, -1, MF_BYPOSITION|(elevated || !vista?MF_DISABLED|MF_GRAYED:0), SWM_ELEVATE, (elevated?l10n.menu.elevated:l10n.menu.elevate));

// Options
HMENU menu_options = CreatePopupMenu();
InsertMenu(menu_options, -1, MF_BYPOSITION|(autostart?MF_CHECKED:0), (autostart?SWM_AUTOSTART_OFF:SWM_AUTOSTART_ON), l10n.menu.autostart);
InsertMenu(menu_options, -1, MF_BYPOSITION|(autostart_elevate?MF_CHECKED:0)|(!vista?MF_DISABLED:0), (autostart_elevate?SWM_AUTOSTART_ELEVATE_OFF:SWM_AUTOSTART_ELEVATE_ON), l10n.menu.autostart_elevate);
InsertMenu(menu_options, -1, MF_BYPOSITION|(autostart_elevate?MF_CHECKED:0)|(!vista?MF_DISABLED|MF_GRAYED:0), (autostart_elevate?SWM_AUTOSTART_ELEVATE_OFF:SWM_AUTOSTART_ELEVATE_ON), l10n.menu.autostart_elevate);
InsertMenu(menu_options, -1, MF_BYPOSITION|MF_SEPARATOR, 0, NULL);
InsertMenu(menu_options, -1, MF_BYPOSITION|(timercheck?MF_CHECKED:0)|(!vista?MF_DISABLED:0), (timercheck?SWM_TIMERCHECK_OFF:SWM_TIMERCHECK_ON), l10n.menu.timercheck);
InsertMenu(menu_options, -1, MF_BYPOSITION|(timercheck?MF_CHECKED:0), (timercheck?SWM_TIMERCHECK_OFF:SWM_TIMERCHECK_ON), l10n.menu.timercheck);
InsertMenu(menu_options, -1, MF_BYPOSITION|MF_SEPARATOR, 0, NULL);
InsertMenu(menu_options, -1, MF_BYPOSITION, SWM_WEBSITE, l10n.menu.website);
InsertMenu(menu_options, -1, MF_BYPOSITION|MF_DISABLED, 0, l10n.menu.version);
InsertMenu(menu_options, -1, MF_BYPOSITION|MF_DISABLED|MF_GRAYED, 0, l10n.menu.version);
InsertMenu(menu, -1, MF_BYPOSITION|MF_POPUP, (UINT_PTR)menu_options, l10n.menu.options);

InsertMenu(menu, -1, MF_BYPOSITION|MF_SEPARATOR, 0, NULL);
Expand Down

0 comments on commit fb18878

Please sign in to comment.