From 37f6b421f2a9860c353d06c0aaa303edea345dfe Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 7 Dec 1997 02:34:38 +0000 Subject: applied jamesa-971010-0 for stability. applied jamesa-971010-2 for a small * gtkfilesel.c: applied jamesa-971010-0 for stability. * gtkrc.c: applied jamesa-971010-2 for a small optimization. * gtkcheckmenuitem.h: * gtkcheckmenuitem.c: * gtkradiomenuitem.c: * testgtk.c: applied johannes-971113-0 which adds gtk_check_menu_item_set_show_toggle() to change the way check menu items and radio menu items look. -timj --- gtk/gtkrc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'gtk/gtkrc.c') diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 86bc20121b..131dd0b0fb 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -1257,41 +1257,41 @@ gtk_rc_parse_pixmap_path () return PARSE_OK; } -static void gtk_rc_parse_pixmap_path_string(gchar *pix_path) +static void +gtk_rc_parse_pixmap_path_string (gchar *pix_path) { gchar *buf; gint end_offset; gint start_offset = 0; gint path_len; gint path_num; - + /* free the old one, or just add to the old one ? */ for (path_num=0; pixmap_path[path_num]; path_num++) { - g_free(pixmap_path[path_num]); + g_free (pixmap_path[path_num]); pixmap_path[path_num] = NULL; } - + path_num = 0; + + path_len = strlen (pix_path); + + buf = g_strdup (pix_path); - path_len = strlen(pix_path); - - buf = g_strdup(pix_path); - - for(end_offset = 0; end_offset <= path_len; end_offset++) + for (end_offset = 0; end_offset <= path_len; end_offset++) { - if ( (buf[end_offset] == ':') || (end_offset == path_len) ) + if ((buf[end_offset] == ':') || + (end_offset == path_len)) { buf[end_offset] = '\0'; - pixmap_path[path_num] = g_strdup(buf + start_offset); + pixmap_path[path_num] = g_strdup (buf + start_offset); path_num++; pixmap_path[path_num] = NULL; start_offset = end_offset + 1; - g_free(buf); - buf = g_strdup(pix_path); } } - g_free(buf); + g_free (buf); } static gint -- cgit v1.2.1