Re: New signal for GtkNoteBook

From: Date: Sat, 22 Mar 2003 11:11:22 +0000
Subject: Re: New signal for GtkNoteBook
References: 1 2 3  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-3142@lists.php.net to get a copy of this message
Thx James, i will like to add gtk2 to php, one cquestion, is some rpoject to port php-gtk to php-gtk2?¿ to apply new widget of gtk2 .... ?¿? regards El sáb, 22-03-2003 a las 05:42, James Cameron escribió: > Epplestun wrote: > > HI, the php-gtk version don?t have select-page signal for gtknotebook, > > why?? we can apply it. > > Good question. I confirm your diagnosis. select-page is a signal > documented in 1.3 of GTK+. Yet it is not recognised by PHP-GTK > built against 1.2 of GTK+. > > I took the test/gtk.php script, and added a signal: > > $sample_notebook->connect('select-page', 'page_select'); > > ... the result was ... > > Gtk-WARNING **: gtk_signal_connect_full(): could not find signal > "select-page" in the `GtkNotebook' class ancestry > > I also tried select_page. The patch for my change to reproduce this is > attached. > > I agree that GTK+ has the signal documented, in 1.3. > > I've checked through the source of PHP-GTK and cannot find this signal > or the switch_page signal mentioned. I presume signal names are defined > in GTK+ alone, and not in PHP-GTK. > > So I checked the GTK+ source. In file gtknotebook.c of version 1.2 of > GTK+ at around line 272, the switch_page signal is defined, but none > of the other signals. > > I presume therefore that it is a signal added in GTK+ 1.3, and that you > will need to use that version to get the signal. > > Perhaps you should downgrade your GTK+ documentation to 1.2? ;-) > > Steph wrote: > > signals are inherited directly from GTK+... > > Yep, so since it isn't there, it isn't here. > > -- > James Cameron mailto:quozl@us.netrek.org > http://quozl.netrek.org/ > ---- > > *** gtk.php Fri Dec 6 22:36:12 2002 > --- gtk-notebook.php Sat Mar 22 14:03:19 2003 > *************** > *** 2320,2325 **** > --- 2320,2330 ---- > $book_closed_mask = null; > $sample_notebook = null; > > + function page_select($notebook, $page, $page_num) > + { > + echo "page_select $notebook $page $page_num\n"; > + } > + > function page_switch($notebook, $page, $page_num) > { > global $book_open, $book_open_mask, > *************** > *** 2496,2501 **** > --- 2501,2507 ---- > $sample_notebook = new GtkNotebook; > $sample_notebook->show(); > $sample_notebook->connect('switch_page', 'page_switch'); > + $sample_notebook->connect('select-page', 'page_select'); > $sample_notebook->set_tab_pos(GTK_POS_TOP); > $box1->pack_start($sample_notebook, true, true, 0); > $sample_notebook->set_border_width(10); > > ---- > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.gtk.general (#3142) next »