[seed] [gtkbuilder] Port to seed-module.h (not much to do)
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] [gtkbuilder] Port to seed-module.h (not much to do)
- Date: Sat, 4 Jul 2009 21:12:08 +0000 (UTC)
commit 91c4679c6f9a81f12c8d6e7d352533bc4fcce69f
Author: Tim Horton <hortont svn gnome org>
Date: Sat Jul 4 17:00:24 2009 -0400
[gtkbuilder] Port to seed-module.h (not much to do)
modules/gtkbuilder/seed-gtkbuilder.c | 12 ++++++++----
modules/seed-module.h | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/modules/gtkbuilder/seed-gtkbuilder.c b/modules/gtkbuilder/seed-gtkbuilder.c
index 3ffda21..e389fa2 100644
--- a/modules/gtkbuilder/seed-gtkbuilder.c
+++ b/modules/gtkbuilder/seed-gtkbuilder.c
@@ -1,4 +1,5 @@
-#include <seed.h>
+#include <seed-module.h>
+
#include <gtk/gtk.h>
typedef struct _builder_ud {
@@ -28,7 +29,8 @@ seed_builder_connect_func (GtkBuilder *builder,
if (!seed_value_is_object (ctx, func) || !seed_value_is_function (ctx, func))
return;
- closure = seed_closure_new (ctx, func, priv->user_data, "signal handler (GtkBuilder)");
+ closure = seed_closure_new (ctx, func, priv->user_data,
+ "signal handler (GtkBuilder)");
if (connect_object != NULL)
g_object_watch_closure (connect_object, closure);
@@ -45,11 +47,13 @@ seed_gtk_builder_connect_signals(SeedContext ctx,
{
builder_ud ud;
GtkBuilder *b;
+
+ CHECK_ARG_COUNT("gtkbuilder.connect_signals", 1);
if (!seed_value_is_object (ctx, arguments[0]))
{
- seed_make_exception (ctx, exception, "ArgumentError",
- "connect_signals expects one object as an argument");
+ seed_make_exception (ctx, exception, "TypeError",
+ "connect_signals expects one object as the first argument");
return seed_make_undefined (ctx);
}
diff --git a/modules/seed-module.h b/modules/seed-module.h
index 2f247a6..6bd267a 100644
--- a/modules/seed-module.h
+++ b/modules/seed-module.h
@@ -4,7 +4,7 @@
#include "../libseed/seed.h"
// TODO: Move [example sqlite canvas Multiprocessing
-// os sandbox dbus libxml cairo gtkbuilder]
+// os sandbox dbus libxml cairo]
// towards utilization of this header.
// Pluralize an argument count ("1 argument", "2 arguments", etc), given an int
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]