Saturday, August 30, 2008

Re: [pgadmin-hackers] Enabling SQL text field in the SQL tab of object dialog

Index: pgadmin/dlg/dlgTable.cpp
===================================================================
--- pgadmin/dlg/dlgTable.cpp (révision 7450)
+++ pgadmin/dlg/dlgTable.cpp (copie de travail)
@@ -970,6 +970,19 @@
stFactorAnCurr->SetLabel(NumToStr((tableAnlFactor == -1) ? settingAnlFactor : tableAnlFactor));
stVacDelayCurr->SetLabel(NumToStr((tableCostDelay == -1) ? settingCostDelay : tableCostDelay));
stVacLimitCurr->SetLabel(NumToStr((tableCostLimit == -1) ? settingCostLimit : tableCostLimit));
+
+ if (stBaseVacCurr->GetLabel().Length() == 0)
+ stBaseVacCurr->SetLabel(wxT("N/A"));
+ if (stBaseAnCurr->GetLabel().Length() == 0)
+ stBaseAnCurr->SetLabel(wxT("N/A"));
+ if (stFactorVacCurr->GetLabel().Length() == 0)
+ stFactorVacCurr->SetLabel(wxT("N/A"));
+ if (stFactorAnCurr->GetLabel().Length() == 0)
+ stFactorAnCurr->SetLabel(wxT("N/A"));
+ if (stVacDelayCurr->GetLabel().Length() == 0)
+ stVacDelayCurr->SetLabel(wxT("N/A"));
+ if (stVacLimitCurr->GetLabel().Length() == 0)
+ stVacLimitCurr->SetLabel(wxT("N/A"));

if (connection->BackendMinimumVersion(8, 2))
{
Index: pgadmin/ui/dlgTable.xrc
===================================================================
--- pgadmin/ui/dlgTable.xrc (révision 7450)
+++ pgadmin/ui/dlgTable.xrc (copie de travail)
@@ -349,7 +349,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticText" name="stBaseVacCurr">
- <label></label>
+ <label>N/A</label>
</object>
<flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
<border>4</border>
@@ -369,7 +369,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticText" name="stBaseAnCurr">
- <label></label>
+ <label>N/A</label>
</object>
<flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
<border>4</border>
@@ -389,7 +389,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticText" name="stFactorVacCurr">
- <label></label>
+ <label>N/A</label>
</object>
<flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
<border>4</border>
@@ -409,7 +409,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticText" name="stFactorAnCurr">
- <label></label>
+ <label>N/A</label>
</object>
<flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
<border>4</border>
@@ -429,7 +429,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticText" name="stVacDelayCurr">
- <label></label>
+ <label>N/A</label>
</object>
<flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
<border>4</border>
@@ -449,7 +449,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticText" name="stVacLimitCurr">
- <label></label>
+ <label>N/A</label>
</object>
<flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
<border>4</border>
@@ -469,7 +469,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticText" name="stFreezeMinAgeCurr">
- <label></label>
+ <label>N/A</label>
</object>
<flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
<border>4</border>
@@ -489,7 +489,7 @@
</object>
<object class="sizeritem">
<object class="wxStaticText" name="stFreezeMaxAgeCurr">
- <label></label>
+ <label>N/A</label>
</object>
<flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
<border>4</border>
Dave Page a écrit :
> On Wed, Aug 27, 2008 at 9:10 AM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>
>> It seems at the right place to me. There are three columns on this tab:
>> first one for the labels, second one for the text box, and third one for
>> static texts showing current values.
>
> Oh, yes - of course. I wonder if we should give the static text boxes
> a thin border so it's obviously they are there, even when empty? At
> the moment it just looks odd.
>

I tried many things but didn't manage to get a border, thin or fat.
Perhaps wa can just put an N/A text on each static box? See attached patch.


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

No comments: