Thread: SVN Commit by dpage: r4380 - in trunk/pgadmin3: . src/dlg
Author: dpage Date: 2005-07-21 09:26:58 +0100 (Thu, 21 Jul 2005) New Revision: 4380 Modified: trunk/pgadmin3/CHANGELOG.txt trunk/pgadmin3/src/dlg/dlgTable.cpp Log: Prompt the user before removing columns, constraints or inherited tables in the table dialogue, per gripe from Anoop Kumar. Modified: trunk/pgadmin3/CHANGELOG.txt =================================================================== --- trunk/pgadmin3/CHANGELOG.txt 2005-07-06 10:26:21 UTC (rev 4379) +++ trunk/pgadmin3/CHANGELOG.txt 2005-07-21 08:26:58 UTC (rev 4380) @@ -17,6 +17,7 @@ </ul> <br> <ul> + <li>2005-07-21 DP Prompt the user before removing columns, constraints or inherited tables in the table dialogue. <li>2005-07-06 DP Prompt the user to cancel running queries before closing the Query tool. <li>2005-07-04 DP Check for and display asynchronous notifications in the query tool. <li>2005-06-21 AP typo fixes, rename "initial db" to "maintenance db" Modified: trunk/pgadmin3/src/dlg/dlgTable.cpp =================================================================== --- trunk/pgadmin3/src/dlg/dlgTable.cpp 2005-07-06 10:26:21 UTC (rev 4379) +++ trunk/pgadmin3/src/dlg/dlgTable.cpp 2005-07-21 08:26:58 UTC (rev 4380) @@ -596,6 +596,9 @@ void dlgTable::OnRemoveTable(wxCommandEvent &ev) { + if (wxMessageBox(_("Are you sure you wish to remove the selected table?"), _("Remove table?"), wxYES_NO | wxNO_DEFAULT| wxICON_QUESTION) == wxNO) + return; + int sel=lbTables->GetSelection(); if (sel >= 0) { @@ -665,6 +668,9 @@ void dlgTable::OnRemoveCol(wxCommandEvent &ev) { + if (wxMessageBox(_("Are you sure you wish to remove the selected column?"), _("Remove column?"), wxYES_NO | wxNO_DEFAULT| wxICON_QUESTION) == wxNO) + return; + lstColumns->DeleteCurrentItem(); btnRemoveCol->Disable(); @@ -742,6 +748,9 @@ void dlgTable::OnRemoveConstr(wxCommandEvent &ev) { + if (wxMessageBox(_("Are you sure you wish to remove the selected constraint?"), _("Remove constraint?"), wxYES_NO |wxNO_DEFAULT | wxICON_QUESTION) == wxNO) + return; + int pos=lstConstraints->GetSelection(); if (pos < 0) return;
svn@pgadmin.org wrote: > Author: dpage > Date: 2005-07-21 09:26:58 +0100 (Thu, 21 Jul 2005) > New Revision: 4380 > > Modified: > trunk/pgadmin3/CHANGELOG.txt > trunk/pgadmin3/src/dlg/dlgTable.cpp > Log: > Prompt the user before removing columns, constraints or inherited tables in the table dialogue, At least the "ask when deleting" setting should be observed. It's still questionable, since these removes aren't executed immediately, but collected until OK is pressed. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 21 July 2005 10:12 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] SVN Commit by dpage: r4380 - > in trunk/pgadmin3: . src/dlg > > svn@pgadmin.org wrote: > > Author: dpage > > Date: 2005-07-21 09:26:58 +0100 (Thu, 21 Jul 2005) > > New Revision: 4380 > > > > Modified: > > trunk/pgadmin3/CHANGELOG.txt > > trunk/pgadmin3/src/dlg/dlgTable.cpp > > Log: > > Prompt the user before removing columns, constraints or > inherited tables in the table dialogue, > > At least the "ask when deleting" setting should be observed. I didn't know we even had such an option. Will fix. > It's still > questionable, since these removes aren't executed immediately, but > collected until OK is pressed. Not when creating a new object. It's a real pita when you've defined a 30 column table then accidently delete the first one. Even when editting an existing object it can be a pita if you've made a bunch of other changes. /D
Dave Page wrote: > > I didn't know we even had such an option. Will fix. It's there for those of us who press keys intentionally (I mostly do). >>It's still >>questionable, since these removes aren't executed immediately, but >>collected until OK is pressed. > > > Not when creating a new object. It's a real pita when you've defined a > 30 column table then accidently delete the first one. Even when editting > an existing object it can be a pita if you've made a bunch of other > changes. There are so many mistakes one can make pressing the wrong button at the wrong time, we can't catch them all. Besides, you sample doesn't hit. If you deleted that column, just create it again. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 21 July 2005 10:28 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] SVN Commit by dpage: r4380 - > in trunk/pgadmin3: . src/dlg > > Dave Page wrote: > > > > > I didn't know we even had such an option. Will fix. > > It's there for those of us who press keys intentionally (I mostly do). And you never made a mistake that could have been caught by a confirmation mb? Still, that risk is one that you and any other user must explicitly choose to take so I'm not going to complain about it. > There are so many mistakes one can make pressing the wrong > button at the > wrong time, we can't catch them all. No, but this is an easy one in which a simple confirmation could save time, effort and annoyance. > Besides, you sample doesn't hit. If you deleted that column, > just create > it again. You miss the point. If you're trying to put your columns in a specific order (yes, I know it doesn't matter from a theoretical POV, but some of us like things to look nice as well), you have to remove all the other thirty, and start again. Regards, Dave.
> >You miss the point. If you're trying to put your columns in a specific >order (yes, I know it doesn't matter from a theoretical POV, but some of >us like things to look nice as well), you have to remove all the other >thirty, and start again. > > > And this will happen exactly how often? In contrast to annoying mbxes popping up with a kloing! at a rate of 20/min. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 21 July 2005 15:00 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] SVN Commit by dpage: r4380 - > in trunk/pgadmin3: . src/dlg > > > > > >You miss the point. If you're trying to put your columns in > a specific > >order (yes, I know it doesn't matter from a theoretical POV, > but some of > >us like things to look nice as well), you have to remove all > the other > >thirty, and start again. > > > > > > > And this will happen exactly how often? > In contrast to annoying mbxes popping up with a kloing! at a > rate of 20/min. You delete 20 columns a minutes? If you don't like it, turn off the confirm delete option. Oh, you did already didn't you? :-) It has happened to me on more than one occasion, and I have had reports of this before, as well as one today that reminded me of the issue when I happened to have 5 minutes spare. /D
Dave Page wrote: > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 21 July 2005 15:00 >>To: Dave Page >>Cc: pgadmin-hackers@postgresql.org >>Subject: Re: [pgadmin-hackers] SVN Commit by dpage: r4380 - >>in trunk/pgadmin3: . src/dlg >> >> >> >>>You miss the point. If you're trying to put your columns in >> >>a specific >> >>>order (yes, I know it doesn't matter from a theoretical POV, >> >>but some of >> >>>us like things to look nice as well), you have to remove all >> >>the other >> >>>thirty, and start again. >>> >>> >>> >> >>And this will happen exactly how often? >>In contrast to annoying mbxes popping up with a kloing! at a >>rate of 20/min. > > > You delete 20 columns a minutes? If you don't like it, turn off the > confirm delete option. Oh, you did already didn't you? :-) > > It has happened to me on more than one occasion, and I have had reports > of this before, Until now, the message boxes where about warning the user to prevent (more or less) severe damage, not dullness. I'm strongly against moving further into that direction. Regards, Andreas