cvs: php-gtk-doc /examples/reference/gtk/gtkentry constructor.phpw
| From: | Christian Weiske | Date: | Sun, 06 Aug 2006 06:56:06 +0000 |
| Subject: | cvs: php-gtk-doc /examples/reference/gtk/gtkentry constructor.phpw | ||
| Groups: | php.gtk.doc | ||
| Request: | Send a blank email to php-gtk-doc+get-2748@lists.php.net to get a copy of this message | ||
cweiske Sun Aug 6 06:56:06 2006 UTC
Modified files:
/php-gtk-doc/examples/reference/gtk/gtkentry constructor.phpw
Log:
Removing windows newlines and fixing some stuff
http://cvs.php.net/viewvc.cgi/php-gtk-doc/examples/reference/gtk/gtkentry/constructor.phpw?r1=1.2&r2=1.3&diff_format=u
Index: php-gtk-doc/examples/reference/gtk/gtkentry/constructor.phpw
diff -u php-gtk-doc/examples/reference/gtk/gtkentry/constructor.phpw:1.2
php-gtk-doc/examples/reference/gtk/gtkentry/constructor.phpw:1.3
--- php-gtk-doc/examples/reference/gtk/gtkentry/constructor.phpw:1.2 Thu Mar 16 21:17:33 2006
+++ php-gtk-doc/examples/reference/gtk/gtkentry/constructor.phpw Sun Aug 6 06:56:06 2006
@@ -1,38 +1,37 @@
-<?php
-//Function to retrieve text from GtkEntry and print it
-function get_input($entry) {
- $input = $entry->get_text();
- echo "$input\r\n";
- $entry->grab_focus();
- $entry->set_text("");
-}
-
-//Setting up the Window
-// Note the usage of connect_simple()
-// instead of deprecated connect_object()
-$window = new GtkWindow();
-$window->set_position(Gtk::WIN_POS_CENTER);
-$window->connect_simple('destroy', array('Gtk', 'main_quit'));
-
-//Adding a box to the Window to allow more than one Child
-$box = new GtkVBox();
-$window->add($box);
-
-//Adding the GtkEntry widget and connecting
-// it to the callback function: get_text()
-$entry = new GtkEntry();
-$entry->connect('activate', 'get_input');
-$box->add($entry);
-
-//Adding a GtkButton to the box and use connect_simple()
-// so that it will pass the GtkEntry to the callback
-// function when it is clicked
-$button = &new GtkButton('Click Me to echo input!');
-$button->connect_simple('clicked', 'get_input', $entry);
-$box->add($button);
-
-//Display everything and start the main loop
-$box->show_all();
-$window->show_all();
-Gtk::main();
+<?php
+//Function to retrieve text from GtkEntry and print it
+function get_input($entry) {
+ $input = $entry->get_text();
+ echo "$input\r\n";
+ $entry->grab_focus();
+ $entry->set_text("");
+}
+
+//Setting up the Window
+// Note the usage of connect_simple()
+// instead of deprecated connect_object()
+$window = new GtkWindow();
+$window->set_position(Gtk::WIN_POS_CENTER);
+$window->connect_simple('destroy', array('Gtk', 'main_quit'));
+
+//Adding a box to the Window to allow more than one Child
+$box = new GtkVBox();
+$window->add($box);
+
+//Adding the GtkEntry widget and connecting
+// it to the callback function: get_text()
+$entry = new GtkEntry();
+$entry->connect('activate', 'get_input');
+$box->add($entry);
+
+//Adding a GtkButton to the box and use connect_simple()
+// so that it will pass the GtkEntry to the callback
+// function when it is clicked
+$button = new GtkButton('Click Me to echo input!');
+$button->connect_simple('clicked', 'get_input', $entry);
+$box->add($button);
+
+//Display everything and start the main loop
+$window->show_all();
+Gtk::main();
?>
\ No newline at end of file