changeset 15154:7696f5dec7d8

[gaim-migrate @ 17940] Make the per-account statusboxes work. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 10 Dec 2006 09:02:47 +0000
parents 38cdfbb371b1
children ff431329a01b
files gtk/gtkstatusbox.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/gtkstatusbox.c	Sun Dec 10 08:29:03 2006 +0000
+++ b/gtk/gtkstatusbox.c	Sun Dec 10 09:02:47 2006 +0000
@@ -764,8 +764,7 @@
 					path = gtk_tree_model_get_path(GTK_TREE_MODEL(status_box->dropdown_store), &iter);
 					break;
 				}
-			}
-			while (gtk_tree_model_iter_next(GTK_TREE_MODEL(status_box->dropdown_store), &iter));
+			} while (gtk_tree_model_iter_next(GTK_TREE_MODEL(status_box->dropdown_store), &iter));
 		}
 	}
 
@@ -2154,7 +2153,7 @@
 
 		status = gaim_account_get_active_status(status_box->account);
 
-		g_object_get(G_OBJECT(status_box), "active", &active, NULL);
+		active = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(status_box), "active"));
 
 		status_type = find_status_type_by_index(status_box->account, active);
 		id = gaim_status_type_get_id(status_type);
@@ -2250,11 +2249,14 @@
 	GtkGaimStatusBoxItemType type;
 	gpointer data;
 	GList *accounts = NULL, *node;
+	int active;
 
 	
 	if (!gtk_tree_model_get_iter (GTK_TREE_MODEL(status_box->dropdown_store), &iter, path))
 		return;
+	active = gtk_tree_path_get_indices(path)[0];
 	gtk_tree_path_free(path);
+	g_object_set_data(G_OBJECT(status_box), "active", GINT_TO_POINTER(active));
 	
 	gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
 			   TYPE_COLUMN, &type,