Re: Beta 2 Wednesday?

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Beta 2 Wednesday?
Дата
Msg-id 46AB7D0B.5090506@lelarge.info
обсуждение исходный текст
Ответ на Re: Beta 2 Wednesday?  (Dave Page <dpage@postgresql.org>)
Ответы Re: Beta 2 Wednesday?  (Dave Page <dpage@postgresql.org>)
Список pgadmin-hackers
Dave Page a écrit :
> Guillaume Lelarge wrote:
>> Sorry, I still reproduce it under PostgreSQL 8.2.4+ and PostgreSQL HEAD.
>>
>> Here are steps to reproduce problem :
>>  - right click on a function
>>  - choose Properties
>>  - change function's name
>>
>> OK button will not be enabled, SQL string will not show.
>
> Are you sure you're running the build you think you are? Following the
> steps you detail above works perfectly on PostgreSQL 8.2.4 and
> EnterpriseDB AS 8.2 for me. I've tried C, pl/pgsql and edbspl functions
> (though the latter only on EDB of course).
>
> Not that it should matter, but this is SVN head of pgAdmin, running on XP.
>

OK, I think I've found a fix to Pavel's issue. To check cbLanguage, we
use GetCurrentSelection. When I try to change an already defined
function, GetCurrentSelection always returns -1 which is an invalid
value. If I use GetGuessedSelection (with every other changes needed to
use ctlComboBox instead of wxComboBox), it works great. I'm not sure
this is the right way to fix this, so here is the patch.

As always, comments welcomed.

Regards.


--
Guillaume.
<!-- http://abs.traduc.org/
     http://lfs.traduc.org/
     http://docs.postgresqlfr.org/ -->
Index: pgadmin/dlg/dlgFunction.cpp
===================================================================
--- pgadmin/dlg/dlgFunction.cpp    (révision 6504)
+++ pgadmin/dlg/dlgFunction.cpp    (copie de travail)
@@ -30,7 +30,7 @@
 #define stReturntype        CTRL_STATIC("stReturntype")
 #define cbReturntype        CTRL_COMBOBOX2("cbReturntype")
 #define stLanguage          CTRL_STATIC("stLanguage")
-#define cbLanguage          CTRL_COMBOBOX("cbLanguage")
+#define cbLanguage          CTRL_COMBOBOX2("cbLanguage")
 #define chkSetof            CTRL_CHECKBOX("chkSetof")
 #define stVolatility        CTRL_STATIC("stVolatility")
 #define cbVolatility        CTRL_COMBOBOX("cbVolatility")
@@ -339,7 +339,7 @@
         CheckValid(enable, cbReturntype->GetGuessedSelection() >= 0, _("Please select return type."));

     if (!(isProcedure && connection->GetIsEdb()))
-        CheckValid(enable, cbLanguage->GetCurrentSelection() >= 0, _("Please select language."));
+        CheckValid(enable, cbLanguage->GetGuessedSelection() >= 0, _("Please select language."));

     if (isC)
     {
Index: pgadmin/ui/dlgFunction.xrc
===================================================================
--- pgadmin/ui/dlgFunction.xrc    (révision 6504)
+++ pgadmin/ui/dlgFunction.xrc    (copie de travail)
@@ -59,7 +59,7 @@
                 <label>Language</label>
                 <pos>5,82d</pos>
               </object>
-              <object class="wxComboBox" name="cbLanguage">
+              <object class="ctlComboBox" name="cbLanguage">
                 <content/>
                 <pos>70,80d</pos>
                 <size>135,12d</size>
Index: pgadmin/ui/xrcDialogs.cpp
===================================================================
--- pgadmin/ui/xrcDialogs.cpp    (révision 6504)
+++ pgadmin/ui/xrcDialogs.cpp    (copie de travail)
@@ -2565,7 +2565,7 @@
 62,10,32,32,60,47,111,98,106,101,99,116,62,10,60,47,114,101,115,111,117,
 114,99,101,62,10};

-static size_t xml_res_size_13 = 13937;
+static size_t xml_res_size_13 = 13938;
 static unsigned char xml_res_file_13[] = {
 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
 110,99,111,100,105,110,103,61,34,73,83,79,45,56,56,53,57,45,49,34,63,62,
@@ -2676,9 +2676,9 @@
 32,32,32,32,32,32,32,60,112,111,115,62,53,44,56,50,100,60,47,112,111,115,
 62,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,47,111,98,106,101,99,
 116,62,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,111,98,106,101,99,
-116,32,99,108,97,115,115,61,34,119,120,67,111,109,98,111,66,111,120,34,
-32,110,97,109,101,61,34,99,98,76,97,110,103,117,97,103,101,34,62,10,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,99,111,110,116,101,110,
+116,32,99,108,97,115,115,61,34,99,116,108,67,111,109,98,111,66,111,120,
+34,32,110,97,109,101,61,34,99,98,76,97,110,103,117,97,103,101,34,62,10,
+32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,99,111,110,116,101,110,
 116,47,62,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,112,111,
 115,62,55,48,44,56,48,100,60,47,112,111,115,62,10,32,32,32,32,32,32,32,
 32,32,32,32,32,32,32,32,32,60,115,105,122,101,62,49,51,53,44,49,50,100,

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Issue on compiling pgAdmin trunk
Следующее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: Small patch for tips.txt