Re: GtkStatusBar

From: Date: Fri, 16 Mar 2001 15:33:00 +0000
Subject: Re: GtkStatusBar
References: 1 2  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-956@lists.php.net to get a copy of this message
On Fri, Mar 16, 2001 at 09:27:06AM -0600, Andrei Zmievski wrote: > Here's the answer I got from GTK+ list: > > If you use 2 different types of messages, error + status, > you can find out which ones where error messages, which > ones status messages, and implement for example abutton, > that clears all status messages, but leaves the error messages alone. aah, so a single status bar can have multiple contexts (thought I may have been missing something) ? barry > > On Fri, 16 Mar 2001, Barry Mitchelson wrote: > > hello all, > > > > I've been playing round with GtkStatusBar and was pondering the following : > > > > > > to push and pop from the status bar you need to do the following : > > > > $statusbar = &new GtkStatusBar(); > > $contextid = $statusbar->get_context_id("status"); > > > > $statusbar->push($contextid,"foo"); > > > > $statusbar->pop($contextid); > > > > now, if i'm correct in thinking that the contextid is only for the status bar object > > you create, then there is no need to specify the contextid when push and popping, and > > for that matter removing. The statusbar functions would be easier to use if the contextid > > was stored internally in the GtkStatusBar object. > > > > I wrote a class extension to try this : > > > > class GtkStatusBarEx extends GtkStatusBar > > { > > function GtkStatusBarEx () > > { > > GtkStatusBar::GtkStatusBar(); > > $this->m_contextid = > > $this->get_context_id("status"); > > } > > > > > > function push ($text) > > { > > return GtkStatusBar::push($this->m_contextid,$text); > > } > > > > function pop () > > { > > GtkStatusBar::pop($this->m_contextid); > > } > > > > function remove ($msgid) > > { > > GtkStatusBar::remove($this->m_contextid,$msgid); > > } > > > > }; > > > > so the above code would now read : > > > > $statusbar = &new GtkStatusBarEx(); > > > > $statusbar->push("foo"); > > > > $statusbar->pop(); > > > > > > this works fine, and I have used it in my own code. > > > > What would be the chances of incorporating this into the standard GtkStatusBar class ? > > > > barry > > > > -- > > http://www.theshining.org > > > > -- > > PHP GTK Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net > > For additional commands, e-mail: php-gtk-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > -Andrei > * I wish life had an UNDO function. * > > -- > PHP GTK Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net > For additional commands, e-mail: php-gtk-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- http://www.theshining.org

« previous php.gtk (#956) next »