1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

If there are no saved sessions, put a grayed "(No sessions)" entry on the saved

sessions submenu of the terminal window context menu (as Pageant does), rather
than an empty menu (which often renders poorly).

[originally from svn r8648]
This commit is contained in:
Jacob Nevins
2009-09-13 23:29:11 +00:00
parent b802ee0c16
commit 5094b58a20
2 changed files with 11 additions and 1 deletions

View File

@ -636,7 +636,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
guess_height = extra_height + font_height * cfg.height;
{
RECT r;
get_fullscreen_rect(&r);
get_fullscreen_rect(&r);
if (guess_width > r.right - r.left)
guess_width = r.right - r.left;
if (guess_height > r.bottom - r.top)
@ -912,6 +912,8 @@ static void update_savedsess_menu(void)
AppendMenu(savedsess_menu, MF_ENABLED,
IDM_SAVED_MIN + (i-1)*MENU_SAVED_STEP,
sesslist.sessions[i]);
if (sesslist.nsessions <= 1)
AppendMenu(savedsess_menu, MF_GRAYED, IDM_SAVED_MIN, "(No sessions)");
}
/*