Unix Technical Forum

SVN Commit by dpage: r4744 - in trunk/pgadmin3/src: ctl include/ctl

This is a discussion on SVN Commit by dpage: r4744 - in trunk/pgadmin3/src: ctl include/ctl within the pgsql Interfaces Pgadmin Hackers forums, part of the PostgreSQL category; --> Author: dpage Date: 2005-11-16 21:57:28 +0000 (Wed, 16 Nov 2005) New Revision: 4744 Modified: trunk/pgadmin3/src/ctl/ctlSQLBox.cpp trunk/pgadmin3/src/include/ctl/ctlSQLBox.h Log: Swap between ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces Pgadmin Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 05:45 PM
svn@pgadmin.org
 
Posts: n/a
Default SVN Commit by dpage: r4744 - in trunk/pgadmin3/src: ctl include/ctl

Author: dpage
Date: 2005-11-16 21:57:28 +0000 (Wed, 16 Nov 2005)
New Revision: 4744

Modified:
trunk/pgadmin3/src/ctl/ctlSQLBox.cpp
trunk/pgadmin3/src/include/ctl/ctlSQLBox.h
Log:
Swap between Find/Replace dialogues correctly on non-windows platforms properly. Looks like we might have to live with slightly odd behaviour on Windows due to the design of wx :-(


Modified: trunk/pgadmin3/src/ctl/ctlSQLBox.cpp
================================================== =================
--- trunk/pgadmin3/src/ctl/ctlSQLBox.cpp 2005-11-12 19:28:35 UTC (rev 4743)
+++ trunk/pgadmin3/src/ctl/ctlSQLBox.cpp 2005-11-16 21:57:28 UTC (rev 4744)
@@ -295,13 +295,18 @@
ctlSQLBox::ctlSQLBox()
{
m_dlgFind=0;
+#ifndef __WXMSW__
+ findDlgLast = false;
+#endif
}


ctlSQLBox::ctlSQLBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
{
m_dlgFind=0;
-
+#ifndef __WXMSW__
+ findDlgLast = false;
+#endif
Create(parent, id, pos, size, style);
}

@@ -369,11 +374,21 @@

void ctlSQLBox::OnFind(wxCommandEvent& ev)
{
+#ifndef __WXMSW__
+ if (m_dlgFind && !findDlgLast)
+ {
+ m_dlgFind->Destroy();
+ m_dlgFind = NULL;
+ }
+#endif
+
if (!m_dlgFind)
{
m_dlgFind = new wxFindReplaceDialog(this, &m_findData, _("Find text"), 0);
-
m_dlgFind->Show(true);
+#ifndef __WXMSW__
+ findDlgLast = true;
+#endif
}
else
m_dlgFind->SetFocus();
@@ -382,11 +397,21 @@

void ctlSQLBox::OnReplace(wxCommandEvent& ev)
{
+#ifndef __WXMSW__
+ if (m_dlgFind && findDlgLast)
+ {
+ m_dlgFind->Destroy();
+ m_dlgFind = NULL;
+ }
+#endif
+
if (!m_dlgFind)
{
m_dlgFind = new wxFindReplaceDialog(this, &m_findData, _("Find text"), wxFR_REPLACEDIALOG);
-
m_dlgFind->Show(true);
+#ifndef __WXMSW__
+ findDlgLast = false;
+#endif
}
else
m_dlgFind->SetFocus();

Modified: trunk/pgadmin3/src/include/ctl/ctlSQLBox.h
================================================== =================
--- trunk/pgadmin3/src/include/ctl/ctlSQLBox.h 2005-11-12 19:28:35 UTC (rev 4743)
+++ trunk/pgadmin3/src/include/ctl/ctlSQLBox.h 2005-11-16 21:57:28 UTC (rev 4744)
@@ -29,8 +29,6 @@
~ctlSQLBox();

void Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
- wxFindReplaceData m_findData;
- wxFindReplaceDialog* m_dlgFind;

void OnKeyDown(wxKeyEvent& event);
void OnFind(wxCommandEvent& event);
@@ -39,6 +37,14 @@

DECLARE_DYNAMIC_CLASS(ctlSQLBox)
DECLARE_EVENT_TABLE()
+
+private:
+ wxFindReplaceData m_findData;
+ wxFindReplaceDialog* m_dlgFind;
+#ifndef __WXMSW__
+ bool findDlgLast;
+#endif
+
};




---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 05:45 PM
Andreas Pflug
 
Posts: n/a
Default Re: SVN Commit by dpage: r4744 - in trunk/pgadmin3/src:

svn@pgadmin.org wrote:

>Author: dpage
>Date: 2005-11-16 21:57:28 +0000 (Wed, 16 Nov 2005)
>New Revision: 4744
>
>Modified:
> trunk/pgadmin3/src/ctl/ctlSQLBox.cpp
> trunk/pgadmin3/src/include/ctl/ctlSQLBox.h
>Log:
>Swap between Find/Replace dialogues correctly on non-windows platforms properly. Looks like we might have to live with slightly odd behaviour on Windows due to the design of wx :-(
>
>


Hu, slightly odd? Isn't this crashing for you? It did for me, since
apparently there are messages stuck in the msg queue that aren't
removable even by Yield.

Regards,
Andreas


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 05:45 PM
Dave Page
 
Posts: n/a
Default Re: SVN Commit by dpage: r4744 - in




On 16/11/05 10:13 pm, "Andreas Pflug" <pgadmin@pse-consulting.de> wrote:

> svn@pgadmin.org wrote:
>
>> Author: dpage
>> Date: 2005-11-16 21:57:28 +0000 (Wed, 16 Nov 2005)
>> New Revision: 4744
>>
>> Modified:
>> trunk/pgadmin3/src/ctl/ctlSQLBox.cpp
>> trunk/pgadmin3/src/include/ctl/ctlSQLBox.h
>> Log:
>> Swap between Find/Replace dialogues correctly on non-windows platforms
>> properly. Looks like we might have to live with slightly odd behaviour on
>> Windows due to the design of wx :-(
>>
>>

>
> Hu, slightly odd? Isn't this crashing for you? It did for me, since
> apparently there are messages stuck in the msg queue that aren't
> removable even by Yield.


It shouldn't crash on Windows (can't test ATM) because the changes are all
#ifndef __WXMSW__. On Unix, wx derives the find/replace dialgue from
wxWindows so it can be easily destroyed and recreated in the other form. On
Windows that's not the case, and basically you can't fully kill off a
dialogue except by pressing a button on it :-(

Regards, Dave



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 05:45 PM
Andreas Pflug
 
Posts: n/a
Default Re: SVN Commit by dpage: r4744 - in trunk/pgadmin3/src:

Dave Page wrote:

>
>On 16/11/05 10:13 pm, "Andreas Pflug" <pgadmin@pse-consulting.de> wrote:
>
>
>
>>svn@pgadmin.org wrote:
>>
>>
>>
>>>Author: dpage
>>>Date: 2005-11-16 21:57:28 +0000 (Wed, 16 Nov 2005)
>>>New Revision: 4744
>>>
>>>Modified:
>>> trunk/pgadmin3/src/ctl/ctlSQLBox.cpp
>>> trunk/pgadmin3/src/include/ctl/ctlSQLBox.h
>>>Log:
>>>Swap between Find/Replace dialogues correctly on non-windows platforms
>>>properly. Looks like we might have to live with slightly odd behaviour on
>>>Windows due to the design of wx :-(
>>>
>>>
>>>
>>>

>>Hu, slightly odd? Isn't this crashing for you? It did for me, since
>>apparently there are messages stuck in the msg queue that aren't
>>removable even by Yield.
>>
>>

>
>It shouldn't crash on Windows (can't test ATM) because the changes are all
>#ifndef __WXMSW__.
>

'k, missed that.

Regards,
Andreas


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:50 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com