gjs r19 - trunk/examples
- From: hp svn gnome org
- To: svn-commits-list gnome org
- Subject: gjs r19 - trunk/examples
- Date: Sun, 12 Oct 2008 19:46:11 +0000 (UTC)
Author: hp
Date: Sun Oct 12 19:46:10 2008
New Revision: 19
URL: http://svn.gnome.org/viewvc/gjs?rev=19&view=rev
Log:
change function names to conform to style guide
Modified:
trunk/examples/gtk.js
Modified: trunk/examples/gtk.js
==============================================================================
--- trunk/examples/gtk.js (original)
+++ trunk/examples/gtk.js Sun Oct 12 19:46:10 2008
@@ -6,7 +6,7 @@
log("Hello World");
}
-function delete_event(widget, event) {
+function onDeleteEvent(widget, event) {
// If you return FALSE in the "delete_event" signal handler,
// GTK will emit the "destroy" signal. Returning TRUE means
// you don't want the window to be destroyed.
@@ -19,7 +19,7 @@
return false;
}
-function destroy(widget) {
+function onDestroy(widget) {
log("destroy signal occurred");
Gtk.main_quit();
}
@@ -31,14 +31,14 @@
// When the window is given the "delete_event" signal (this is given
// by the window manager, usually by the "close" option, or on the
-// titlebar), we ask it to call the delete_event () function
+// titlebar), we ask it to call the onDeleteEvent () function
// as defined above.
-win.connect("delete-event", delete_event);
+win.connect("delete-event", onDeleteEvent);
// Here we connect the "destroy" event to a signal handler.
// This event occurs when we call gtk_widget_destroy() on the window,
-// or if we return FALSE in the "delete_event" callback.
-win.connect("destroy", destroy);
+// or if we return FALSE in the "onDeleteEvent" callback.
+win.connect("destroy", onDestroy);
// Sets the border width of the window.
win.set_border_width(10)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]