Log Message:
-----------
pgFrame refactoring
Modified Files:
--------------
pgadmin3/src/include:
dlgClasses.h (r1.11 -> r1.12)
frmMain.h (r1.55 -> r1.56)
frmQuery.h (r1.25 -> r1.26)
Index: frmMain.h
===================================================================
RCS file: /projects/pgadmin3/src/include/frmMain.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -Lsrc/include/frmMain.h -Lsrc/include/frmMain.h -u -w -r1.55 -r1.56
--- src/include/frmMain.h
+++ src/include/frmMain.h
@@ -69,14 +69,11 @@
ctlListView *referencedBy, *dependsOn;
wxNotebook *listViews;
ctlSQLBox *sqlPane;
- wxMenuBar *menuBar;
- wxMenu *fileMenu, *editMenu, *newMenu, *toolsMenu, *viewMenu, *helpMenu,
*treeContextMenu, *newContextMenu;
- wxToolBar *toolBar;
+ wxMenu *editMenu, *newMenu, *toolsMenu, *viewMenu, *treeContextMenu,
*newContextMenu;
wxTreeItemId servers;
wxImageList *images;
wxSplitterWindow *horizontal, *vertical;
- wxStatusBar *statusBar;
wxStopWatch stopwatch;
wxString timermsg;
long msgLevel;
@@ -85,7 +82,6 @@
pgObject *currentObject;
pgDatabase *m_database;
- void OnKeyDown(wxKeyEvent& event);
void OnAbout(wxCommandEvent& event);
void OnContents(wxCommandEvent& event);
void OnHelp(wxCommandEvent& event);
@@ -111,6 +107,8 @@
void OnCount(wxCommandEvent& event);
void OnContextMenu(wxCommandEvent& event);
+ void OnConfig(wxCommandEvent& event);
+ void OnHbaConfig(wxCommandEvent& event);
void OnPageChange(wxNotebookEvent& event);
void OnPropSelChanged(wxListEvent& event);
Index: dlgClasses.h
===================================================================
RCS file: /projects/pgadmin3/src/include/dlgClasses.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/include/dlgClasses.h -Lsrc/include/dlgClasses.h -u -w -r1.11 -r1.12
--- src/include/dlgClasses.h
+++ src/include/dlgClasses.h
@@ -48,13 +48,29 @@
{
public:
pgFrame(wxFrame *parent, const wxString &title, const wxPoint&
pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long
flags=wxDEFAULT_FRAME_STYLE)
- : wxFrame(parent, -1, title, pos, size, flags) {}
+ : wxFrame(parent, -1, title, pos, size, flags) { changed=false;
recentFileMenu=0; }
void RestorePosition(int defaultX=-1, int defaultY=-1, int defaultW=-1, int
defaultH=-1, int minW=100, int minH=70);
void SavePosition();
protected:
+ void OnKeyDown(wxKeyEvent& event);
+ void OnExit(wxCommandEvent& event);
+ void OnRecent(wxCommandEvent& event);
+ virtual void OpenLastFile() {}
+
+ void UpdateRecentFiles();
+
wxString dlgName;
+ wxString lastFilename, lastDir, lastPath;
+ wxString recentKey;
+ wxMenu *fileMenu, *recentFileMenu, *helpMenu;
+ wxStatusBar *statusBar;
+ wxMenuBar *menuBar;
+ wxToolBar *toolBar;
+ bool changed;
+
+ DECLARE_EVENT_TABLE();
};
Index: frmQuery.h
===================================================================
RCS file: /projects/pgadmin3/src/include/frmQuery.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lsrc/include/frmQuery.h -Lsrc/include/frmQuery.h -u -w -r1.25 -r1.26
--- src/include/frmQuery.h
+++ src/include/frmQuery.h
@@ -34,8 +34,6 @@
wxNotebook *output;
ctlSQLResult *sqlResult;
wxTextCtrl *msgResult, *msgHistory;
- wxStatusBar *statusBar;
- wxToolBar *toolBar;
pgConn *conn;
wxLongLong elapsedQuery, elapsedRetrieve;
@@ -52,8 +50,6 @@
void OnSave(wxCommandEvent& event);
void OnSaveAs(wxCommandEvent& event);
void OnExport(wxCommandEvent& event);
- void OnExit(wxCommandEvent& event);
- void OnRecent(wxCommandEvent& event);
void OnCut(wxCommandEvent& event);
void OnCopy(wxCommandEvent& event);
void OnPaste(wxCommandEvent& event);
@@ -63,24 +59,22 @@
void OnRedo(wxCommandEvent& event);
void OnSaveHistory(wxCommandEvent& event);
void OnClearHistory(wxCommandEvent& event);
- void OnKeyDown(wxKeyEvent& event);
void OnActivate(wxActivateEvent& event);
void OnFocus(wxFocusEvent& event);
- void updateRecentFiles();
- void openLastFile();
+ bool CheckChanged(bool canVeto);
+ void OpenLastFile();
void updateMenu(wxObject *obj=0);
void execQuery(const wxString &query, int resultToRetrieve=0, bool
singleResult=false, const int queryOffset=0, bool toFile=false);
void setTools(const bool running);
void showMessage(const wxString& msg, const wxString &msgShort=wxT(""));
void setExtendedTitle();
wxWindow *currentControl();
- wxMenuBar *menuBar;
- wxMenu *fileMenu, *recentFileMenu, *editMenu, *queryMenu;
+ wxMenu *editMenu, *queryMenu;
wxString title;
- wxString lastFilename, lastDir, lastPath;
+ wxString lastFilename, lastDir;
- bool changed, aborted;
+ bool aborted;
bool lastFileFormat;
DECLARE_EVENT_TABLE()
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org