Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Debugger branch: Placement of Windows

<< < (5/12) > >>

ollydbg:

--- Quote from: oBFusCATed on January 19, 2012, 10:19:23 am ---Can you change the PlaceWindow line, where ShowModal is called (it is in main.cpp) and remove your PlaceWindow from the constructor?

--- End quote ---
Ok, I just test it like:

--- Code: ---void MainFrame::OnSettingsDebugger(wxCommandEvent& /*event*/)
{
    DebuggerSettingsDlg dlg(this);
    PlaceWindow(&dlg,pdlCentre,true);  //change here
    if (dlg.ShowModal() == wxID_OK)
    {
        CodeBlocksEvent event(cbEVT_SETTINGS_CHANGED);
        event.SetInt(cbSettingsType::Debugger);
        Manager::Get()->ProcessEvent(event);
    }
}
--- End code ---

Works fine too.

PS: PlaceWindow(&dlg,pdlCentre,true) does not consider the parent window position, it always set window pos based on the screen.

ollydbg:
Any news about this issue?

MortenMacFly:

--- Quote from: ollydbg on January 27, 2012, 07:01:37 am ---Any news about this issue?

--- End quote ---
The code from your previous post in this thread looks good to me. I guess it will be applied with the next commit of oBFusCATed.
Edit: BTW: Shouldn't this be the same with the compiler settings dialog then, too?

oBFusCATed:
I have no intention to fix this, because I don't see the problem on linux, so I can't test it.

And yes, both dialogs should behave the same.

ollydbg:
RFA:
Is this patch OK?

--- Code: ---Index: E:/code/cb/cb_debugger_branch/src/src/main.cpp
===================================================================
--- E:/code/cb/cb_debugger_branch/src/src/main.cpp (revision 7791)
+++ E:/code/cb/cb_debugger_branch/src/src/main.cpp (working copy)
@@ -4403,7 +4403,7 @@
     bool needRestart = false;
 
     EnvironmentSettingsDlg dlg(this, m_LayoutManager.GetArtProvider());
-    PlaceWindow(&dlg);
+    PlaceWindow(&dlg,pdlCentre,true);
     if (dlg.ShowModal() == wxID_OK)
     {
         DoUpdateEditorStyle();
@@ -4431,7 +4431,7 @@
 void MainFrame::OnSettingsCompiler(wxCommandEvent& /*event*/)
 {
     CompilerSettingsDlg dlg(this);
-    PlaceWindow(&dlg);
+    PlaceWindow(&dlg,pdlCentre,true);
     if (dlg.ShowModal() == wxID_OK)
     {
         CodeBlocksEvent event(cbEVT_SETTINGS_CHANGED);
@@ -4443,7 +4443,7 @@
 void MainFrame::OnSettingsDebugger(wxCommandEvent& /*event*/)
 {
     DebuggerSettingsDlg dlg(this);
-    PlaceWindow(&dlg);
+    PlaceWindow(&dlg,pdlCentre,true);
     if (dlg.ShowModal() == wxID_OK)
     {
         CodeBlocksEvent event(cbEVT_SETTINGS_CHANGED);

--- End code ---

I change three places, compiler/debugger/environment dialog setting placement.

EDIT

I see the code in trunk code:

--- Code: ---void MainFrame::OnSettingsCompilerDebugger(wxCommandEvent& /*event*/)
{
    CompilerSettingsDlg dlg(this);
    PlaceWindow(&dlg);
    dlg.ShowModal();
}

--- End code ---

But the compilerdebugger dialog shows correctly. I'm not sure why this does not works under debugger_branch.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version