Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Milan Babuskov-5
Michael,

[hidden email] wrote:
> Revision: 849
> Author:   mghie
> Date:     2006-02-19 07:38:44 -0800 (Sun, 19 Feb 2006)
> ViewCVS:  http://svn.sourceforge.net/flamerobin/?rev=849&view=rev
>
> Log Message:
> -----------
> + New dialog for creation of new index replaces four small dialogs appearing after another (work in progress, not yet in flamerobin.bkl)

Before going further with this one, is there any chance you could take a
look at AdvancedMessageDialog's sizers and layout?

It does work on Linux and Windows, but I'd like to know that it is "done
right" and looks ok on Mac before we go into 0.6 release (which should
be very soon).

Thanks,

--
Milan Babuskov
http://njam.sourceforge.net
http://www.flamerobin.org



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Michael Hieke-2
Milan,

Milan Babuskov wrote:

>> Log Message:
>> -----------
>> + New dialog for creation of new index replaces four small dialogs
>> appearing after another (work in progress, not yet in flamerobin.bkl)
>
> Before going further with this one,

it's finished, actually, I only need to check that it compiles without
PCH before I activate it.

> is there any chance you could take a look at AdvancedMessageDialog's
> sizers and layout?
>
> It does work on Linux and Windows, but I'd like to know that it is
> "done right" and looks ok on Mac before we go into 0.6 release (which
> should be very soon).

Good call, I actually started creating this dialog after I noticed that
two calls to AdvancedMessageBox() where in index creation code ;-)

