Re: ANNOUNCE: gob2 2.0.12 the "Long time no GOB" release
Nicolas Bruguier <[email protected]> Sun, 24 Jul 2005 13:37:56 +0200
| Newsgroups | gmane.comp.gnome.devtools.gob.general |
|---|---|
| Message-ID | <[email protected]> |
--=-r+zLQyDo7zOx/jnEKeHT
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by zinc.5z.com id j6OBeNZR001562
hi
I regenerate patch for libglade broken with more elegant use of self and
o instance in init function.
Regards
Le samedi 23 juillet 2005 =E0 15:48 -0700, George a =E9crit :
> On Sat, Jul 23, 2005 at 01:23:00AM +0200, Jean-Yves Lefort wrote:
> > > Here are the news in 2.0.12:
> > >=20
> > > * libglade support (see manpage) (Nicolas Brugier)
> >=20
> > It's broken.
>=20
> Whoopsie, I have an excuse: My brain was boiling because it was a hot d=
ay
> with no airconditioning :)
>=20
> Unfortunately I'm leaving to berkeley for a 2 week workshop so I won't =
have
> time to check this out and fix it before.
>=20
> George
>=20
--=-r+zLQyDo7zOx/jnEKeHT
Content-Disposition: attachment; filename=gob2-libglade-broken.patch
Content-Type: text/x-patch; name=gob2-libglade-broken.patch; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
Index: src/main.c
===================================================================
RCS file: /cvs/gnome/gob/src/main.c,v
retrieving revision 1.130
diff -u -r1.130 main.c
--- src/main.c 22 Jul 2005 19:56:32 -0000 1.130
+++ src/main.c 24 Jul 2005 11:31:14 -0000
@@ -2001,6 +2001,9 @@
print_initializer(Method *m, Variable *v)
{
char *root;
+
+ if(v->glade_widget)
+ return;
if(v->initializer == NULL)
return;
@@ -2017,6 +2020,8 @@
if (v->initializer_simple)
out_printf(out, "\t%s->%s = %s;\n",
root, v->id, v->initializer);
+ else if (!strcmp(v->id, "_glade_xml"))
+ out_printf(out,v->initializer, ((FuncArg *)m->args->data)->name);
else
out_printf(out,v->initializer);
Index: src/parse.y
===================================================================
RCS file: /cvs/gnome/gob/src/parse.y,v
retrieving revision 1.66
diff -u -r1.66 parse.y
--- src/parse.y 22 Jul 2005 19:49:46 -0000 1.66
+++ src/parse.y 24 Jul 2005 11:31:17 -0000
@@ -473,7 +473,6 @@
Node *var;
Type * type;
GList * flags = NULL;
- char * set;
type = (Type *)node_new (TYPE_NODE,
"name", "GladeXML",
@@ -481,11 +480,11 @@
NULL);
initializer = g_strdup_printf("\t{\n"
"\tGtkWidget * root;\n"
- "\to->_priv->_glade_xml = glade_xml_new(%s, %s, %s);\n"
- "\troot = glade_xml_get_widget(o->_priv->_glade_xml, %s);\n"
+ "\t%%1$s->_priv->_glade_xml = glade_xml_new(%s, %s, %s);\n"
+ "\troot = glade_xml_get_widget(%%1$s->_priv->_glade_xml, %s);\n"
"\tgtk_widget_show(root);\n"
- "\tgtk_container_add(GTK_CONTAINER(o), root);\n"
- "\tglade_xml_signal_autoconnect_full(o->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)o);\n"
+ "\tgtk_container_add(GTK_CONTAINER(%%1$s), root);\n"
+ "\tglade_xml_signal_autoconnect_full(%%1$s->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)%%1$s);\n"
"}\n", file, root, domain ? domain : "NULL", root);
var = node_new (VARIABLE_NODE,
--=-r+zLQyDo7zOx/jnEKeHT--
--
to unsubscribe:
send mail to [email protected] with "unsubscribe gob-list" in the subject