Mailinglist Archive: yast-devel (191 mails)

< Previous Next >
Re: [yast-devel] Dialogs integration
  • From: Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 11 Mar 2008 19:22:53 +0000
  • Message-id: <1205263373.4361.33.camel@xxxxxxxxxxxx>
Ter, 2008-03-11 às 09:38 +0100, Martin Vidner escreveu:
On Tue, Mar 11, 2008 at 01:38:24AM +0000, Ricardo Cruz wrote:

This has been discussed a few times before, with regard to the buttons
order; having a specialized API for dialogs. There is one more good
reason to it: accessibility software. It seems like Orca has some
functionality for message dialogs:

What is Orca? I am afraid that the YaST team knows almost nothing
about accessibility. Please educate us.

I don't know much about it myself; it seems like it reads labels and
stuff. I guess whats informative is how the accessibility library works:
you describe the various UI elements and then through introspection,
accessibility software makes sense out of it.
In this case, we can't indicate whether a dialog is a message dialog or
not, and whats the heading label and stuff.

Maybe we could go with something like this:

`MessageDialog (
`ButtonsBox ("Ok", "Cancel", ...)

We have something like this in Popup.ycp already. So what is new

Great. Then we just need to port it to libyui, to make it possible for
the specific UIs to implement it -- or a fallback to be used.

I guess it could look like:
void openMessageDialog (enum type, string header, string text, Widget *,
ButtonsBox *)

I think it makes sense to have this ButtonsBox, derived from HBox, so
that we can re-use it elsewhere. I'm not sure if allowing for a Widget
is really that useful; in case we don't use it, we could just hang
there, instead of using the usual event model.

With regard to the ButtonsBox, maybe:
Widget* ButtonsBox::add (const char *label, Type action)
Widget* ButtonsBox::addOkCancel(), ...
or enum { Ok, Cancel, .. }; Widget* ButtonsBox::addStock(enum)

I'm not sure how widgets are identified in libyui, I guess by their
address. Regardless, it should reflect that.
Of course, the ycp bridge could treat it differently, and detect labels
like Ok if that avoids the need to re-write things.


To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >