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

« back to all changes in this revision

Viewing changes to pgadmin/frm/frmMaintenance.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: frmMaintenance.cpp 6930 2008-01-02 00:10:01Z dpage $
5
 
// Copyright (C) 2002 - 2008, The pgAdmin Development Team
6
 
// This software is released under the Artistic Licence
 
4
// RCS-ID:      $Id: frmMaintenance.cpp 7758 2009-03-26 20:49:59Z dpage $
 
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
 
6
// This software is released under the BSD Licence
7
7
//
8
8
// frmMaintenance.cpp - Maintenance options selection dialogue
9
9
//
17
17
 
18
18
// App headers
19
19
#include "pgAdmin3.h"
 
20
#include "ctl/ctlMenuToolbar.h"
20
21
#include "frm/frmMaintenance.h"
21
22
#include "frm/frmMain.h"
22
23
#include "utils/sysLogger.h"
37
38
#define chkFreeze               CTRL_CHECKBOX("chkFreeze")
38
39
#define chkAnalyze              CTRL_CHECKBOX("chkAnalyze")
39
40
#define sbxReindexOptions       CTRL_STATICBOX("sbxReindexOptions")
40
 
#define chkForce                CTRL_CHECKBOX("chkForce")
41
41
#define chkRecreate             CTRL_CHECKBOX("chkRecreate")
42
42
#define chkVerbose              CTRL_CHECKBOX("chkVerbose")
43
43
 
101
101
    chkAnalyze->Enable(isVacuum);
102
102
 
103
103
    bool isReindex = (rbxAction->GetSelection() == 2);
104
 
    sbxReindexOptions->Enable(isReindex && object->GetMetaType() == PGM_DATABASE || object->GetMetaType() == PGM_INDEX || object->GetMetaType() == PGM_PRIMARYKEY || object->GetMetaType() == PGM_UNIQUE);
105
 
    chkForce->Enable(isReindex && object->GetMetaType() == PGM_DATABASE);
 
104
    sbxReindexOptions->Enable(isReindex && (object->GetMetaType() == PGM_DATABASE || object->GetMetaType() == PGM_INDEX || object->GetMetaType() == PGM_PRIMARYKEY || object->GetMetaType() == PGM_UNIQUE));
106
105
    chkRecreate->Enable(isReindex && object->GetMetaType() == PGM_INDEX);
107
106
}
108
107
 
161
160
                {
162
161
                    sql = wxT("REINDEX ") + object->GetTypeName().Upper()
163
162
                        + wxT(" ") + object->GetQuotedFullIdentifier();
164
 
                    if (chkForce->GetValue())
165
 
                        sql += wxT(" FORCE");
166
163
                }
167
164
            }
168
165
            break;
182
179
 
183
180
 
184
181
 
185
 
maintenanceFactory::maintenanceFactory(menuFactoryList *list, wxMenu *mnu, wxToolBar *toolbar) : contextActionFactory(list)
 
182
maintenanceFactory::maintenanceFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar) : contextActionFactory(list)
186
183
{
187
184
    mnu->Append(id, _("&Maintenance..."), _("Maintain the current database or table."));
188
185
    toolbar->AddTool(id, _("Maintenance"), wxBitmap(vacuum_xpm), _("Maintain the current database or table."), wxITEM_NORMAL);