summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tvb@src.gnome.org>2008-11-13 18:58:33 +0000
committerTristan Van Berkom <tvb@src.gnome.org>2008-11-13 18:58:33 +0000
commit6732db245ef58ab7984ff3669d01c5fb2d49ad7e (patch)
tree9a2ac4312523aeea7551dbc1563f0e83b1ab75e7
parent0a649c0e2f9637f988c5321267df6f555a9027ad (diff)
downloadglade-6732db245ef58ab7984ff3669d01c5fb2d49ad7e.tar.gz
Refixed use of uninitialized variable (bug 559678).
* gladeui/glade-utils.c: Refixed use of uninitialized variable (bug 559678). * plugins/gnome/glade-gnome.c: Fixed build breakage (bug 560668). svn path=/trunk/; revision=2025
-rw-r--r--ChangeLog6
-rw-r--r--gladeui/glade-utils.c7
-rw-r--r--plugins/gnome/glade-gnome.c2
3 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a4b25d8..169779b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-11-12 Tristan Van Berkom <tvb@gnome.org>
+ * gladeui/glade-utils.c: Refixed use of uninitialized variable (bug 559678).
+
+ * plugins/gnome/glade-gnome.c: Fixed build breakage (bug 560668).
+
+2008-11-12 Tristan Van Berkom <tvb@gnome.org>
+
* plugins/gtk+/glade-gtk.c: Fixed loading of images and only set image
data when in the correct edit mode.
diff --git a/gladeui/glade-utils.c b/gladeui/glade-utils.c
index 485f70a0..74746f37 100644
--- a/gladeui/glade-utils.c
+++ b/gladeui/glade-utils.c
@@ -448,7 +448,7 @@ glade_util_gtk_combo_find (GtkCombo * combo)
gchar *text;
gchar *ltext;
GList *clist;
- gsize n;
+ gsize len;
int (*string_compare) (const char *, const char *, gsize);
@@ -457,14 +457,15 @@ glade_util_gtk_combo_find (GtkCombo * combo)
else
string_compare = g_ascii_strncasecmp;
- text = (gchar*) gtk_entry_get_text (GTK_ENTRY (combo->entry));
+ text = (gchar*) gtk_entry_get_text (GTK_ENTRY (combo->entry));
+ len = text ? strlen (text) : 0;
clist = GTK_LIST (combo->list)->children;
while (clist && clist->data) {
ltext = glade_util_gtk_combo_func (GTK_LIST_ITEM (clist->data));
if (!ltext)
continue;
- if (!(*string_compare) (ltext, text, n))
+ if (!(*string_compare) (ltext, text, len))
return (GtkListItem *) clist->data;
clist = clist->next;
}
diff --git a/plugins/gnome/glade-gnome.c b/plugins/gnome/glade-gnome.c
index 0aa68629..e3625dd3 100644
--- a/plugins/gnome/glade-gnome.c
+++ b/plugins/gnome/glade-gnome.c
@@ -824,7 +824,7 @@ glade_gnome_dialog_add_button (GladeWidget *gaction_area,
eclass = g_type_class_ref (glade_standard_stock_get_type ());
if ((eval = g_enum_get_value_by_nick (eclass, stock)) != NULL)
{
- glade_widget_property_set (gbutton, "glade-type", GLADEGTK_BUTTON_STOCK);
+ glade_widget_property_set (gbutton, "use-stock", TRUE);
glade_widget_property_set (gbutton, "stock", eval->value);
}
g_type_class_unref (eclass);