I did look into the AdvancedMessageDialog, but have to say that there is
both a problem with the API (solvable), and a problem on Mac OS X with
the design (don't know about that one).  For the latter see the attached
screenshot, I don't think that using a text control is appropriate on
the Mac.  Maybe I need to create a different class for wxMAC.

But the design problem is with the buttons.  To create the buttons with
the correct size, position and order we should use
styleguide().createButtonSizer(), and we should probably limit the
possible combinations of buttons.  The current parameter passed to
AnvancedMessageDialog() allows for OK, Cancel, Yes and No buttons at the
same time - not a good thing.

We probably need only these combinations (not necessarily with the same
captions, though):
- OK
- OK + Cancel
- Yes + No
- Yes + No + Cancel
How can we modify the API to allow for these, and for these only?

Thanks

--
Michael Hieke


AdvancedMsgBox Mac OS X.png (23K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Nando Dessena
Michael,

MH> But the design problem is with the buttons.  To create the buttons with
MH> the correct size, position and order we should use
MH> styleguide().createButtonSizer(), and we should probably limit the
MH> possible combinations of buttons.  The current parameter passed to
MH> AnvancedMessageDialog() allows for OK, Cancel, Yes and No buttons at the
MH> same time - not a good thing.

MH> We probably need only these combinations (not necessarily with the same
MH> captions, though):
MH> - OK
MH> - OK + Cancel
MH> - Yes + No
MH> - Yes + No + Cancel
MH> How can we modify the API to allow for these, and for these only?

I don't have the sources at hand, but I suppose there is some kind of
argument (or set of arguments) that specify which buttons to display.
I suggest we substitute it with an argument of a class type that
define the button set. Then we define derived classes for each set we
need; these will have constructors that allow to override the default
captions.

This would be extensible because we might add new derived classes in
the future, and because we will be able to extend the API without
modifying it (the beloved open/closed principle).

It would also be as easy to use as an enum.

It needs to be decided whether these ButtonSet classes only describe
the GUI or implement it (calling styleguide().createButtonSizer() and
creating the buttons themselves). I think this is a matter of
implementation convenience.

Ciao
--
Nando Dessena
http://www.flamerobin.org




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Michael Hieke-2
Nando,

Nando Dessena wrote:

> I don't have the sources at hand, but I suppose there is some kind of
> argument (or set of arguments) that specify which buttons to
> display. I suggest we substitute it with an argument of a class type
> that define the button set. Then we define derived classes for each
> set we need; these will have constructors that allow to override the
> default captions.
>
> This would be extensible because we might add new derived classes in
> the future, and because we will be able to extend the API without
> modifying it (the beloved open/closed principle).
>
> It would also be as easy to use as an enum.

sorry, but I'm afraid I don't really understand.

We use the method

   AdvancedMessageDialogButtons::add(int id, const wxString& s)

in code using AdvancedMessageBox(), like so:

   AdvancedMessageDialogButtons btns;
   btns.add(wxOK, _("E&xit"));
   btns.add(wxCANCEL, _("&Cancel"));
   if (event.CanVeto() && wxCANCEL ==
     AdvancedMessageBox(_("Are you sure you wish to exit?"),
     wxT("FlameRobin"), wxICON_QUESTION, &btns, 0,
     wxT("DIALOG_ConfirmQuit")))
   {
     event.Veto();
     return;
   }

How do you propose this should be rewritten?  Something like

   AdvancedMessageBox(_("Are you sure you wish to exit?"),
     wxT("FlameRobin"), wxICON_QUESTION,
     AdvancedMessageBoxOkCancel(_("E&xit"), _("&Cancel")),
     0, wxT("DIALOG_ConfirmQuit")

or am I way off here?

> It needs to be decided whether these ButtonSet classes only describe
> the GUI or implement it (calling styleguide().createButtonSizer() and
> creating the buttons themselves). I think this is a matter of
> implementation convenience.

styleguide().createButtonSizer() should only place them, buttons will be
created in AdvancedMessageDialog::createControls().  The interesting
part is how information about needed buttons is transfered from calling
code to AdvancedMessageDialog, via the AdvancedMessageBox() call.

Thanks

--
Michael Hieke



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Nando Dessena
Michael,

MH> sorry, but I'm afraid I don't really understand.

it looks like you understood pretty well, actually. ;-)

MH> We use the method

MH>    AdvancedMessageDialogButtons::add(int id, const wxString& s)

MH> in code using AdvancedMessageBox(), like so:

MH>    AdvancedMessageDialogButtons btns;
MH>    btns.add(wxOK, _("E&xit"));
MH>    btns.add(wxCANCEL, _("&Cancel"));
MH>    if (event.CanVeto() && wxCANCEL ==
MH>      AdvancedMessageBox(_("Are you sure you wish to exit?"),
MH>      wxT("FlameRobin"), wxICON_QUESTION, &btns, 0,
MH>      wxT("DIALOG_ConfirmQuit")))
MH>    {
MH>      event.Veto();
MH>      return;
MH>    }

MH> How do you propose this should be rewritten?  Something like

MH>    AdvancedMessageBox(_("Are you sure you wish to exit?"),
MH>      wxT("FlameRobin"), wxICON_QUESTION,
MH>      AdvancedMessageBoxOkCancel(_("E&xit"), _("&Cancel")),
MH>      0, wxT("DIALOG_ConfirmQuit")

thanks for the recap. Yes, AdvancedMessageDialogButtons looks like the
class I have been thinking about, but without a public add() method
and with a set of predefined derived classes. The call to
AdvancedMessageBox would then be as you imagined.

MH> styleguide().createButtonSizer() should only place them, buttons will be
MH> created in AdvancedMessageDialog::createControls().  The interesting
MH> part is how information about needed buttons is transfered from calling
MH> code to AdvancedMessageDialog, via the AdvancedMessageBox() call.

The instance of AdvancedMessageDialogButtons that is passed to the
function will expose information about how many buttons it represents,
in which order and with which captions.

Ciao
--
Nando Dessena
http://www.flamerobin.org




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Michael Hieke-2
In reply to this post by Michael Hieke-2
Milan,

> Well, I'm not quite sure what would be correct way of doing it, but
> I'd like to have 2 or 3 "yes" options available to the user:
>
> Create Index?
>
> a) Yes, create descending
> b) Yes, create ascending
> c) No, don't create

the need for that is gone now.

> What I really wanted is that you can provide arbitrary ID to the
> button, which would be returned.

IMHO this would mostly make for a not very user-friendly UI.  But we can
always add code to achieve this, should the need arise.  For the time
being I think something similar to Nandos proposal would be better.

> I'm reading this via webmail, so I didn't see the screenshot. I'll
> check it out this evening when I get home.

There's two issues, one the terrible layout (which can be improved on
using the styleguide class), the other the text control having the focus
ring and a different background color.  I have no idea about that one :-(

Thanks

--
Michael Hieke



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Milan Babuskov-5
Michael Hieke wrote:

>> Well, I'm not quite sure what would be correct way of doing it, but
>> I'd like to have 2 or 3 "yes" options available to the user:
>>
>> Create Index?
>>
>> a) Yes, create descending
>> b) Yes, create ascending
>> c) No, don't create
>
> the need for that is gone now.

It was just an example.

>> What I really wanted is that you can provide arbitrary ID to the
>> button, which would be returned.
>
> IMHO this would mostly make for a not very user-friendly UI.  But we can
> always add code to achieve this, should the need arise.

You're probably right.

>  For the time
> being I think something similar to Nandos proposal would be better.

I'm quite fine with Nando's proposal. Shall I code it, or you're taking
this stuff in your hands now?

