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

Re: Fixing issues between objects and properties dialogs

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: "pgadmin-hackers(at)postgresql(dot)org" <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Fixing issues between objects and properties dialogs
Date: 2011-08-10 22:06:30
Message-ID: 1313013990.3766.32.camel@laptop (view raw or flat)
Thread:
Lists: pgadmin-hackers
On Tue, 2011-08-09 at 00:30 +0200, Guillaume Lelarge wrote:
> On Sun, 2011-07-24 at 15:09 +0100, Dave Page wrote:
> > On Sun, Jul 24, 2011 at 2:23 PM, Guillaume Lelarge
> > <guillaume(at)lelarge(dot)info> wrote:
> > > On Sun, 2011-07-24 at 14:11 +0200, Guillaume Lelarge wrote:
> > >> On Sun, 2011-07-24 at 12:58 +0100, Dave Page wrote:
> > >> > The former fix seems more appropriate. Operations in frmMain shouldn't
> > >> > cause dialogues to close.
> > >> >
> > >>
> > >> Fine with me. That should be simpler to do.
> > >>
> > >> > Simple fix seems to be to store a pointer to the dialog in pgObject;
> > >> > if not null, disallow drop, or if trying to view properties, use the
> > >> > pointer to raise the existing dialogue. Clear the pointer when the
> > >> > dialog is closed.
> > >> >
> > >>
> > >> I thought of something similar, but this is OK with me.
> > >>
> > >> I expect it to be quite a big patch. Should I work on 1.14 or master?
> > >> this is surely a bug, so 1.14 should be OK. But I'm afraid this is too
> > >> much changes to code it on a beta release. Any strong opinion on this
> > >> matter?
> > >>
> > >
> > > And another question. Let's say I open a table properties' dialog, and I
> > > try to refresh the whole database. Should it refresh everything except
> > > this table, or nothing and complains about properties' dialogs being
> > > open, preventing the object to be refreshed?
> > 
> > Nothing. "There are properties dialogues open for one or more objects
> > that would be refreshed. Please close the properties dialogues and try
> > again."
> > 
> 
> Just a quick update. Still working on it, and I have good results so
> far. I'm now able to prevent refresh and drop (refresh for all objects,
> drop for schemas only) if an object's properties dialog is open.
> 
> Patch attached. Obviously WIP. Not so obvious, it's dirty code (some
> wxLogError, not really efficient code, etc). But comments very welcome.
> 

Seems it hits final release. See attached patch. Protects against server
or database disconnection, and browser refresh. If a user tries to open
many times the same object properties, it will raise the previous window
rather than opening a new one.

I think it's pretty neat :) It's been a huge pgAdmin's issue for a long
time.

Any comments before I commit it?


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com

Attachment: 0001-Prevent-refreshing-or-dropping-an-object.patch
Description: text/x-patch (0 bytes)

In response to

Responses

pgadmin-hackers by date

Next:From: Vinicius SantosDate: 2011-08-11 03:20:52
Subject: Re: Refresh objects on Click
Previous:From: Dave PageDate: 2011-08-10 10:34:17
Subject: Re: Refresh objects on Click

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