[seed] Update changelog



commit 714b6f888c3d723bbe354a367deedb728318bc7c
Author: Robert Carr <racarr svn gnome org>
Date:   Wed Apr 29 01:49:04 2009 -0400

    Update changelog
---
 ChangeLog                   |   20 +++++++
 examples/twitter/twitter.js |  130 ++++++++++++++++++++----------------------
 modules/os/os.c             |    3 +-
 3 files changed, 84 insertions(+), 69 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 27adbd4..2757d57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+== Seed 0.5.5, Beatles for Sale ==
+* Significant build fixes and cleanups. Should build on more distros
+  with weird libffis now.
+* Depend on GObject-introspection from GIT.
+* Some API additions.
+* Reimplement Seed.import_namespace in terms of the new imports system,
+  will be entirely deprecated for 0.6.
+* Improve memory management in signals and closures.
+* Rewrite the GType subclassing to avoid using FFI, 
+  saves memory and improves performance.
+* GType "init" now means "constructor" and not "instance init".
+* Signal installation, is now handled by an array on the type definition
+  rather than in class_init (which was clunky and C-like).
+* Lots of new documentation, including a documentation index, a description
+  of the mapping from C to JavaScript, an example index, and updates to
+  the rest of the documentation.
+* Significant cleanup of all of the examples, a lot of them had bit
+  rotted a bit, being written months ago.
+	
+ 
 == Seed 0.5, Transformer (2009.02.xx) ==
 
 * Many, many crash fixes.
diff --git a/examples/twitter/twitter.js b/examples/twitter/twitter.js
index b5fc29f..0d5f060 100755
--- a/examples/twitter/twitter.js
+++ b/examples/twitter/twitter.js
@@ -22,62 +22,58 @@ window.signal.hide.connect(Gtk.main_quit);
 
 // Modify the default style so that TextView widgets look like labels
 Gtk.rc_parse_string(
-	'style "tv" {base[NORMAL] = @bg_color} widget_class "*GtkTextView" style "tv"');
-
-function put_pixbuf(container, uri)
-{
-	var file = Gio.file_new_for_uri(uri);
-	file.read_async(0, null, function(source, result)
-					{
-						var loader = new GdkPixbuf.PixbufLoader();
-						var stream = source.read_finish(result);
-						var dstream = new Gio.DataInputStream.c_new(stream);
-
-						try
-						{
-							while (1)
-							{
-								loader.write([dstream.read_byte()], 1);
-							}
-						}
-						catch (e)
-						{
-							Seed.print(e.name + " " + e.message);
-						}
-						container.pack_end(
-							new Gtk.Image.from_pixbuf(loader.get_pixbuf()));
-						container.show_all();
-					});
+    'style "tv" {base[NORMAL] = @bg_color} widget_class "*GtkTextView" style "tv"');
+
+function put_pixbuf(container, uri){
+    var file = Gio.file_new_for_uri(uri);
+    file.read_async(0, null, 
+		    function(source, result){
+			var loader = new GdkPixbuf.PixbufLoader();
+			var stream = source.read_finish(result);
+			var dstream = new Gio.DataInputStream.c_new(stream);
+
+			try{
+			    while (1){
+				loader.write([dstream.read_byte()], 1);
+			    }
+			}
+			catch (e){
+			    Seed.print(e.name + " " + e.message);
+			}
+			container.pack_end(
+			    new Gtk.Image.from_pixbuf(loader.get_pixbuf()));
+			container.show_all();
+		    });
 }
 
 // This function generates the GTK+ widgets that display the retrieved messages
 function make_block(data) {
-	var vbox = new Gtk.VBox({"spacing": 10, "border-width": 5});
-	var hbox = new Gtk.HBox();
-
-	// The text styling for the heading is done with simple Pango markup.
-	var heading = new Gtk.Label({
-			"use-markup": true,
-			"label": "<b><big>" + data.from_user + "</big></b>\n" +
-			"<small>" + Pretty.prettyDate(data.created_at) + "</small>"
-		});
-
-	// The message text is displayed in a TextView widget because the GTK+ label
-	// widget completely sucks at wrapping text. The TextView will look like a
-	// label because of the RC change at the top of the script.
-	var message = new Gtk.TextView({"wrap-mode": 2, "editable": false});
-	message.buffer.text = data.text;
-
-	heading.set_alignment(0, 0);
-	vbox.pack_start(hbox);
-	hbox.pack_start(heading);
-	put_pixbuf(hbox, data.profile_image_url);
-	vbox.pack_start(message);
-
-	var frame = new Gtk.Frame({"border-width": 5});
-	frame.add(vbox);
-	frame.show_all();
-	return frame;
+    var vbox = new Gtk.VBox({"spacing": 10, "border-width": 5});
+    var hbox = new Gtk.HBox();
+
+    // The text styling for the heading is done with simple Pango markup.
+    var heading = new Gtk.Label({
+	"use-markup": true,
+	"label": "<b><big>" + data.from_user + "</big></b>\n" +
+	    "<small>" + Pretty.prettyDate(data.created_at) + "</small>"
+    });
+
+    // The message text is displayed in a TextView widget because the GTK+ label
+    // widget completely sucks at wrapping text. The TextView will look like a
+    // label because of the RC change at the top of the script.
+    var message = new Gtk.TextView({"wrap-mode": 2, "editable": false});
+    message.buffer.text = data.text;
+
+    heading.set_alignment(0, 0);
+    vbox.pack_start(hbox);
+    hbox.pack_start(heading);
+    put_pixbuf(hbox, data.profile_image_url);
+    vbox.pack_start(message);
+
+    var frame = new Gtk.Frame({"border-width": 5});
+    frame.add(vbox);
+    frame.show_all();
+    return frame;
 }
 
 // Create the message container and put it in a scrollable window
