Re: Minimum height of server status dialog - Mailing list pgadmin-hackers

From Guillaume Lelarge
Subject Re: Minimum height of server status dialog
Date
Msg-id 4892C923.1030300@lelarge.info
Whole thread Raw
In response to Minimum height of server status dialog  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Minimum height of server status dialog  (Magnus Hagander <magnus@hagander.net>)
List pgadmin-hackers
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>

pgadmin-hackers by date:

Previous
From: "Milen A. Radev"
Date:
Subject: Re: test report: graphical Query builder
Next
From: Guillaume Lelarge
Date:
Subject: Re: Google Summer of Code Projects