>> I'm reading this via webmail, so I didn't see the screenshot. I'll
>> check it out this evening when I get home.
>
> There's two issues, one the terrible layout (which can be improved on
> using the styleguide class), the other the text control having the focus
> ring and a different background color.  I have no idea about that one :-(

I see it now. Obviously, wxNO_BORDER doesn't work here. Perhaps we could
use wxStaticText on Mac - if it allows copy/paste? Other options might
include wxHTML or wxStyledTextCtrl, but both seem too much for such a
simple task.


--
Milan Babuskov
http://njam.sourceforge.net
http://www.flamerobin.org



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Michael Hieke
Milan,

Milan Babuskov wrote:

> It was just an example.

Yes, of course.

> I'm quite fine with Nando's proposal. Shall I code it, or you're
> taking this stuff in your hands now?

I think I'll do it, together with the introduction of styleguide stuff.

> I see it now. Obviously, wxNO_BORDER doesn't work here. Perhaps we
> could use wxStaticText on Mac - if it allows copy/paste?

No, I don't think so :-(

> Other options might include wxHTML or wxStyledTextCtrl, but both seem
> too much for such a simple task.

Indeed, and also more problematic with regard to font properties,
supported charset and so on.  And wxHTML contents would be much harder
to setup.  No, I think we should leave it as-is for now.

BTW: At least for some things (like "Do you want to save XXX?"
questions) the optimal solution would be a special kind of dialog that
isn't yet supported in wxMac AFAICS - a captionless panel that slides
out of the caption bar of the parent frame, and is attached to it.  Hard
to describe, and unlike anything available in other toolkits.  Maybe MS
will "innovate" it for Vista...

Thanks

--
Michael Hieke



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Michael Hieke
Hi,

I know that I wrote:

>> I'm quite fine with Nando's proposal. Shall I code it, or you're
>> taking this stuff in your hands now?
>
> I think I'll do it, together with the introduction of styleguide
> stuff.

but I have to admit that I have now three times started to rewrite it,
only to give up sooner or later.  Today I have built FR on Slackware,
and guess what, the text control there had a border and white background
too, same as on Mac OS X.  Add to that the blinking caret we get on all
platforms, and I have to say the dialogs sheer ugliness makes me cringe.
  Is the benefit of copying message text to the clipboard really worth
all that hassle?

What message text would the user want to copy to the clipboard, anyway?
  For backtrace info there is a special crash report dialog in wx, with
all the bells and whistles.

Thanks

--
Michael Hieke



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Milan Babuskov-5
Michael Hieke wrote:
> but I have to admit that I have now three times started to rewrite it,
> only to give up sooner or later.  Today I have built FR on Slackware,
> and guess what, the text control there had a border and white background
> too, same as on Mac OS X.

:(

I don't see it, but I guess it's gtk setting (or whatever WM you're
using). I have turned off KDE's messing with GTK apps on my computer.

> Add to that the blinking caret we get on all
> platforms, and I have to say the dialogs sheer ugliness makes me cringe.

It doesn't blink for me, but it really is ugly.

>  Is the benefit of copying message text to the clipboard really worth
> all that hassle?

You'll have to ask Nando for this one, because I don't really need it.
Since I moved to new company, I use Linux almost exclusively, i.e. I
don't use FR on Windows. And copying works on Linux, since Gtk's native
message box provides it.

Perhaps we should just go with native behavior, and those who don't like
it can switch to Linux ;) Just joking. <g>

Or, since we're going to use wxStaticText, we could provide a popup menu
for it (only on MSW) that would have a single "Copy to clipboard" item.
So, if you really want to copy, right-click and do it. Thoughts?

--
Milan Babuskov
http://njam.sourceforge.net
http://www.flamerobin.org



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Nando Dessena
In reply to this post by Michael Hieke
Michael,

M> Is the benefit of copying message text to the clipboard really worth
M> all that hassle?

definately not - just ditch it.

M> For backtrace info there is a special crash report dialog in wx, with
M> all the bells and whistles.

Sounds interesting. How do we activate it?

Ciao
--
Nando Dessena




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Flamerobin-checkins] SF.net SVN: flamerobin: [849] trunk/flamerobin/src/gui

Michael Hieke
Nando,

Nando Dessena wrote:

> M> For backtrace info there is a special crash report dialog in wx,
> with M> all the bells and whistles.
>
> Sounds interesting. How do we activate it?

have a look at the debugrpt sample, it shows it.  Unfortunately there is
no project file for MSVC, but maybe the makefile.vc works.

Thanks

--
Michael Hieke



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel