Обсуждение: Minimum height of server status dialog

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

Minimum height of server status dialog

От
Magnus Hagander
Дата:
Can somebody explain why there appears to be a minimum height on the
server status dialog that corresponds (on $customers screen at least) to
about 20 active connections?

I have <10 on each server right now, but would like to fit three windows
over each other vertically, but there's no way to make the window small
enough. I do, however, get lots and lots of whitespace...

(the locks and logfile tabs go into scrolling mode on the other tabs, so
I don't see why those would be the reason either).

If there's no reason, any objections to decreasing it (assuming I can
figure out where it's set)?

//Magnus

Re: Minimum height of server status dialog

От
"Dave Page"
Дата:
On Thu, Jul 31, 2008 at 4:01 PM, Magnus Hagander <magnus@hagander.net> wrote:
> Can somebody explain why there appears to be a minimum height on the
> server status dialog that corresponds (on $customers screen at least) to
> about 20 active connections?
>
> I have <10 on each server right now, but would like to fit three windows
> over each other vertically, but there's no way to make the window small
> enough. I do, however, get lots and lots of whitespace...
>
> (the locks and logfile tabs go into scrolling mode on the other tabs, so
> I don't see why those would be the reason either).
>
> If there's no reason, any objections to decreasing it (assuming I can
> figure out where it's set)?

None here.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

Re: Minimum height of server status dialog

От
Guillaume Lelarge
Дата:
Magnus Hagander a écrit :
> Can somebody explain why there appears to be a minimum height on the
> server status dialog that corresponds (on $customers screen at least) to
> about 20 active connections?
>
> I have <10 on each server right now, but would like to fit three windows
> over each other vertically, but there's no way to make the window small
> enough. I do, however, get lots and lots of whitespace...
>
> (the locks and logfile tabs go into scrolling mode on the other tabs, so
> I don't see why those would be the reason either).
>
> If there's no reason, any objections to decreasing it (assuming I can
> figure out where it's set)?
>

Here is a patch that fixes your two issues (the one on this mail and the
one on your " "Dangerous" hotkey in server status dialog " mail). It
should work on 1.8 branch, but I didn't actually try it there. I also
didn't check on Windows or MacOS X but none of the changes should affect
badly one of those.

Cheers.


--
Guillaume.
  http://www.postgresqlfr.org
  http://dalibo.com
Index: pgadmin/frm/frmStatus.cpp
===================================================================
--- pgadmin/frm/frmStatus.cpp    (révision 7394)
+++ pgadmin/frm/frmStatus.cpp    (copie de travail)
@@ -29,7 +29,8 @@
 BEGIN_EVENT_TABLE(frmStatus, pgDialog)
     EVT_BUTTON(wxID_REFRESH,                         frmStatus::OnRefresh)
     EVT_BUTTON(wxID_CLOSE,                              frmStatus::OnCloseBtn)
-    EVT_BUTTON(wxID_CANCEL,                          frmStatus::OnCancelBtn)
+    EVT_BUTTON(wxID_CANCEL,                          frmStatus::OnCloseBtn)
+    EVT_BUTTON(XRCID("btnCancelSt"),                  frmStatus::OnCancelBtn)
     EVT_BUTTON(wxID_STOP,                            frmStatus::OnTerminateBtn)
     EVT_BUTTON(XRCID("btnCommit"),                  frmStatus::OnCommit)
     EVT_BUTTON(XRCID("btnRollback"),                frmStatus::OnRollback)
@@ -101,8 +102,6 @@
     btnTerminateLk = CTRL_BUTTON("btnTerminateLk");
     btnCommit = CTRL_BUTTON("btnCommit");
     btnRollback = CTRL_BUTTON("btnRollback");
-    ChangeButtonId(btnCancelSt, wxID_CANCEL, _("Cancel"));
-    ChangeButtonId(btnCancelLk, wxID_CANCEL, _("Cancel"));
     ChangeButtonId(btnTerminateSt, wxID_STOP, _("Terminate"));
     ChangeButtonId(btnTerminateLk, wxID_STOP, _("Terminate"));

Index: pgadmin/ui/frmStatus.xrc
===================================================================
--- pgadmin/ui/frmStatus.xrc    (révision 7394)
+++ pgadmin/ui/frmStatus.xrc    (copie de travail)
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="frmStatus">
     <title>Database Status</title>
-    <size>400,300d</size>
+    <size>200,100d</size>

<style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER|wxRESIZE_BOX|wxTHICK_FRAME|wxMINIMIZE_BOX</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,7 +10,6 @@
       <object class="sizeritem">
         <object class="wxNotebook" name="nbStatus">
           <pos>2,24d</pos>
-          <size>395,273d</size>
           <object class="notebookpage">
             <label>Status</label>
             <object class="wxPanel" name="pnlStatus">
@@ -216,7 +215,7 @@
             <border>5</border>
           </object>
           <object class="sizeritem">
-            <object class="wxButton" name="wxID_CLOSE">
+            <object class="wxButton" name="wxID_CANCEL">
               <label>Close</label>
               <pos>342,4d</pos>
             </object>

Re: Minimum height of server status dialog

От
Magnus Hagander
Дата:
Guillaume Lelarge wrote:
> Magnus Hagander a écrit :
>> Can somebody explain why there appears to be a minimum height on the
>> server status dialog that corresponds (on $customers screen at least) to
>> about 20 active connections?
>>
>> I have <10 on each server right now, but would like to fit three windows
>> over each other vertically, but there's no way to make the window small
>> enough. I do, however, get lots and lots of whitespace...
>>
>> (the locks and logfile tabs go into scrolling mode on the other tabs, so
>> I don't see why those would be the reason either).
>>
>> If there's no reason, any objections to decreasing it (assuming I can
>> figure out where it's set)?
>>
>
> Here is a patch that fixes your two issues (the one on this mail and the
> one on your " "Dangerous" hotkey in server status dialog " mail). It
> should work on 1.8 branch, but I didn't actually try it there. I also
> didn't check on Windows or MacOS X but none of the changes should affect
> badly one of those.

Thanks!

I don't know if I hate wx more, or if wx hates me more, but I really
couldn't make the layout stuff do what I wanted :)

The hotkey stuff I was working on already, but I'll just use your patch
instead. It seems to be working fine in on my machine as well, so I'll
go ahead and commit it. One thing first though...

When I ran embed-xrc, I got a diff containing:
Index: ui/xrcDialogs.cpp
===================================================================
--- ui/xrcDialogs.cpp   (revision 7394)
+++ ui/xrcDialogs.cpp   (working copy)
@@ -13,6 +13,14 @@
 #include <wx/xrc/xmlres.h>
 #include <wx/xrc/xh_all.h>

+#if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
+    #define XRC_ADD_FILE(name, data, size, mime) \
+        wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
+#else
+    #define XRC_ADD_FILE(name, data, size, mime) \
+        wxMemoryFSHandler::AddFile(name, data, size)
+#endif
+

Is that normal? Or am I using something that I shouldn't be using? Don't
want to do anything until that's confirmed :)

//Magnus

Re: Minimum height of server status dialog

От
Guillaume Lelarge
Дата:
Magnus Hagander a écrit :
> Guillaume Lelarge wrote:
>> Magnus Hagander a écrit :
>>> Can somebody explain why there appears to be a minimum height on the
>>> server status dialog that corresponds (on $customers screen at least) to
>>> about 20 active connections?
>>>
>>> I have <10 on each server right now, but would like to fit three windows
>>> over each other vertically, but there's no way to make the window small
>>> enough. I do, however, get lots and lots of whitespace...
>>>
>>> (the locks and logfile tabs go into scrolling mode on the other tabs, so
>>> I don't see why those would be the reason either).
>>>
>>> If there's no reason, any objections to decreasing it (assuming I can
>>> figure out where it's set)?
>>>
>> Here is a patch that fixes your two issues (the one on this mail and the
>> one on your " "Dangerous" hotkey in server status dialog " mail). It
>> should work on 1.8 branch, but I didn't actually try it there. I also
>> didn't check on Windows or MacOS X but none of the changes should affect
>> badly one of those.
>
> Thanks!
>
> I don't know if I hate wx more, or if wx hates me more, but I really
> couldn't make the layout stuff do what I wanted :)
>

Working to fix some dialogs makes me learn a few things about xrc files.
So, now, I hate xrc files less. Anyways, I'm still not a wxWidgets fan.

> The hotkey stuff I was working on already, but I'll just use your patch
> instead. It seems to be working fine in on my machine as well, so I'll
> go ahead and commit it. One thing first though...
>
> When I ran embed-xrc, I got a diff containing:
> Index: ui/xrcDialogs.cpp
> ===================================================================
> --- ui/xrcDialogs.cpp   (revision 7394)
> +++ ui/xrcDialogs.cpp   (working copy)
> @@ -13,6 +13,14 @@
>  #include <wx/xrc/xmlres.h>
>  #include <wx/xrc/xh_all.h>
>
> +#if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
> +    #define XRC_ADD_FILE(name, data, size, mime) \
> +        wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
> +#else
> +    #define XRC_ADD_FILE(name, data, size, mime) \
> +        wxMemoryFSHandler::AddFile(name, data, size)
> +#endif
> +
>
> Is that normal? Or am I using something that I shouldn't be using? Don't
> want to do anything until that's confirmed :)
>

I don't have this on my "svn diff", but I do have these lines on my
xrcDialog.cpp file. Are you sure your svn copy is uptodate ?


--
Guillaume.
  http://www.postgresqlfr.org
  http://dalibo.com

Re: Minimum height of server status dialog

От
Magnus Hagander
Дата:
Guillaume Lelarge wrote:
>> The hotkey stuff I was working on already, but I'll just use your patch
>> instead. It seems to be working fine in on my machine as well, so I'll
>> go ahead and commit it. One thing first though...
>>
>> When I ran embed-xrc, I got a diff containing:
>> Index: ui/xrcDialogs.cpp
>> ===================================================================
>> --- ui/xrcDialogs.cpp   (revision 7394)
>> +++ ui/xrcDialogs.cpp   (working copy)
>> @@ -13,6 +13,14 @@
>>  #include <wx/xrc/xmlres.h>
>>  #include <wx/xrc/xh_all.h>
>>
>> +#if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
>> +    #define XRC_ADD_FILE(name, data, size, mime) \
>> +        wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
>> +#else
>> +    #define XRC_ADD_FILE(name, data, size, mime) \
>> +        wxMemoryFSHandler::AddFile(name, data, size)
>> +#endif
>> +
>>
>> Is that normal? Or am I using something that I shouldn't be using? Don't
>> want to do anything until that's confirmed :)
>>
>
> I don't have this on my "svn diff", but I do have these lines on my
> xrcDialog.cpp file. Are you sure your svn copy is uptodate ?

Ah, I get it. I get them in the svn diff in the *backbranch*, but not in
HEAD.... Are we using different versions of wx to build these two?

//Magnus

Re: Minimum height of server status dialog

От
Guillaume Lelarge
Дата:
Magnus Hagander a écrit :
> Guillaume Lelarge wrote:
>>> The hotkey stuff I was working on already, but I'll just use your patch
>>> instead. It seems to be working fine in on my machine as well, so I'll
>>> go ahead and commit it. One thing first though...
>>>
>>> When I ran embed-xrc, I got a diff containing:
>>> Index: ui/xrcDialogs.cpp
>>> ===================================================================
>>> --- ui/xrcDialogs.cpp   (revision 7394)
>>> +++ ui/xrcDialogs.cpp   (working copy)
>>> @@ -13,6 +13,14 @@
>>>  #include <wx/xrc/xmlres.h>
>>>  #include <wx/xrc/xh_all.h>
>>>
>>> +#if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
>>> +    #define XRC_ADD_FILE(name, data, size, mime) \
>>> +        wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
>>> +#else
>>> +    #define XRC_ADD_FILE(name, data, size, mime) \
>>> +        wxMemoryFSHandler::AddFile(name, data, size)
>>> +#endif
>>> +
>>>
>>> Is that normal? Or am I using something that I shouldn't be using? Don't
>>> want to do anything until that's confirmed :)
>>>
>> I don't have this on my "svn diff", but I do have these lines on my
>> xrcDialog.cpp file. Are you sure your svn copy is uptodate ?
>
> Ah, I get it. I get them in the svn diff in the *backbranch*, but not in
> HEAD.... Are we using different versions of wx to build these two?
>

You're right. I was only working on trunk. On 1.8 branch, I have the
same "svn diff" than you. I don't think we change the wxWidgets toolkit.
I use the --with-wx flag to work on wxWidgets 2.8.8, on the 1.8 branch
and on trunk. I don't know what ./embed-xrc script will do if I was
using a wxWidgets older than 2.8.5.

Anyways, we should built against wxWidgets 2.8.8 because of the GTK
patch they add on this release that fixes our shortcuts on contextual menus.

So, +1 to commit your diff.


--
Guillaume.
  http://www.postgresqlfr.org
  http://dalibo.com