changeset 13079:896d6c305429

[gaim-migrate @ 15441] Fix the bug where available and other stuff in the status box had the disk icon on it. Also, if the user selected a status that is not in the status box, then don't select anything in the status menu committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 31 Jan 2006 04:40:30 +0000
parents 55c1e5cec4dc
children 1dc109c12ef5
files src/gtkstatusbox.c
diffstat 1 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkstatusbox.c	Tue Jan 31 04:35:49 2006 +0000
+++ b/src/gtkstatusbox.c	Tue Jan 31 04:40:30 2006 +0000
@@ -428,7 +428,6 @@
 	{
 		index = get_statusbox_index(status_box, saved_status);
 		gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), index);
-
 	}
 	else
 	{
@@ -491,6 +490,7 @@
 {
 	GList *list, *cur;
 	GtkIconSize icon_size;
+	const GdkPixbuf *orig;
 	GdkPixbuf *pixbuf, *emblem;
 	int width, height;
 
@@ -505,8 +505,10 @@
 		icon_size = gtk_icon_size_from_name(GAIM_ICON_SIZE_STATUS_SMALL);
 
 	/* Create the icon to use for non-transient saved-statuses */
-	pixbuf = gtk_widget_render_icon(GTK_WIDGET(statusbox->vbox),
+	orig = gtk_widget_render_icon(GTK_WIDGET(statusbox->vbox),
 				GAIM_STOCK_STATUS_ONLINE, icon_size, "GtkGaimStatusBox");
+	pixbuf = gdk_pixbuf_copy(orig);
+	g_object_unref(G_OBJECT(orig));
 
 	emblem = gtk_widget_render_icon(GTK_WIDGET(statusbox->vbox),
 				GTK_STOCK_SAVE, icon_size, "GtkGaimStatusBox");
@@ -544,7 +546,7 @@
 			gaim_util_chrreplace(stripped, '\n', ' ');
 		}
 		gtk_gaim_status_box_add(statusbox, GTK_GAIM_STATUS_BOX_TYPE_POPULAR,
-				pixbuf,	gaim_savedstatus_get_title(saved), stripped,
+				pixbuf, gaim_savedstatus_get_title(saved), stripped,
 				GINT_TO_POINTER(gaim_savedstatus_get_creation_time(saved)));
 		g_free(stripped);
 	}
@@ -1434,12 +1436,7 @@
 			index = 3;
 			break;
 		default:
-			/*
-			 * TODO: This is very bad!  I believe it's causing the infinite
-			 *       windows bug.  Need to do something better here.
-			 */
-			/* index = GTK_LIST_STORE(box->dropdown_store)->length - 2; */
-			index = 0;
+			index = -1;
 			break;
 	}