glade = new GladeXML($uiDescriptionFileName); $this->glade->signal_autoconnect_instance($this); $this->top = $this->glade->get_widget($topName); } catch (Exception $e) { echo "Glade_Windows/__construct(): " . $e->getMessage(); die(); } } /** * callback wrapper around Gtk::main_quit() for Glade */ public function quit() { Gtk::main_quit(); } /** * A utility callback for views inherited from this class: it * enables automatic alternate row colors * * @param GtkCellLayout $cell_layout * @param GtkCellRenderer $cell * @param GtkTreeModel $tree_model * @param GtkTreeIter $iter * @return void */ static public function zebraTreeViewCallback(GtkCellLayout $cell_layout, GtkCellRenderer $cell, GtkTreeModel $tree_model, GtkTreeIter $iter /* [, user_data] */) { $path = $tree_model->get_path($iter); $cell->set_property('cell-background', ($path[0] % 2) ?'#d0d0d0' : '#ffffff'); } }