~ubuntu-branches/debian/sid/pgadmin3/sid

« back to all changes in this revision

Viewing changes to pgadmin/dlg/dlgEditGridOptions.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2009-07-30 12:27:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730122716-fddbh42on721bbs2
Tags: 1.10.0-1
* New upstream release.
* Adjusted watch file to match release candidates.
* Updated to Standards-Version 3.8.2:
  - Moved to Section: database.
  - Add DEB_BUILD_OPTIONS support for parallel building.
  - Move from findstring to filter suggestion for DEB_BUILD_OPTIONS parsing.
* pgagent got split into its own separate source package by upstream.
* Exclude Docs.vcproj from installation.
* Move doc-base.enus from pgadmin3 to pgadmin3-data package, the files are
  in there too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//////////////////////////////////////////////////////////////////////////
2
2
//
3
3
// pgAdmin III - PostgreSQL Tools
4
 
// RCS-ID:      $Id: dlgEditGridOptions.cpp 7209 2008-03-31 15:43:56Z dpage $
5
 
// Copyright (C) 2002 - 2008, The pgAdmin Development Team
6
 
// This software is released under the Artistic Licence
 
4
// RCS-ID:      $Id: dlgEditGridOptions.cpp 7885 2009-05-27 13:36:54Z dpage $
 
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
 
6
// This software is released under the BSD Licence
7
7
//
8
8
// dlgEditGridOptions.cpp - Edit Grid Box Options
9
9
//
56
56
    EVT_COMBOBOX             (XRCID("cboColumns"),  dlgEditGridOptions::OnCboColumnsChange) 
57
57
    EVT_LIST_ITEM_SELECTED   (XRCID("lstSortCols"), dlgEditGridOptions::OnLstSortColsChange) 
58
58
    EVT_LIST_ITEM_DESELECTED (XRCID("lstSortCols"), dlgEditGridOptions::OnLstSortColsChange) 
 
59
#ifdef __WXMAC__
 
60
    EVT_SIZE(                                       dlgEditGridOptions::OnChangeSize)
 
61
#endif
59
62
END_EVENT_TABLE()
60
63
 
61
64
dlgEditGridOptions::dlgEditGridOptions(frmEditGrid *win, pgConn *conn, const wxString &rel, ctlSQLEditGrid *grid)
187
190
    OnLstSortColsChange(nullLstEvent);
188
191
}
189
192
 
 
193
 
190
194
void dlgEditGridOptions::OnAsc(wxCommandEvent &ev)
191
195
{
192
196
    long itm = lstSortCols->GetItemCount();
215
219
    OnLstSortColsChange(nullLstEvent);
216
220
}
217
221
 
 
222
#ifdef __WXMAC__
 
223
void dlgEditGridOptions::OnChangeSize(wxSizeEvent &ev)
 
224
{
 
225
        if (lstSortCols)
 
226
            lstSortCols->SetSize(wxDefaultCoord, wxDefaultCoord,
 
227
                ev.GetSize().GetWidth(), ev.GetSize().GetHeight() - 350);
 
228
    if (GetAutoLayout())
 
229
    {
 
230
        Layout();
 
231
    }
 
232
}
 
233
#endif
 
234
 
218
235
void dlgEditGridOptions::OnValidate(wxCommandEvent &ev)
219
236
{
220
237
    if (Validate()) 
255
272
 
256
273
void dlgEditGridOptions::OnOK(wxCommandEvent &ev)
257
274
{
 
275
#ifdef __WXGTK__
 
276
    if (!btnOK->IsEnabled())
 
277
        return;
 
278
#endif
258
279
    // Check the filter syntax
259
280
    if (!Validate()) return;
260
281
 
285
306
 
286
307
bool dlgEditGridOptions::Validate()
287
308
{
288
 
    extern frmMain *winMain;
289
309
    winMain->StartMsg(_("Validating filter string"));
290
310
    filter->MarkerDeleteAll(0);
291
311
    if (!filter->GetText().Trim().Length()) {