News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Multi-monitor dialog positioning bug [patch]

Started by 280Z28, December 15, 2005, 06:27:46 AM

Previous topic - Next topic

280Z28

Quote from: thomas on December 15, 2005, 02:10:49 PM
No objection from my side if it is an option.

What about simple message boxes? Are those consistent with the other dialogs  with your modifications?

Not sure which ones are simple. I just changed all the ones that call LoadDialog() in their constructor (since that was easy to search for).

I'll make it an option tonight and post a new patch.
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

mandrav

OK, I haven't stepped in this discussions since I don't really care about the subject :P (I work on a single monitor setup). So I 'll let you, who have dual monitor setups,  resolve this.

But, 280Z28, do *not* post patches here. They are only going to be lost/forgotten. Patches should be submitted to the patch tracker. That's what we have it for. A forum is *not* a project management tool or medium...
Be patient!
This bug will be fixed soon...

280Z28

Quote from: mandrav on December 15, 2005, 02:42:41 PM
OK, I haven't stepped in this discussions since I don't really care about the subject :P (I work on a single monitor setup). So I 'll let you, who have dual monitor setups,  resolve this.

But, 280Z28, do *not* post patches here. They are only going to be lost/forgotten. Patches should be submitted to the patch tracker. That's what we have it for. A forum is *not* a project management tool or medium...

Yeah I just saw that in another thread. I didn't realize you were using it. :)
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

280Z28

OK I'm ready to make this an option. I need to add the following function to the SDK. Where should I put it, and what class should it be a public member of? I'm thinking Manager.


static void Manager::PositionUserDialog( wxDialog* dlg )
{
    if (user wants dialogs repositioned centered on parent)
    {
        dlg->CenterOnScreen();
    }
}
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

thomas

#19
template<wxDialog* D>PlaceDialog()
{
if(Manager::Get()->GetConfigManager("app")->Exists("/environment/place_dialogs"))
    D->CentreOnScreen();
};

That way, we don't pollute Manager -- this does not belong in there.

EDIT: Don't blame me if I have a typo in there... it is late, and I am falling asleep... But you get the idea :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

280Z28

Quote from: thomas on December 16, 2005, 01:18:54 AM
template<wxDialog* D>PlaceDialog()
{
if(Manager::Get()->GetConfigManager("app")->Exists("/environment/place_dialogs"))
    D->CentreOnScreen();
};

That way, we don't pollute Manager -- this does not belong in there.

What file?

Yeah, it didn't seem to belong to any of the others though. Are you saying just put it the global namespace?
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

rickg22

Hmmm try xtra_classes.cpp - i made that for your custom classes.

Edit: I don't remember the exact name.

thomas

#22
But you'd rather put the template in the header, not the cpp

EDIT:
... and you will want to add the void which I forgot, or the compiler won't let you get away.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

280Z28

#23
Quote from: thomas on December 16, 2005, 01:23:15 AM
But you'd rather put the template in the header, not the cpp

EDIT:
... and you will want to add the void which I forgot, or the compiler won't let you get away.

Yep I was a step ahead of you there. I have this in sdk\xtra_classes.h:


template<wxDialog* D> void PositionUserDialog(bool force=false)
{
    if(force || Manager::Get()->GetConfigManager("app")->Exists("/environment/place_dialogs"))
        D->CenterOnScreen();
}
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

rickg22


280Z28

78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

280Z28

Why are there sooo manyy blank lines with just trailing spaces in env_settings.xrc?
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

280Z28

Applies cleanly to rev 1524. There are a ton of files updated, so chances of a conflict if this is outstanding for a while is high.

I did not make any changes to surrounding whitespace. I only made the required changes to fix this one bug.

The new option is on the view tab of environment settings.

Sam 8)

[attachment deleted by admin]
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

killerbot

Quote from: mandrav on December 15, 2005, 02:42:41 PM
(I work on a single monitor setup).

Dual monitor is superb during coding and debugging. That nasty gui you are debugging is always visible (you drag it on the other screen) and when you hit your breakpoint you can still see it nicely. It helped me a lot in my M$ devstudio gui projects, otherwise the IDE get's focus on the breakpoint or the code you are stepping through and you don't see the GUI window anymore since it's behind the IDE window.

And it is also very nice, to have on a second monitor a Firefox open on the CB page, forum page, so you can check from time to time for the new information.
;-)

I am kinda missing Yiannis's today's changes (well I see them in svn anyway).

Maybe we should buy Yiannis a second monitor for x-mas ...

mandrav

Quote from: 280Z28 on December 16, 2005, 04:11:08 AM
Applies cleanly to rev 1524. There are a ton of files updated, so chances of a conflict if this is outstanding for a while is high.

I did not make any changes to surrounding whitespace. I only made the required changes to fix this one bug.

The new option is on the view tab of environment settings.

Sam 8)

Just tell me Sam: how many times do I have to repeat myself about not posting patches in the forums?  :?
Be patient!
This bug will be fixed soon...