Обсуждение: Two unrelated issues
Hi, Yesterday, while working on the patch for the "more complex user/database default GUC settings" ticket (#102), I stumbled upon two things. The first one, quite related to it, is that we have a bug in 1.10 that prevents us from changing a GUC default value if it has a unit. We don't add quotes around the value, so the query returns with error (for example "ALTER DATABASE SET work_mem=10MB", instead of "ALTER DATABASE SET work_mem='10MB'". Seems quite easy to fix as we just need to add quotes for each value. I'll commit a fix tonight if nobody objects. The second one is completely unrelated. I found this line in pgadmin/ctl/ctlCombobox.cpp: #ifdef __WXGTK__ SetEditable(false); #endif That would explain why GTK users can't edit a combobox. The one that really bugs a lot of users is the type combobox in dlgColumn. I wonder why this specific code has been added in the first place. I found Andres added it, at revision 3562 (http://code.pgadmin.org/trac/changeset/3562#file27), but I don't find any reason why. Anyone reminds the issue? Honestly, I didn't try to remove this code and test it. I'll do tonight, but I would like to get some ideas on this code. Thanks. PS: I should have a complete patch for the "more complex user/database default GUC settings" new 8.5 feature tonight. I already handle successfully the database change. I'll need to duplicate it for the user properties dialog. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com
Hi Guillaume,
The second one is completely unrelated. I found this line in
pgadmin/ctl/ctlCombobox.cpp:
#ifdef __WXGTK__
SetEditable(false);
#endif
As long as I remember, we found that auto-completion does not work properly (not as expected in better manner) in the combo-box under GTK.
Hence, we decided to make the combo-box read-only at that time, until we get some proper solution.
That would explain why GTK users can't edit a combobox. The one that
really bugs a lot of users is the type combobox in dlgColumn. I wonder
why this specific code has been added in the first place. I found Andres
added it, at revision 3562
(http://code.pgadmin.org/trac/changeset/3562#file27), but I don't find
any reason why. Anyone reminds the issue? Honestly, I didn't try to
remove this code and test it. I'll do tonight, but I would like to get
some ideas on this code.
Thanks.
PS: I should have a complete patch for the "more complex user/database
default GUC settings" new 8.5 feature tonight. I already handle
successfully the database change. I'll need to duplicate it for the user
properties dialog.
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Le 20/01/2010 07:35, Ashesh Vashi a écrit : > Hi Guillaume, > > >> The second one is completely unrelated. I found this line in >> pgadmin/ctl/ctlCombobox.cpp: >> >> #ifdef __WXGTK__ >> SetEditable(false); >> #endif >> > As long as I remember, we found that auto-completion does not work properly > (not as expected in better manner) in the combo-box under GTK. > > Hence, we decided to make the combo-box read-only at that time, until we get > some proper solution. > I understand that. I still think it is simpler to allow typing in the combobox I can type "text" quicker than selecting "text" item in the combobox (and way way more quicker if I need the serial pseudo-type). Moreover, we have the GuessedSelection functions to check what the user types in, don't we? -- Guillaume. http://www.postgresqlfr.org http://dalibo.com
On Wed, Jan 20, 2010 at 12:31 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
Le 20/01/2010 07:35, Ashesh Vashi a écrit :> Hi Guillaume,I understand that. I still think it is simpler to allow typing in the
>
>
>> The second one is completely unrelated. I found this line in
>> pgadmin/ctl/ctlCombobox.cpp:
>>
>> #ifdef __WXGTK__
>> SetEditable(false);
>> #endif
>>
> As long as I remember, we found that auto-completion does not work properly
> (not as expected in better manner) in the combo-box under GTK.
>
> Hence, we decided to make the combo-box read-only at that time, until we get
> some proper solution.
>
combobox I can type "text" quicker than selecting "text" item in the
combobox (and way way more quicker if I need the serial pseudo-type).
Moreover, we have the GuessedSelection functions to check what the user
types in, don't we?
That's true.
We can do that..
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA - Enterprise Postgres Company
--
On Wed, Jan 20, 2010 at 7:05 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote: > >> > As long as I remember, we found that auto-completion does not work >> > properly >> > (not as expected in better manner) in the combo-box under GTK. >> > >> > Hence, we decided to make the combo-box read-only at that time, until we >> > get >> > some proper solution. >> > >> >> I understand that. I still think it is simpler to allow typing in the >> combobox I can type "text" quicker than selecting "text" item in the >> combobox (and way way more quicker if I need the serial pseudo-type). >> Moreover, we have the GuessedSelection functions to check what the user >> types in, don't we? > > > That's true. > We can do that.. I love how Ashesh's memory of pgAdmin's commits goes back over 5 years :-) In any case, he's right. As I recall, you get some really weird behaviour with auto-complete, which is less desirable than being able to type. It's worth playing again though - the behaviour of wxWidgets might have changed enough since I last tried to fix it. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com