@@ -90,30 +86,28 @@ scroll.set_policy(1, 1);
 var textbox = new Gtk.Entry();
 var button = new Gtk.Button({"label": "_Search", "use-underline": true});
 
-function async_callback(source, result)
-{
-	var stream = source.read_finish(result);
-	var dstream = new Gio.DataInputStream.c_new(stream);
-	var data = JSON.parse(dstream.read_until("", 0));
+function async_callback(source, result){
+    var stream = source.read_finish(result);
+    var dstream = new Gio.DataInputStream.c_new(stream);
+    var data = JSON.parse(dstream.read_until("", 0));
 
-	messages.foreach(function(m) {messages.remove(m);});
-	data.results.forEach(function(m) {	messages.pack_start(make_block(m));
-										while (GLib.main_context_pending())
- 											GLib.main_context_iteration();});
+    messages.foreach(function(m) {messages.remove(m);});
+    data.results.forEach(function(m) {	messages.pack_start(make_block(m));
+					while (GLib.main_context_pending())
+ 					    GLib.main_context_iteration();});
 
-	messages.show_all();
+    messages.show_all();
 }
 
 // Define the behavior for the button press by associating an anonymous
 // function with the button's click signal handler
 
-function do_search(w)
-{
-	var twitter =
-		Gio.file_new_for_uri("http://search.twitter.com/search.json?q=";
-							 + textbox.get_text());
+function do_search(w){
+    var twitter =
+	Gio.file_new_for_uri("http://search.twitter.com/search.json?q=";
+			     + textbox.get_text());
 
-	twitter.read_async(0, null, async_callback);
+    twitter.read_async(0, null, async_callback);
 }
 
 button.signal.clicked.connect(do_search);
diff --git a/modules/os/os.c b/modules/os/os.c
index 3e25968..2c81952 100644
--- a/modules/os/os.c
+++ b/modules/os/os.c
@@ -11,6 +11,8 @@
 #include <sys/stat.h>
 #include <sys/utsname.h>
 
+#include <sys/types.h>
+
 #include <fcntl.h>
 
 #ifdef HAVE_PTY_H
@@ -1076,6 +1078,5 @@ seed_module_init(SeedEngine * eng)
   OS_DEFINE_QUICK_ENUM (W_OK);
   OS_DEFINE_QUICK_ENUM (X_OK);
 
-
   return os_namespace;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]