From: Kevin Ryde <user42@zip.com.au>
To: guile-gtk@sources.redhat.com
Subject: examples/tictactoe.scm
Date: Sun, 25 May 2003 23:33:00 -0000 [thread overview]
Message-ID: <87wugelhye.fsf@zip.com.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 630 bytes --]
I tried to run examples/tictactoe.scm and noticed gtk-class-new and
gtk-signal-new-generic seem to have bit-rotted slightly.
* guile-gtk.c (gtk_class_new): Use gtk_type_query rather than
gtk_type_get_info.
(gtk_signal_new_generic): Use sgtk_callback_marshal for marshalling.
Not sure if this is actually right, but it takes it from not working
to seeming to work. :)
I see the gtk changelog says gtk_type_get_info got reverted. I guess
gtk_type_query is the way to go, for gtk 1.2 at least. Unless anyone
knows better I'd think it could be used unconditionally, no need for
an autoconf check by now.
[-- Attachment #2: guile-gtk.c.tictactoe.diff --]
[-- Type: text/plain, Size: 1174 bytes --]
--- guile-gtk.c.~1.15.~ 2003-05-24 10:02:45.000000000 +1000
+++ guile-gtk.c 2003-05-25 12:15:41.000000000 +1000
@@ -2565,19 +2565,21 @@
gtk_class_new (GtkType parent_type, gchar *name)
{
GtkTypeInfo info = { 0 };
- GtkTypeInfo parent_info;
+ GtkTypeQuery *parent_query;
- if (!gtk_type_get_info (parent_type, &parent_info))
+ parent_query = gtk_type_query (parent_type);
+ if (parent_query == NULL)
return GTK_TYPE_INVALID;
info.type_name = name;
- info.object_size = parent_info.object_size;
- info.class_size = parent_info.class_size;
+ info.object_size = parent_query->object_size;
+ info.class_size = parent_query->class_size;
info.class_init_func = NULL;
info.object_init_func = NULL;
#if GTK_MAJOR_VERSION > 1 || GTK_MINOR_VERSION > 0
info.base_class_init_func = NULL;
#endif
+ g_free (parent_query);
return gtk_type_unique (parent_type, &info);
}
@@ -2596,7 +2598,7 @@
return 0;
signal_id = gtk_signal_newv (name, signal_flags, type,
- 0, NULL,
+ 0, sgtk_callback_marshal,
return_type, nparams, params);
if (signal_id > 0)
gtk_object_class_add_signals (gtk_type_class (type),
next reply other threads:[~2003-05-25 23:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-25 23:33 Kevin Ryde [this message]
2003-06-14 23:10 ` examples/tictactoe.scm Kevin Ryde
2003-06-15 3:02 ` examples/tictactoe.scm Marius Vollmer
2003-06-19 0:55 ` examples/tictactoe.scm Kevin Ryde
2003-06-19 11:05 ` examples/tictactoe.scm Marius Vollmer
2003-06-23 14:24 ` examples/tictactoe.scm Andy Wingo
2003-06-23 22:16 ` examples/tictactoe.scm Marius Vollmer
2003-06-24 10:28 ` examples/tictactoe.scm Andreas Rottmann
2003-06-14 23:42 ` examples/tictactoe.scm Kevin Ryde
2003-06-19 0:55 ` examples/tictactoe.scm Kevin Ryde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wugelhye.fsf@zip.com.au \
--to=user42@zip.com.au \
--cc=guile-gtk@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).