Skip site navigation (1) Skip section navigation (2)

Re: src/ui/frmQuery.cpp : tentative patch

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Ian Barwick" <barwick(at)gmail(dot)com>,<pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: src/ui/frmQuery.cpp : tentative patch
Date: 2004-11-26 11:15:51
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4307383@ratbert.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgadmin-hackers
 

> -----Original Message-----
> From: pgadmin-hackers-owner(at)postgresql(dot)org 
> [mailto:pgadmin-hackers-owner(at)postgresql(dot)org] On Behalf Of Ian Barwick
> Sent: 24 November 2004 21:45
> To: pgadmin-hackers(at)postgresql(dot)org
> Subject: [pgadmin-hackers] src/ui/frmQuery.cpp : tentative patch
> 
> 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).

Sorry for the delay... Modified patch applied.

Implicitly casting a uint to bool gives a warning in VC++, so I changed
the test to be more precise:

fileMenu->Enable(MNU_RECENT, (recentFileMenu->GetMenuItemCount() > 0));

Thanks for the patch.

Regards, Dave

pgadmin-hackers by date

Next:From: Andreas PflugDate: 2004-11-29 10:24:06
Subject: Going for Gold
Previous:From: cvsDate: 2004-11-26 11:15:21
Subject: CVS Commit by dpage: Disable the recently used files list if there are

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group