Le 21/09/2010 15:56, Guillaume Lelarge a écrit :
> Hi Steffen,
>
> Le 21/09/2010 12:12, Steffen Kuhn a écrit :
>> [...]
>> today I had had the chance to check this issue on Windows 7 and everything
>> is fine.
>> As further check I removed the key HKCU\Software\pgAdmin III\frmStatus from
>> the registry of my Vista box
>> and e evoila everything is fine on Vista.
>> I've no idea where this is coming from; may be this comes from my version
>> beeing upgraded from the betas in combination with a missing
>> perspective update for this case - but I just guessing.
>>
>
> We have a setting telling the size of some component
> (FRMSTATUS_PERSPECTIVE_VER in this case). The setting depended on the
> release number you installed. One reason could be that, since the git
> migration, the release "number" is not updated. Previously, we used the
> SVN commit id, which increments automatically. Maybe I forgot to do it
> last time I changed the setting. According to GIT, it doesn't seem to be
> happening. Probably an effect of using dev releases. Can't tell you more
> right now.
>
Well, I still think there is an issue here. We used the VerFromRev()
function before when we were using svn, but its use right now make every
parameter get the name "Perspective-" instead of "Perspective-<id>".
Patch attached.
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
diff --git a/pgadmin/debugger/ctlCodeWindow.cpp b/pgadmin/debugger/ctlCodeWindow.cpp
index 805d69c..5eff39f 100644
--- a/pgadmin/debugger/ctlCodeWindow.cpp
+++ b/pgadmin/debugger/ctlCodeWindow.cpp
@@ -183,7 +183,7 @@ ctlCodeWindow::ctlCodeWindow( frmDebugger *parent, wxWindowID id, const dbgConnP
// Now (re)load the layout
wxString perspective;
- settings->Read(wxT("Debugger/frmDebugger/Perspective-") + VerFromRev(FRMDEBUGGER_PERSPECTIVE_VER), &perspective, FRMDEBUGGER_DEFAULT_PERSPECTIVE);
+ settings->Read(wxT("Debugger/frmDebugger/Perspective-") + wxString(FRMDEBUGGER_PERSPECTIVE_VER), &perspective, FRMDEBUGGER_DEFAULT_PERSPECTIVE);
m_parent->manager.LoadPerspective(perspective, true);
// And reset the captions
diff --git a/pgadmin/debugger/frmDebugger.cpp b/pgadmin/debugger/frmDebugger.cpp
index c4ac3af..9501fb5 100644
--- a/pgadmin/debugger/frmDebugger.cpp
+++ b/pgadmin/debugger/frmDebugger.cpp
@@ -89,7 +89,7 @@ frmDebugger::frmDebugger(frmMain *parent, const wxString &title)
// Now load the layout
wxString perspective;
- settings->Read(wxT("Debugger/frmDebugger/Perspective-") + VerFromRev(FRMDEBUGGER_PERSPECTIVE_VER), &perspective, FRMDEBUGGER_DEFAULT_PERSPECTIVE);
+ settings->Read(wxT("Debugger/frmDebugger/Perspective-") + wxString(FRMDEBUGGER_PERSPECTIVE_VER), &perspective, FRMDEBUGGER_DEFAULT_PERSPECTIVE);
manager.LoadPerspective(perspective, true);
// and reset the captions for the current language
@@ -109,7 +109,7 @@ frmDebugger::~frmDebugger()
// and the user hit cancel before the main form opened.
wxAuiPaneInfo& pane = manager.GetPane(wxT("sourcePane"));
if (pane.IsOk())
- settings->Write(wxT("Debugger/frmDebugger/Perspective-") + VerFromRev(FRMDEBUGGER_PERSPECTIVE_VER), manager.SavePerspective());
+ settings->Write(wxT("Debugger/frmDebugger/Perspective-") + wxString(FRMDEBUGGER_PERSPECTIVE_VER), manager.SavePerspective());
manager.UnInit();
diff --git a/pgadmin/frm/frmEditGrid.cpp b/pgadmin/frm/frmEditGrid.cpp
index d5de61d..059d2ed 100644
--- a/pgadmin/frm/frmEditGrid.cpp
+++ b/pgadmin/frm/frmEditGrid.cpp
@@ -234,7 +234,7 @@ frmEditGrid::frmEditGrid(frmMain *form, const wxString& _title, pgConn *_conn, p
// Now load the layout
wxString perspective;
- settings->Read(wxT("frmEditGrid/Perspective-") + VerFromRev(FRMEDITGRID_PERSPECTIVE_VER), &perspective, FRMEDITGRID_DEFAULT_PERSPECTIVE);
+ settings->Read(wxT("frmEditGrid/Perspective-") + wxString(FRMEDITGRID_PERSPECTIVE_VER), &perspective, FRMEDITGRID_DEFAULT_PERSPECTIVE);
manager.LoadPerspective(perspective, true);
// and reset the captions for the current language
@@ -1416,7 +1416,7 @@ frmEditGrid::~frmEditGrid()
mainForm->RemoveFrame(this);
- settings->Write(wxT("frmEditGrid/Perspective-") + VerFromRev(FRMEDITGRID_PERSPECTIVE_VER), manager.SavePerspective());
+ settings->Write(wxT("frmEditGrid/Perspective-") + wxString(FRMEDITGRID_PERSPECTIVE_VER), manager.SavePerspective());
manager.UnInit();
if (connection)
diff --git a/pgadmin/frm/frmMain.cpp b/pgadmin/frm/frmMain.cpp
index 1c8f935..694c04f 100644
--- a/pgadmin/frm/frmMain.cpp
+++ b/pgadmin/frm/frmMain.cpp
@@ -188,7 +188,7 @@ frmMain::frmMain(const wxString& title)
// Now load the layout
wxString perspective;
- settings->Read(wxT("frmMain/Perspective-") + VerFromRev(FRMMAIN_PERSPECTIVE_VER), &perspective, FRMMAIN_DEFAULT_PERSPECTIVE);
+ settings->Read(wxT("frmMain/Perspective-") + wxString(FRMMAIN_PERSPECTIVE_VER), &perspective, FRMMAIN_DEFAULT_PERSPECTIVE);
manager.LoadPerspective(perspective, true);
// and reset the captions for the current language
@@ -221,7 +221,7 @@ frmMain::~frmMain()
{
StoreServers();
- settings->Write(wxT("frmMain/Perspective-") + VerFromRev(FRMMAIN_PERSPECTIVE_VER), manager.SavePerspective());
+ settings->Write(wxT("frmMain/Perspective-") + wxString(FRMMAIN_PERSPECTIVE_VER), manager.SavePerspective());
manager.UnInit();
// Clear the treeview
diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cpp
index f190c0f..ef2fb69 100644
--- a/pgadmin/frm/frmQuery.cpp
+++ b/pgadmin/frm/frmQuery.cpp
@@ -508,7 +508,7 @@ pgsTimer(new pgScriptTimer(this))
// Now load the layout
wxString perspective;
- settings->Read(wxT("frmQuery/Perspective-") + VerFromRev(FRMQUERY_PERSPECTIVE_VER), &perspective, FRMQUERY_DEFAULT_PERSPECTIVE);
+ settings->Read(wxT("frmQuery/Perspective-") + wxString(FRMQUERY_PERSPECTIVE_VER), &perspective, FRMQUERY_DEFAULT_PERSPECTIVE);
manager.LoadPerspective(perspective, true);
// and reset the captions for the current language
@@ -610,7 +610,7 @@ frmQuery::~frmQuery()
closing = true;
// Save frmQuery Perspective
- settings->Write(wxT("frmQuery/Perspective-") + VerFromRev(FRMQUERY_PERSPECTIVE_VER), manager.SavePerspective());
+ settings->Write(wxT("frmQuery/Perspective-") + wxString(FRMQUERY_PERSPECTIVE_VER), manager.SavePerspective());
// Uninitialize wxAUIManager
manager.UnInit();
diff --git a/pgadmin/frm/frmStatus.cpp b/pgadmin/frm/frmStatus.cpp
index f4dcfa1..3e0a2cc 100644
--- a/pgadmin/frm/frmStatus.cpp
+++ b/pgadmin/frm/frmStatus.cpp
@@ -307,7 +307,7 @@ frmStatus::frmStatus(frmMain *form, const wxString& _title, pgConn *conn) : pgFr
// Now load the layout
wxString perspective;
- settings->Read(wxT("frmStatus/Perspective-") + VerFromRev(FRMSTATUS_PERSPECTIVE_VER), &perspective, FRMSTATUS_DEFAULT_PERSPECTIVE);
+ settings->Read(wxT("frmStatus/Perspective-") + wxString(FRMSTATUS_PERSPECTIVE_VER), &perspective, FRMSTATUS_DEFAULT_PERSPECTIVE);
manager.LoadPerspective(perspective, true);
// Reset the captions for the current language
@@ -355,7 +355,7 @@ frmStatus::~frmStatus()
mainForm->RemoveFrame(this);
// Save the window's position
- settings->Write(wxT("frmStatus/Perspective-") + VerFromRev(FRMSTATUS_PERSPECTIVE_VER), manager.SavePerspective());
+ settings->Write(wxT("frmStatus/Perspective-") + wxString(FRMSTATUS_PERSPECTIVE_VER), manager.SavePerspective());
manager.UnInit();
SavePosition();
diff --git a/pgadmin/include/utils/misc.h b/pgadmin/include/utils/misc.h
index 0e93acb..3570d21 100644
--- a/pgadmin/include/utils/misc.h
+++ b/pgadmin/include/utils/misc.h
@@ -189,8 +189,6 @@ int ExecProcess(const wxString &command, wxArrayString &result);
wxString GetHtmlEntity(const wxChar ch);
wxString HtmlEntities(const wxString &str);
-wxString VerFromRev(const wxString &rev);
-
wxString firstLineOnly(const wxString &str);
bool pgAppMinimumVersion(const wxString &cmd, const int majorVer, const int minorVer);
diff --git a/pgadmin/utils/misc.cpp b/pgadmin/utils/misc.cpp
index e5650e5..1b59a83 100644
--- a/pgadmin/utils/misc.cpp
+++ b/pgadmin/utils/misc.cpp
@@ -1131,13 +1131,6 @@ extern "C" long _ftol2( double dblSource ) { return _ftol( dblSource ); }
#endif
#endif
-wxString VerFromRev(const wxString &rev)
-{
- wxString ret = rev.AfterFirst(' ');
- ret = ret.BeforeFirst(' ');
- return ret;
-}
-
wxString firstLineOnly(const wxString &str)
{
wxString ip, tmp;
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers