Example #1
0
 function append($page)
 {
     $this->remove_background();
     $page->Parent = $this;
     $page->Owner = $this->Owner;
     // Icone + Rotulo
     $guide = new GtkHBox();
     if ($page->Icon) {
         $guide->pack_start(GtkImage::new_from_file(XMONEY_IMAGES . DIRECTORY_SEPARATOR . $page->Icon), false);
     }
     $guide->pack_start(new GtkLabel(' ' . $page->Title . ' '));
     // Fechar
     $guide->pack_start($close = new GtkButton());
     $close->set_image(GtkImage::new_from_stock(Gtk::STOCK_CLOSE, Gtk::ICON_SIZE_BUTTON));
     $guide->show_all();
     // Guia
     $menu_item = new GtkHBox();
     if ($page->Icon) {
         $menu_item->pack_start(GtkImage::new_from_file(XMONEY_IMAGES . DIRECTORY_SEPARATOR . $page->Icon), false);
     }
     $menu_item->pack_start(new GtkLabel(' ' . $page->Title . ' '));
     $menu_item->show_all();
     $scroll = new GtkScrolledWindow();
     $scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
     $scroll->add_with_viewport($page);
     $scroll->show_all();
     $current = $this->append_page_menu($scroll, $guide, $menu_item);
     $this->set_current_page($current);
     // Close signal
     if ($this->background) {
         $close->connect('clicked', array($this, 'xmoney_close_clicked'), $current);
     } else {
         $close->connect('clicked', array($this, 'close_button'), $current);
     }
     return $current;
 }
Example #2
0
 /**
  * Shows the scroll
  */
 function show()
 {
     parent::show_all();
     $child = parent::get_child()->get_child();
     $child->show();
 }