Re: GtkMenuItems and popup menus
| From: | Rich Payne | Date: | Thu, 12 Jul 2001 18:22:01 +0000 |
| Subject: | Re: GtkMenuItems and popup menus | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-2148@lists.php.net to get a copy of this message | ||
Much better, thanks.
--rdp
On Thu, 12 Jul 2001, Andrei Zmievski wrote:
> On Thu, 12 Jul 2001, Rich Payne wrote:
> > Of course... php-4.0.7-dev and php-gtk CVS from June 25 it looks like.
> >
> > Here's code snippet:
> >
> > function construct_popup_menu() {
> > $m = &new GtkMenu();
> > $mi_move = &new GtkMenuItem( 'Move');
> > $m->add($mi_move);
> > $mi_copy = &new GtkMenuItem( 'Copy');
> > $m->add($mi_copy);
> > $mi_delete = &new GtkMenuItem( 'Delete');
> > $m->add($mi_delete);
> > $mi_sep = &new GtkMenuItem('');
> > $m->add($mi_sep);
> > $mi_reply = &new GtkMenuItem ('Reply');
> > $m->add($mi_reply);
> > $mi_reply_to_all = &new GtkMenuItem ('Reply To All');
> > $m->add($mi_reply_to_all);
> > $mi_forward = &new GtkMenuItem ('Forward');
> > $m->add($mi_forward);
> > $m->show_all();
> > return $m;
> >
> > }
> >
> > this will generate an empty menu item for the separator, I've also tried
> > an append instead of an add, that didn't seem to make a difference.
>
> I've committed a fix. Simply use &new GtkMenuItem() to create a
> separator.
>
> -Andrei
>
> "You choose to do the bad things in your life;
> the good ones come and drag you along with them."
> - Michael Marshall Smith
>
>
--
Rich Payne
rpayne@alphalinux.org www.alphalinux.org