libglade r550 - in trunk: . glade test
- From: aklapper svn gnome org
- To: svn-commits-list gnome org
- Subject: libglade r550 - in trunk: . glade test
- Date: Mon, 23 Feb 2009 21:55:59 +0000 (UTC)
Author: aklapper
Date: Mon Feb 23 21:55:59 2009
New Revision: 550
URL: http://svn.gnome.org/viewvc/libglade?rev=550&view=rev
Log:
2009-02-23 Andre Klapper <a9016009 gmx de>
* glade/makekeys.awk:
* test/domp.c:
* test/saxp.c:
Remove deprecated GLib functions. Fixes bug #572846.
Modified:
trunk/ChangeLog
trunk/glade/makekeys.awk
trunk/test/domp.c
trunk/test/saxp.c
Modified: trunk/glade/makekeys.awk
==============================================================================
--- trunk/glade/makekeys.awk (original)
+++ trunk/glade/makekeys.awk Mon Feb 23 21:55:59 2009
@@ -42,12 +42,10 @@
printf " if (!hash) {\n";
printf " int i = 0;\n";
printf " hash = g_hash_table_new(g_str_hash, g_str_equal);\n";
- printf " g_hash_table_freeze(hash);\n";
printf " while (keys[i].str != NULL) {\n";
printf " g_hash_table_insert(hash, keys[i].str, GUINT_TO_POINTER(keys[i].key));\n";
printf " i++;\n";
printf " }\n";
- printf " g_hash_table_thaw(hash);\n";
printf " }\n";
printf " return hash;\n";
printf "}\n\n";
Modified: trunk/test/domp.c
==============================================================================
--- trunk/test/domp.c (original)
+++ trunk/test/domp.c Mon Feb 23 21:55:59 2009
@@ -47,12 +47,10 @@
/*glade_style_parse(tree->xml);*/
tree->tree = g_node_new(NULL); /* root node */
tree->hash = g_hash_table_new(g_str_hash, g_str_equal);
- g_hash_table_freeze(tree->hash);
for (tmp = tree->xml->root->childs; tmp != NULL; tmp = tmp->next)
if (tmp->name && !strcmp(tmp->name, "widget"))
recurse_tree(tmp, tree->tree, tree->hash);
- g_hash_table_thaw(tree->hash);
return tree;
}
Modified: trunk/test/saxp.c
==============================================================================
--- trunk/test/saxp.c (original)
+++ trunk/test/saxp.c Mon Feb 23 21:55:59 2009
@@ -395,12 +395,12 @@
if (!strcmp(name, "style_name"))
state->cur_style->name = g_strdup(state->content->str);
else if (!strcmp(name, "style_font"))
- g_string_sprintfa(state->style_data, " font = \"%s\"\n",
+ g_string_append_printf(state->style_data, " font = \"%s\"\n",
state->content->str);
else if (!strncmp(name, "fg-", 3)) {
gint r, g, b;
sscanf(state->content->str, "%d,%d,%d", &r, &g, &b);
- g_string_sprintfa(state->style_data,
+ g_string_append_printf(state->style_data,
" fg[%s] = { %.3f, %.3f, %.3f }\n",
&name[3],
CLAMP(r, 0, 255) / 255.0,
@@ -409,7 +409,7 @@
} else if (!strncmp(name, "bg-", 3)) {
gint r, g, b;
sscanf(state->content->str, "%d,%d,%d", &r, &g, &b);
- g_string_sprintfa(state->style_data,
+ g_string_append_printf(state->style_data,
" bg[%s] = { %.3f, %.3f, %.3f }\n",
&name[3],
CLAMP(r, 0, 255) / 255.0,
@@ -418,7 +418,7 @@
} else if (!strncmp(name, "text-", 5)) {
gint r, g, b;
sscanf(state->content->str, "%d,%d,%d", &r, &g, &b);
- g_string_sprintfa(state->style_data,
+ g_string_append_printf(state->style_data,
" text[%s] = { %.3f, %.3f, %.3f }\n",
&name[5],
CLAMP(r, 0, 255) / 255.0,
@@ -427,14 +427,14 @@
} else if (!strncmp(name, "base-", 5)) {
gint r, g, b;
sscanf(state->content->str, "%d,%d,%d", &r, &g, &b);
- g_string_sprintfa(state->style_data,
+ g_string_append_printf(state->style_data,
" base[%s] = { %.3f, %.3f, %.3f }\n",
&name[5],
CLAMP(r, 0, 255) / 255.0,
CLAMP(g, 0, 255) / 255.0,
CLAMP(b, 0, 255) / 255.0);
} else if (!strncmp(name, "bg_pixmap-", 10))
- g_string_sprintfa(state->style_data, " bg_pixmap[%s] = \"%s\"\n",
+ g_string_append_printf(state->style_data, " bg_pixmap[%s] = \"%s\"\n",
&name[10], state->content->str);
break;
case PARSER_STYLE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]