#!/usr/bin/php -c/etc/gtk/php.ini button = new GtkButton('Click Me.'); $this->set_size_request(300,200); $this->set_title('Skip Taskbar Entry Demo'); $this->connect_simple('delete-event',array($this,'on_quit')); // disabled because without a tray icon you've just lost the // the window. :p // $this->connect('window-state-event',array($this,'on_iconify')); $this->button->connect_simple('clicked',array($this,'on_click')); $this->add($this->button); $this->show_all(); return; } public function on_quit() { $this->hide(); Gtk::main_quit(); return; } public function on_iconify($w,$e) { if(($e->new_window_state & Gdk::WINDOW_STATE_ICONIFIED)) { $this->set_skip_taskbar_hint(true); } else { $this->set_skip_taskbar_hint(false); } return; } public function on_click() { if($this->get_skip_taskbar_hint()) { $this->set_skip_taskbar_hint(false); } else { $this->set_skip_taskbar_hint(true); } } } $window = new bobWindow; Gtk::main(); $window->destroy(); unset($window); ?>