Hi when starting pgAdmin with a fresh .pgadmin file, in the query tool's "File" menu the option "Recent files" is active, but selecting it produces a miniscule box with no content. It's not a particularly dramatic problem, but it caused me to wonder what recent files it could possibly refer to as I'd never started pgadmin on this particular system before.
I'd like to believe the attached patch solves this problem by only activating the menu item if at least one recently saved file is known. It seems to work. However I must point out I had only vaguely heard of wxWidgets before yesterday and my C++ hasn't been out and about much recently, so I wouldn't be surprised if there's a better / safer way of doing this. (If there is, and someone could point it out, I'd appreciate it, because I'd be interested in getting to know the pgadmin internals a bit better). Ian Barwick
Index: frmQuery.cpp =================================================================== RCS file: /projects/pgadmin3/src/ui/frmQuery.cpp,v retrieving revision 1.76 diff -c -r1.76 frmQuery.cpp *** frmQuery.cpp 22 Oct 2004 14:25:16 -0000 1.76 --- frmQuery.cpp 24 Nov 2004 21:21:35 -0000 *************** *** 749,754 **** --- 749,755 ---- changed=false; setExtendedTitle(); UpdateRecentFiles(); + fileMenu->Enable(MNU_RECENT, recentFileMenu->GetMenuItemCount()); } } delete dlg; *************** *** 838,843 **** --- 839,845 ---- queryMenu->Enable(MNU_EXPLAIN, !running); queryMenu->Enable(MNU_CANCEL, running); fileMenu->Enable(MNU_EXPORT, sqlResult->CanExport()); + fileMenu->Enable(MNU_RECENT, recentFileMenu->GetMenuItemCount()); }
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])