Thread: Bug: recent files reset

Bug: recent files reset

From
Josh Berkus
Date:
Version: 1.10.1
Platform: OSX 10.5
Severity: Annoyance
Reproduceable: sometimes
Description:

1) have a bunch of query windows for saved SQL files open (call them
files 1,2,3,4,5 and 6 in order in which they are opened).
2) save file #1 and close it.
3) In another, the query window for #5 pick file #1 from the "recent
files" list in the menu.
4) File #2 will actually open.

What happened: until File #1 was closed and saved, it was at the bottom
of the recent files list.  Closing it and saving it will have bumped it
up to the top of the recent files list.  However, the query window for
query #5 will not show this change until *after* you attempt to access a
file from that list, which is why it gives you the wrong file.

--                                  -- Josh Berkus                                    PostgreSQL Experts Inc.
                        http://www.pgexperts.com
 


Re: Bug: recent files reset

From
Guillaume Lelarge
Date:
Le 15/03/2010 23:16, Josh Berkus a écrit :
> Version: 1.10.1
> Platform: OSX 10.5
> Severity: Annoyance
> Reproduceable: sometimes
> Description:
> 
> 1) have a bunch of query windows for saved SQL files open (call them
> files 1,2,3,4,5 and 6 in order in which they are opened).
> 2) save file #1 and close it.
> 3) In another, the query window for #5 pick file #1 from the "recent
> files" list in the menu.
> 4) File #2 will actually open.
> 
> What happened: until File #1 was closed and saved, it was at the bottom
> of the recent files list.  Closing it and saving it will have bumped it
> up to the top of the recent files list.  However, the query window for
> query #5 will not show this change until *after* you attempt to access a
> file from that list, which is why it gives you the wrong file.
> 

