public function alert($title, $message) { $dialog = new GtkMessageDialog($this->window, 0, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, $message); $dialog->set_title($title); $dialog->run(); $dialog->destroy(); }
public function confirmDeletion() { $dialog = new GtkMessageDialog($this->window, 0, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_YES_NO, 'Are you sure?'); $dialog->set_title('Confirm Deletion'); $dialog->run() === Gtk::RESPONSE_YES && call_user_func_array($this->events[self::E_DELETE], array()); $dialog->destroy(); }