Обсуждение: Re: [pgadmin-support] Some little userfriendly improvements

Поиск
Список
Период
Сортировка

Re: [pgadmin-support] Some little userfriendly improvements

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of yoursoft
> Sent: 03 August 2006 12:12
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] Some little userfriendly improvements
>
> Dear Developers,
>
> There are some little, but useful improvements: :-)
> - In left tree, left click on a table, and select 'view
> filtered data'.
> Can be set to focus to the filter text input?
> - In left tree, left click on a table, and select 'view data', and
> select 'sort/filter option' icon. 'Data  sorting' tab.
> If there are more than 1 sorting column in the list -> You press
> 'remove' button. It is remove the selected item from the
> list, but not
> select the next item in the list.

Thise are good suggestions and an ideal starter project for anyone
wanting to start hacking on pgAdmin.

Anyone want t give them a go?

Regards, Dave.

Re: [pgadmin-support] Some little userfriendly

От
Guillaume Lelarge
Дата:
Dave Page a ecrit le 03/08/2006 15:03:
>> There are some little, but useful improvements: :-)
>> - In left tree, left click on a table, and select 'view
>> filtered data'.
>> Can be set to focus to the filter text input?
>> - In left tree, left click on a table, and select 'view data', and
>> select 'sort/filter option' icon. 'Data  sorting' tab.
>> If there are more than 1 sorting column in the list -> You press
>> 'remove' button. It is remove the selected item from the
>> list, but not
>> select the next item in the list.
>
> Thise are good suggestions and an ideal starter project for anyone
> wanting to start hacking on pgAdmin.
>
> Anyone want t give them a go?
>

Well, I'm interested. But I will be pretty slow so I don't want to stop
anyone from doing it.

Regards.


--
Guillaume.

Re: [pgadmin-support] Some little userfriendly improvements

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Guillaume Lelarge [mailto:guillaume@lelarge.info]
> Sent: 03 August 2006 14:57
> To: Dave Page
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] [pgadmin-support] Some little
> userfriendly improvements
>
> Dave Page a ecrit le 03/08/2006 15:03:
> >> There are some little, but useful improvements: :-)
> >> - In left tree, left click on a table, and select 'view
> >> filtered data'.
> >> Can be set to focus to the filter text input?
> >> - In left tree, left click on a table, and select 'view data', and
> >> select 'sort/filter option' icon. 'Data  sorting' tab.
> >> If there are more than 1 sorting column in the list -> You press
> >> 'remove' button. It is remove the selected item from the
> >> list, but not
> >> select the next item in the list.
> >
> > Thise are good suggestions and an ideal starter project for anyone
> > wanting to start hacking on pgAdmin.
> >
> > Anyone want t give them a go?
> >
>
> Well, I'm interested. But I will be pretty slow so I don't
> want to stop
> anyone from doing it.

Please go ahead - I'm on vacation for a couple of weeks from Sunday
anyway and won't get anything done before then.

These should be little more than one or two line tweaks, but give the
newcomer a nice chance to setup an SVN tree and have a wander around the
code without having to delve deeply into the complex bits on a first
outing :-)

Regards, Dave.


Re: [pgadmin-support] Some little userfriendly

От
Guillaume Lelarge
Дата:
Dave Page a écrit :
>
>
>> -----Original Message-----
>> From: Guillaume Lelarge [mailto:guillaume@lelarge.info]
>> Sent: 03 August 2006 14:57
>> To: Dave Page
>> Cc: pgadmin-hackers@postgresql.org
>> Subject: Re: [pgadmin-hackers] [pgadmin-support] Some little
>> userfriendly improvements
>>
>> Dave Page a ecrit le 03/08/2006 15:03:
>>>> There are some little, but useful improvements: :-)
>>>> - In left tree, left click on a table, and select 'view
>>>> filtered data'.
>>>> Can be set to focus to the filter text input?
>>>> - In left tree, left click on a table, and select 'view data', and
>>>> select 'sort/filter option' icon. 'Data  sorting' tab.
>>>> If there are more than 1 sorting column in the list -> You press
>>>> 'remove' button. It is remove the selected item from the
>>>> list, but not
>>>> select the next item in the list.
>>> Thise are good suggestions and an ideal starter project for anyone
>>> wanting to start hacking on pgAdmin.
>>>
>>> Anyone want t give them a go?
>>>
>> Well, I'm interested. But I will be pretty slow so I don't
>> want to stop
>> anyone from doing it.
>
> Please go ahead - I'm on vacation for a couple of weeks from Sunday
> anyway and won't get anything done before then.
>
> These should be little more than one or two line tweaks, but give the
> newcomer a nice chance to setup an SVN tree and have a wander around the
> code without having to delve deeply into the complex bits on a first
> outing :-)
>

So here it is. This patch (listitem.patch) is for the second request. It
was really quick to do, juste a few lines to add.

For the first ui issue, I just added this line at end of
DlgEditGridOptions' constructor:
  filter->SetFocus();

In fact, this line does nothing with modal dialog on Linux and I don't
know if it works on windows... pretty bad heh :) What's strange is that
it works on non-modal dialog. With a bit of googling, it seems there's a
bug on wxWidget with focus on modal dialog some time ago. Don't know if
this is still true. I'll continue to work on this but if you have any
idea, I'm really interested in hearing it.


--
Guillaume.
<!-- http://abs.traduc.org/
     http://lfs.traduc.org/
     http://traduc.postgresqlfr.org/ -->
Index: dlg/dlgEditGridOptions.cpp
===================================================================
--- dlg/dlgEditGridOptions.cpp    (révision 5293)
+++ dlg/dlgEditGridOptions.cpp    (copie de travail)
@@ -170,6 +170,15 @@
     itm = lstSortCols->GetNextItem(itm, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
     cboColumns->Append(lstSortCols->GetItemText(itm));
     lstSortCols->DeleteItem(itm);
+    if (lstSortCols->GetItemCount() > 0)
+    {
+        if (lstSortCols->GetItemCount() < itm+1)
+            lstSortCols->SetItemState(lstSortCols->GetItemCount()-1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
+        else
+            lstSortCols->SetItemState(itm, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
+    }
+    wxListEvent nullLstEvent;
+    OnLstSortColsChange(nullLstEvent);
 }

 void dlgEditGridOptions::OnAsc(wxCommandEvent &ev)

Re: [pgadmin-support] Some little userfriendly

От
Dave Page
Дата:


On 15/8/06 12:03, "Guillaume Lelarge" <guillaume@lelarge.info> wrote:

> So here it is. This patch (listitem.patch) is for the second request. It
> was really quick to do, juste a few lines to add.
>
> For the first ui issue, I just added this line at end of
> DlgEditGridOptions' constructor:
>   filter->SetFocus();
>
> In fact, this line does nothing with modal dialog on Linux and I don't
> know if it works on windows... pretty bad heh :) What's strange is that
> it works on non-modal dialog. With a bit of googling, it seems there's a
> bug on wxWidget with focus on modal dialog some time ago. Don't know if
> this is still true. I'll continue to work on this but if you have any
> idea, I'm really interested in hearing it.

Hmm, certainly works on Mac. I don't have any other boxes here to test on.

Patch applied though, as technically it is correct regardless of any bugs in
wx on specific platforms.

Thanks, and congrats on your first code patch :-)

Regards, Dave