You're right. I added a ticket on our trac system
(http://code.pgadmin.org/trac/ticket/149), so that we remember to work
on it ASAP.


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: Bug: recent files reset

From
Guillaume Lelarge
Date:
Le 15/03/2010 23:33, Guillaume Lelarge a écrit :
> Le 15/03/2010 23:16, Josh Berkus a écrit :
>> Version: 1.10.1
>> Platform: OSX 10.5
>> Severity: Annoyance
>> Reproduceable: sometimes
>> Description:
>>
>> 1) have a bunch of query windows for saved SQL files open (call them
>> files 1,2,3,4,5 and 6 in order in which they are opened).
>> 2) save file #1 and close it.
>> 3) In another, the query window for #5 pick file #1 from the "recent
>> files" list in the menu.
>> 4) File #2 will actually open.
>>
>> What happened: until File #1 was closed and saved, it was at the bottom
>> of the recent files list.  Closing it and saving it will have bumped it
>> up to the top of the recent files list.  However, the query window for
>> query #5 will not show this change until *after* you attempt to access a
>> file from that list, which is why it gives you the wrong file.
>>
> 
> You're right. I added a ticket on our trac system
> (http://code.pgadmin.org/trac/ticket/149), so that we remember to work
> on it ASAP.
> 
> 

Took a look at it today. The only way to get rid of it easily would be
to update the file only when we quit the query tool. Which means that a
window will first see the files that were recorded in the history, will
update its menu (but not the prefs file) when the user opens files,
won't get updates from other query window, and will push its history in
the prefs file when the user closes the query window. Whichs also means
that when a user quits pgAdmin, only one history will remain, the one of
the last query tool closed.

Comments?


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Unsubscribe

From
Ripal Shah
Date:
Please unsubscribe me from the mailing list.

Please, I dont use postgresql

regards,
-Ripal Shah-

----- Original Message -----
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Josh Berkus <josh@agliodbs.com>
Cc: PgAdmin Support <pgadmin-support@postgresql.org>
Sent: Sun, 21 Mar 2010 08:20:54 +0100 (CET)
Subject: Re: [pgadmin-support] Bug: recent files reset

Le 15/03/2010 23:33, Guillaume Lelarge a écrit :
> Le 15/03/2010 23:16, Josh Berkus a écrit :
>> Version: 1.10.1
>> Platform: OSX 10.5
>> Severity: Annoyance
>> Reproduceable: sometimes
>> Description:
>>
>> 1) have a bunch of query windows for saved SQL files open (call them
>> files 1,2,3,4,5 and 6 in order in which they are opened).
>> 2) save file #1 and close it.
>> 3) In another, the query window for #5 pick file #1 from the "recent
>> files" list in the menu.
>> 4) File #2 will actually open.
>>
>> What happened: until File #1 was closed and saved, it was at the bottom
>> of the recent files list.  Closing it and saving it will have bumped it
>> up to the top of the recent files list.  However, the query window for
>> query #5 will not show this change until *after* you attempt to access a
>> file from that list, which is why it gives you the wrong file.
>>
>
> You're right. I added a ticket on our trac system
> (http://code.pgadmin.org/trac/ticket/149), so that we remember to work
> on it ASAP.
>
>

Took a look at it today. The only way to get rid of it easily would be
to update the file only when we quit the query tool. Which means that a
window will first see the files that were recorded in the history, will
update its menu (but not the prefs file) when the user opens files,
won't get updates from other query window, and will push its history in
the prefs file when the user closes the query window. Whichs also means
that when a user quits pgAdmin, only one history will remain, the one of
the last query tool closed.

Comments?


--
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com

--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support



Re: Unsubscribe

From
kiran kumar
Date:
<p>Please unsubscribe me from the mailing list.<p>Please, I dont use postgresql<br /><br /><div class="gmail_quote">On
Sun,Mar 21, 2010 at 1:16 PM, Ripal Shah <span dir="ltr"><<a
href="mailto:rshah@igenesis.co.in">rshah@igenesis.co.in</a>></span>wrote:<br /><blockquote class="gmail_quote"
style="BORDER-LEFT:#ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex">Please unsubscribe me from the mailing
list.<br/><br />Please, I dont use postgresql<br /><br />regards,<br />-Ripal Shah-<br /><br />----- Original Message
-----<br/>From: Guillaume Lelarge <<a href="mailto:guillaume@lelarge.info">guillaume@lelarge.info</a>><br />To:
JoshBerkus <<a href="mailto:josh@agliodbs.com">josh@agliodbs.com</a>><br /> Cc: PgAdmin Support <<a
href="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>><br/>Sent: Sun, 21 Mar 2010 08:20:54
+0100(CET)<br />Subject: Re: [pgadmin-support] Bug: recent files reset<br /><br /> Le 15/03/2010 23:33, Guillaume
Lelargea écrit :<br />> Le 15/03/2010 23:16, Josh Berkus a écrit :<br />>> Version: 1.10.1<br />>>
Platform:OSX 10.5<br />>> Severity: Annoyance<br />>> Reproduceable: sometimes<br /> >>
Description:<br/>>><br />>> 1) have a bunch of query windows for saved SQL files open (call them<br
/>>>files 1,2,3,4,5 and 6 in order in which they are opened).<br />>> 2) save file #1 and close it.<br />
>>3) In another, the query window for #5 pick file #1 from the "recent<br />>> files" list in the menu.<br
/>>>4) File #2 will actually open.<br />>><br />>> What happened: until File #1 was closed and saved,
itwas at the bottom<br /> >> of the recent files list.  Closing it and saving it will have bumped it<br
/>>>up to the top of the recent files list.  However, the query window for<br />>> query #5 will not show
thischange until *after* you attempt to access a<br /> >> file from that list, which is why it gives you the
wrongfile.<br />>><br />><br />> You're right. I added a ticket on our trac system<br />> (<a
href="http://code.pgadmin.org/trac/ticket/149"target="_blank">http://code.pgadmin.org/trac/ticket/149</a>), so that we
rememberto work<br /> > on it ASAP.<br />><br />><br /><br />Took a look at it today. The only way to get rid
ofit easily would be<br />to update the file only when we quit the query tool. Which means that a<br />window will
firstsee the files that were recorded in the history, will<br /> update its menu (but not the prefs file) when the user
opensfiles,<br />won't get updates from other query window, and will push its history in<br />the prefs file when the
usercloses the query window. Whichs also means<br /> that when a user quits pgAdmin, only one history will remain, the
oneof<br />the last query tool closed.<br /><br />Comments?<br /><br /><br />--<br />Guillaume.<br /> <a
href="http://www.postgresqlfr.org/"target="_blank">http://www.postgresqlfr.org</a><br />  <a href="http://dalibo.com/"
target="_blank">http://dalibo.com</a><br/><br />--<br />Sent via pgadmin-support mailing list (<a
href="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>)<br/>To make changes to your
subscription:<br/><a href="http://www.postgresql.org/mailpref/pgadmin-support"
target="_blank">http://www.postgresql.org/mailpref/pgadmin-support</a><br/><font color="#888888"><br /><br />--<br
/>Sentvia pgadmin-support mailing list (<a
href="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>)<br/> To make changes to your
subscription:<br/><a href="http://www.postgresql.org/mailpref/pgadmin-support"
target="_blank">http://www.postgresql.org/mailpref/pgadmin-support</a><br/></font></blockquote></div><br /> 

Re: Bug: recent files reset

From
Guillaume Lelarge
Date:
Le 21/03/2010 08:20, Guillaume Lelarge a écrit :
> Le 15/03/2010 23:33, Guillaume Lelarge a écrit :
>> Le 15/03/2010 23:16, Josh Berkus a écrit :
>>> Version: 1.10.1
>>> Platform: OSX 10.5
>>> Severity: Annoyance
>>> Reproduceable: sometimes
>>> Description:
>>>
>>> 1) have a bunch of query windows for saved SQL files open (call them
>>> files 1,2,3,4,5 and 6 in order in which they are opened).
>>> 2) save file #1 and close it.
>>> 3) In another, the query window for #5 pick file #1 from the "recent
>>> files" list in the menu.
>>> 4) File #2 will actually open.
>>>
>>> What happened: until File #1 was closed and saved, it was at the bottom
>>> of the recent files list.  Closing it and saving it will have bumped it
>>> up to the top of the recent files list.  However, the query window for
>>> query #5 will not show this change until *after* you attempt to access a
>>> file from that list, which is why it gives you the wrong file.
>>>
>>
>> You're right. I added a ticket on our trac system
>> (http://code.pgadmin.org/trac/ticket/149), so that we remember to work
>> on it ASAP.
>>
>>
> 
> Took a look at it today. The only way to get rid of it easily would be
> to update the file only when we quit the query tool. Which means that a
> window will first see the files that were recorded in the history, will
> update its menu (but not the prefs file) when the user opens files,
> won't get updates from other query window, and will push its history in
> the prefs file when the user closes the query window. Whichs also means
> that when a user quits pgAdmin, only one history will remain, the one of
> the last query tool closed.
> 
> Comments?
> 
> 

No comments on that one?


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: Bug: recent files reset

From
Guillaume Lelarge
Date:
Le 25/03/2010 23:15, Guillaume Lelarge a écrit :
> Le 21/03/2010 08:20, Guillaume Lelarge a écrit :
>> Le 15/03/2010 23:33, Guillaume Lelarge a écrit :
>>> Le 15/03/2010 23:16, Josh Berkus a écrit :
>>>> Version: 1.10.1
>>>> Platform: OSX 10.5
>>>> Severity: Annoyance
>>>> Reproduceable: sometimes
>>>> Description:
>>>>
>>>> 1) have a bunch of query windows for saved SQL files open (call them
>>>> files 1,2,3,4,5 and 6 in order in which they are opened).
>>>> 2) save file #1 and close it.
>>>> 3) In another, the query window for #5 pick file #1 from the "recent
>>>> files" list in the menu.
>>>> 4) File #2 will actually open.
>>>>
>>>> What happened: until File #1 was closed and saved, it was at the bottom
>>>> of the recent files list.  Closing it and saving it will have bumped it
>>>> up to the top of the recent files list.  However, the query window for
>>>> query #5 will not show this change until *after* you attempt to access a
>>>> file from that list, which is why it gives you the wrong file.
>>>>
>>>
>>> You're right. I added a ticket on our trac system
>>> (http://code.pgadmin.org/trac/ticket/149), so that we remember to work
>>> on it ASAP.
>>>
>>>
>>
>> Took a look at it today. The only way to get rid of it easily would be
>> to update the file only when we quit the query tool. Which means that a
>> window will first see the files that were recorded in the history, will
>> update its menu (but not the prefs file) when the user opens files,
>> won't get updates from other query window, and will push its history in
>> the prefs file when the user closes the query window. Whichs also means
>> that when a user quits pgAdmin, only one history will remain, the one of
>> the last query tool closed.
>>
>> Comments?
>>
>
> No comments on that one?
>

Patch attached.

I found a better way to fix it, which allows many great things for 1.12.
Anyways, this fix uses this method: for each change on a query window,
all the other query windows are notified of the change and reload the
file. So, they all share the same informations.

Moreover, we had the same issue with the favourites and the macros
files. The patch attached fixes that too.

I don't commit it right now. Dave, can you get a look at it? is the
patch good to go? Thanks.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Attachment

Re: Bug: recent files reset

From
Dave Page
Date:
On Sat, Apr 10, 2010 at 4:16 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> I don't commit it right now. Dave, can you get a look at it? is the
> patch good to go? Thanks.

Instead of maintaining a new array of frmQuery's, can you use the
existing frames array (see dlgClasses.c|h)?

-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com


Re: Bug: recent files reset

From
Guillaume Lelarge
Date:
Le 12/04/2010 12:45, Dave Page a écrit :
> On Sat, Apr 10, 2010 at 4:16 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>> I don't commit it right now. Dave, can you get a look at it? is the
>> patch good to go? Thanks.
>
> Instead of maintaining a new array of frmQuery's, can you use the
> existing frames array (see dlgClasses.c|h)?
>

Sure. Took me all evening, but at least it's done now :)

See patch attached.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Attachment

Re: Bug: recent files reset

From
Dave Page
Date:
On Mon, Apr 12, 2010 at 11:04 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Le 12/04/2010 12:45, Dave Page a écrit :
>> On Sat, Apr 10, 2010 at 4:16 PM, Guillaume Lelarge
>> <guillaume@lelarge.info> wrote:
>>> I don't commit it right now. Dave, can you get a look at it? is the
>>> patch good to go? Thanks.
>>
>> Instead of maintaining a new array of frmQuery's, can you use the
>> existing frames array (see dlgClasses.c|h)?
>>
>
> Sure. Took me all evening, but at least it's done now :)

Ouch - what took so long?


--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com


Re: Bug: recent files reset

From
Guillaume Lelarge
Date:
Le 13/04/2010 09:48, Dave Page a écrit :
> On Mon, Apr 12, 2010 at 11:04 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>> Le 12/04/2010 12:45, Dave Page a écrit :
>>> On Sat, Apr 10, 2010 at 4:16 PM, Guillaume Lelarge
>>> <guillaume@lelarge.info> wrote:
>>>> I don't commit it right now. Dave, can you get a look at it? is the
>>>> patch good to go? Thanks.
>>>
>>> Instead of maintaining a new array of frmQuery's, can you use the
>>> existing frames array (see dlgClasses.c|h)?
>>>
>>
>> Sure. Took me all evening, but at least it's done now :)
> 
> Ouch - what took so long?
> 

Understanding the use of the frames list. I got it wrong the first time,
which took quite some time. And compiling pgAdmin on my (not so old)
laptop is not really fast.


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com


Re: Bug: recent files reset

From
Guillaume Lelarge
Date:
Le 13/04/2010 12:00, Guillaume Lelarge a écrit :
> Le 13/04/2010 09:48, Dave Page a écrit :
>> On Mon, Apr 12, 2010 at 11:04 PM, Guillaume Lelarge
>> <guillaume@lelarge.info> wrote:
>>> Le 12/04/2010 12:45, Dave Page a écrit :
>>>> On Sat, Apr 10, 2010 at 4:16 PM, Guillaume Lelarge
>>>> <guillaume@lelarge.info> wrote:
>>>>> I don't commit it right now. Dave, can you get a look at it? is the
>>>>> patch good to go? Thanks.
>>>>
>>>> Instead of maintaining a new array of frmQuery's, can you use the
>>>> existing frames array (see dlgClasses.c|h)?
>>>>
>>>
>>> Sure. Took me all evening, but at least it's done now :)
>>
>> Ouch - what took so long?
>>
> 
> Understanding the use of the frames list. I got it wrong the first time,
> which took quite some time. And compiling pgAdmin on my (not so old)
> laptop is not really fast.
> 
> 

Fix commited. Thanks for your report, Josh.


-- 
Guillaume.http://www.postgresqlfr.orghttp://dalibo.com