Re: idea: widget alert

On Mon, Jun 20, 2005 at 09:27:32AM +1000, Timothy Stebbing wrote:
> Ben Johnson wrote:
> >On Mon, Jun 20, 2005 at 12:49:00AM +1000, Timothy Stebbing wrote:
> >...
> > 
> >
> >>widgets for 'alerting' the user to the widget. This would make the widget
> >>blink/glow/throb/sparkle, depending on the gtk theme engine in use.
> >>
> >>The primary use for this would be to notify the user about some change in
> >>the state of the application, for instance a 'wizard' could call alert()
> >>on the 'next' button once all fields on the page have been filled in. I
> >>can see this being used for things like the pager, when an app changes
> >>urgency, or in applets to alert new mail recieved, etc.
> >>
> >>Perhaps alert could take a level of urgency, form 0 to 2, that the theme
> >>could use to alter its alert affect.As all widgets are rectangular, the
> >>call would pass the widget dimentions to the theme engine.
> >>   
> >>
> >
> >I've been thinking about doing something like this myself.  I have
> >experimented a little with some success.  my trial implementation is
> >both cheesy and limited though, so I won't bother sharing it.
> >
> >my future plan is to create a new object to implement this.  the way it
> >works:
> >- instanciate a new object of this kind
> >- add any number of widget objects, one at a time, to the "blink it" list
> >- set the blink type (there can be a variety)
> > - set the on-off blink duration
> > - set the blink colors
> > - set the number of blinks that occur when an alert happens
> >
> >once you have a set of widgets in the object you can initiate the alert
> >by calling some function in the "GtkBlinkIt" object.  The blinking can
> >be made to stop prematurely through signals.  I think the actual
> >blinking should be implemented by changing the color of the widgets.
> >
> >The only reason I haven't already done this is I haven't had enough time
> >and the GtkMessageDialog serves more or less the same purpose.
> >
> >- Ben
> >
> >_______________________________________________
> >gtk-list mailing list
> >gtk-list gnome org
> >
> > 
> >
> Sounds good, although I guess my idea with passing the task of display 
> onto the theme engine was that the app setting the blink colours might 
> clash with the users theme, imagine you decide to blink pink, but your 
> user has a pumpkin-orange theme. Also it might not be rendered as a 
> 'blink' effect by the theme engine, with glx it might be a 
> partical-generator or a gradual 'throb' from one colour to the next.. no 
> need to limit the imagination of the theme creator.
> - tjs

I don't know anything about theme engines, or even themes.  the default
theme works for me so I haven't messed with it.  I'm guessing though
that something implemented at the theme level would need to affect all
the widgets that are "painted" by the theme, so it would be hard to draw
attention to only one window or to only one set of buttons, etc..  Is
that right?

For the object I have in mind...  I'm thinking some 'blink types'
implemented would be blinking between two different 'modes' that are
already controlled by the theme, such as 'focused' and 'unfocused'.
When a blink event starts the colors in use would be read and saved,
then used to flip between in order to draw attention.

It would be nice to have direct support for this in themes so that the
blink colors could be controlled by the theme designer.  I wouldn't
count on this feature getting added to the library though.

- Ben

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