Re: GtkMenuItems and popup menus
| From: | Andrei Zmievski | Date: | Thu, 12 Jul 2001 18:11:17 +0000 |
| Subject: | Re: GtkMenuItems and popup menus | ||
| References: | 1 2 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-2147@lists.php.net to get a copy of this message | ||
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