Re: [gDesklets] Control for Requesters (IInformer, IInformant, IInteraction, IRequester, ...??)



Hi there,

>> Buttons:
>> - provided as [[value, text[, path_to_icon]], ...]
> 
> I'll suggest for uniformity that you only allow stock icons:
> http://library.gnome.org/devel/gtk/2.21/gtk-Stock-Items.html
> and default to the stock text.

Yeah... I have been thinking about using the stock-icons (only) for the
buttons, too.
But I am not sure about the default stock texts. I guess I will provide
the possibility to use them but keep the freedom to put any text of your
choice in the buttons.

> Maybe it would be easier (or more uniform with gD core) to implement this
> like in utils/dialog.py.

;). I guess I'll do a lot of copy and paste here... ;).
But I want to keep it as simple as possible, so just like:
"this is the text, this the icon (if wanted) and here are the buttons".

Simple and a lot of freedom if needed (IMHO).

But I guess it will be a good idea to provide the basic requesters (like
in utils/dialog.py) for copy and paste in the develbook, like:

popup.text = "This is a simple test!"
popup.icon = ("GTK_STOCK_DIALOG_INFO")
popup.buttons = [["ok", "GTK_STOCK_OK", "GTK_STOCK_OK"], ["cancel",
"GTK_STOCK_CANCEL", "GTK_STOCK_CANCEL"]]

Hmmm... might be easier, not sure about all these "" either...
["ok", "GTK_STOCK_OK"] should be enough in this case, right ?
Anyway... we will see ;). It's just a first rough idea!

> Maybe too complicated for the average developer, but I imagine you'll have a
> good way of documenting it in the develbook (so I'm not set on you
> implementing this for the first time around) :)

I know that people will ask for icons (like in utils/dialog.py), and as
I don't want to change the Control's interface I think it will be better
to put it in right now.

And for the average developer things should (and hopefully will be)
working without the "fancy stuff" so you can easily setup a basic
reqeuster with a few line of code (see above).

> Good work, I'm looking forward to using it.

Working on it right now ;).

Sooo, here's the first impression of the interface:

-------
IPopUp:ci253lqpw7hp14s4ecwe6o1p5-2

  buttons                  w   A list of buttons [ [value1, text1[,
stock-icon1]] [, [value2, text2[, stock-icon2]], ...] ]. If 'text' is
the same as 'stock-icon' the default stock-text for this stock-icon will
be displayed.
  error                    r   Error information.
  event                    r   Get the return event of the requester
(value of the button pushed or 'None' if the requester has been
destroyed). Bindable.
  icon                     w   The main icon of the requester and its
position (path-to-icon [,('left'|'top')]). If no (valid) icon is given
no icon will be displayed. Default position is 'left'.
  status                   r   Status of the Control. Bindable.
  text                     w   The main text of the requester, supports
pango markup.
-------

Any ideas, comments etc. ?!

Greetings, Bjoern


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]