Ejemplo n.º 1
0
 /**
  * Append an item to the menu
  */
 public function append($item, $submenu)
 {
     $button = new GtkToggleButton();
     $button->set_label($item->getLabel());
     $handler = $button->connect('clicked', array($this, 'onExecute'), $item, $submenu);
     $button->set_data('handler', $handler);
     $this->pack_start($button, FALSE, FALSE);
 }
Ejemplo n.º 2
0
 /**
  * Append an item to the menu
  */
 public function append($item, $submenu)
 {
     $button = new GtkToggleButton();
     if (OS == 'WIN') {
         $hbox = new GtkHBox();
         $hbox->set_border_width(4);
         $hbox->pack_start(new GtkLabel($item->getLabel()));
         $button->add($hbox);
     } else {
         $button->set_label($item->getLabel());
     }
     $handler = $button->connect('clicked', array($this, 'onExecute'), $item, $submenu);
     $button->set_data('handler', $handler);
     $this->pack_start($button, FALSE, FALSE);
 }