Control for Requester

Registered by Bjoern Koch on 2010-05-02

As discussed on the MailingList there should be a Control which brings "requesters" to gDesklets. This way there might be a simple way to have some kind of "interaction" with the user.

This Control would provide simple requesters with one (just an info with an "OK" button), two (yes/no, OK/Cancel) or even more buttons (give the user a chance to select one out of many options) with some (hopefully explaining) text on top of it.

This could be used to e.g. :

- inform the user (like: "Connection to the Server lost" / "Ooops")
- or ask what to do (like: "Connection lost. Do you want to reconnect to the Server?" / "Yes/No")

This Control should be included into the official gDesklets branch/releases, too.

Possible names:
IInformer, IInformant, IInteraction, IRequester, ...??

Blueprint information

gDesklets Core Team
gDesklets Core Team
Needs approval
Bjoern Koch
Pending Approval
Series goal:
Accepted for 0.3x
Beta Available
Milestone target:
milestone icon release-of-0.36.4
Started by
Bjoern Koch on 2010-06-06

Related branches



IPopUp it will be ?!

Main ideas:

- provided as [[value, text[, path_to_icon]], ...]
- return "value" of the clicked button or NULL ( or None or "") if requester was destroyed

Main icon:
- optional
- can be placed left to or above the text (default: left)
- uses stock-icons only (maybe free gfx in a future version?!)

- pango support
- still to come ?! basic text alignment (left, right, centered (and maybe justified?))

So we will have two horizontal boxes (h1 - the left box for the main icon - and h2) in the top (v1) of two vertical boxes (v1 and v2). Depending on the main icon (always in h1) we can switch the boxes on and off accordingly:
- "no main icon" will hide h1 and v2 and the text will be displayed in h2
- "main icon left to the text" will hide v2 and the text will be displayed in h2
- "main icon above the text" will hide h2 and the text will be displayed in v2


Current status:


  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 (stock-icon [,('left'|'top')]). Default position is 'left'.
  status r Status of the Control. Bindable.
  text w The main text of the requester, supports pango markup.
  visible rw Visibility state of the requester. Either true (visible) or false (hidden).


Further notes:

- to avoid "changing requesters" desklets should first check the visiblity before setting up or change a (new) requester
- the buttons can only be set/changed if the requester is not visible
- changing the icon while visible shouldn't be possible, even though nice (pseudo-)animations could be done ?!
- changing the text while visible shouldn't be possible, even though this might be usefull (counters, stopclocks...)

Maybe "visible" can only be set to True, so open requesters cannot be destroyed or closed by the desklet (this might be confusing for the user)?


Requester is not destroyed when the desklet is restarted or deleted.


Work Items

This blueprint contains Public information 
Everyone can see this information.