changeset 14803:967c39d78bc4

[gaim-migrate @ 17568] I'm an idiot. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 23 Oct 2006 19:43:45 +0000
parents 4138063d89c9
children dfd272ab67e7
files gtk/gtkblist.c gtk/gtkblist.h gtk/gtknotify.c gtk/gtkstatusbox.c gtk/gtkstatusbox.h
diffstat 5 files changed, 117 insertions(+), 195 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/gtkblist.c	Mon Oct 23 19:05:14 2006 +0000
+++ b/gtk/gtkblist.c	Mon Oct 23 19:43:45 2006 +0000
@@ -2078,7 +2078,6 @@
 	GdkPixbuf *status_icon;
 	GdkPixbuf *avatar;
 	int avatar_width;
-	int avatar_height;
 	int width;
 	int height;
 };
@@ -2102,7 +2101,6 @@
 
 	if(td->avatar) {
 		td->avatar_width = gdk_pixbuf_get_width(td->avatar);
-		td->avatar_height = gdk_pixbuf_get_height(td->avatar);
 		td->width += td->avatar_width + 8;
 		td->height = MAX(td->height, gdk_pixbuf_get_height(td->avatar) + 8);
 	}
@@ -2136,8 +2134,6 @@
 	{
 		struct tooltip_data *td = l->data;
 
-
-
 #if GTK_CHECK_VERSION(2,2,0)
 		gdk_draw_pixbuf(GDK_DRAWABLE(gtkblist->tipwindow->window), NULL, td->status_icon,
 			0, 0, 4, current_height, -1 , -1, GDK_RGB_DITHER_NONE, 0, 0);
@@ -2152,7 +2148,7 @@
 					max_width - (td->avatar_width + 4),
 					current_height, -1, -1, GDK_RGB_DITHER_NONE, 0, 0);
 #endif
-	
+
 		gtk_paint_layout (style, gtkblist->tipwindow->window, GTK_STATE_NORMAL, FALSE,
 				NULL, gtkblist->tipwindow, "tooltip", 38 + 4, current_height, td->layout);
 
@@ -3864,10 +3860,6 @@
 			create_connection_error_buttons, NULL);
 }
 
-void gaim_gtk_blist_add_alert(GtkWidget *alert) {
-	gtk_notebook_append_page(gtkblist->alert_notebook, alert, NULL);
-}
-
 /******************************************/
 /* End of connection error handling stuff */
 /******************************************/
@@ -3880,8 +3872,6 @@
 	GtkWidget *menu;
 	GtkWidget *sw;
 	GtkWidget *sep;
-	GtkWidget *hbox;
-	GtkWidget *label, *arrow;
 	GtkAccelGroup *accel_group;
 	GtkTreeSelection *selection;
 	GtkTargetEntry dte[] = {{"GAIM_BLIST_NODE", GTK_TARGET_SAME_APP, DRAG_ROW},
@@ -4086,22 +4076,6 @@
 	gtkblist->error_buttons = gtk_vbox_new(FALSE, 0);
 	gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->error_buttons, FALSE, FALSE, 0);
 
-	/* Create an area for showing buddy list alerts */
-	hbox = gtk_hbox_new(FALSE,0);
-	gtk_box_pack_start(GTK_BOX(gtkblist->vbox), hbox, FALSE, FALSE, 0);
-	arrow = gtk_arrow_new(GTK_ARROW_RIGHT,GTK_SHADOW_NONE);
-	gtk_box_pack_end(GTK_BOX(hbox),arrow,FALSE,FALSE,0);
-	label = gtk_label_new(NULL);
-	gtk_label_set_markup(GTK_LABEL(label), "<span size='smaller'><b>(2/3)</b></span>");
-	gtk_box_pack_end(GTK_BOX(hbox),label,FALSE,FALSE,0);
-	arrow = gtk_arrow_new(GTK_ARROW_LEFT,GTK_SHADOW_NONE);
-	gtk_box_pack_end(GTK_BOX(hbox),arrow,FALSE,FALSE,0);
-
-	gtkblist->alert_notebook = gtk_notebook_new();
-	gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gtkblist->alert_notebook), FALSE);
-	gtk_notebook_set_show_border(GTK_NOTEBOOK(gtkblist->alert_notebook), FALSE);
-	gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->alert_notebook, FALSE, FALSE, 0);
-
 	/* Add the statusbox */
 	gtkblist->statusbox = gtk_gaim_status_box_new();
 	gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->statusbox, FALSE, TRUE, 0);
--- a/gtk/gtkblist.h	Mon Oct 23 19:05:14 2006 +0000
+++ b/gtk/gtkblist.h	Mon Oct 23 19:43:45 2006 +0000
@@ -94,8 +94,6 @@
 	GaimBlistNode *selected_node;    /**< The currently selected node */
 	GtkWidget *error_buttons;        /**< Box containing the connection error buttons */
 	GtkWidget *statusbox;            /**< The status selector dropdown */
-
-	GtkWidget *alert_notebook;       /**< The notebook for alerts */
 };
 
 #define GAIM_GTK_BLIST(list) ((GaimGtkBuddyList *)(list)->ui_data)
@@ -303,11 +301,4 @@
  */
 void gaim_gtk_blist_update_account_error_state(GaimAccount *account, const char *message);
 
-/**
- * Adds a widget to the alert area of the buddy list
- *
- * @param widget The widget to add
- */
-void gaim_gtk_blist_add_alert(GtkWidget *alert);
-
 #endif /* _GAIM_GTKBLIST_H_ */
--- a/gtk/gtknotify.c	Mon Oct 23 19:05:14 2006 +0000
+++ b/gtk/gtknotify.c	Mon Oct 23 19:43:45 2006 +0000
@@ -196,138 +196,84 @@
 	g_list_free(row);
 }
 
-
 static void *
 gaim_gtk_notify_message(GaimNotifyMsgType type, const char *title,
-                                                const char *primary, const char *secondary)
+						const char *primary, const char *secondary)
 {
-        GtkStyle *style;
-        GdkColor color;
-        GtkWidget *ebox;
-        GtkWidget *vbox;
-        GtkWidget *hbox;
-        GtkWidget *bbox;
-        GtkWidget *label;
-        GtkWidget *button;
-        GtkWidget *alignment;
-        GtkWidget *img = NULL;
-        GtkStockItem close_item;
-        char label_text[2048];
-        const char *icon_name = NULL;
-        char *primary_esc, *secondary_esc;
+	GtkWidget *dialog;
+	GtkWidget *hbox;
+	GtkWidget *label;
+	GtkWidget *img = NULL;
+	char label_text[2048];
+	const char *icon_name = NULL;
+	char *primary_esc, *secondary_esc;
 
-        switch (type)
-        {
-                case GAIM_NOTIFY_MSG_ERROR:
-                        icon_name = GAIM_STOCK_DIALOG_ERROR;
-                        break;
+	switch (type)
+	{
+		case GAIM_NOTIFY_MSG_ERROR:
+			icon_name = GAIM_STOCK_DIALOG_ERROR;
+			break;
 
-                case GAIM_NOTIFY_MSG_WARNING:
-                        icon_name = GAIM_STOCK_DIALOG_WARNING;
-                        break;
+		case GAIM_NOTIFY_MSG_WARNING:
+			icon_name = GAIM_STOCK_DIALOG_WARNING;
+			break;
 
-                case GAIM_NOTIFY_MSG_INFO:
-                        icon_name = GAIM_STOCK_DIALOG_INFO;
-                        break;
-
-                default:
-                        icon_name = NULL;
-                        break;
-        }
+		case GAIM_NOTIFY_MSG_INFO:
+			icon_name = GAIM_STOCK_DIALOG_INFO;
+			break;
 
-        if (icon_name != NULL)
-        {
-                img = gtk_image_new_from_stock(icon_name, GTK_ICON_SIZE_BUTTON);
-                gtk_misc_set_alignment(GTK_MISC(img), 0, 0);
-        }
+		default:
+			icon_name = NULL;
+			break;
+	}
 
-        ebox = gtk_event_box_new();
-        vbox = gtk_vbox_new(FALSE,0);
-        gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
-        color.red = 65535;
-        //      gtk_widget_modify_bg(ebox, GTK_STATE_NORMAL, &(vbox->style->base[GTK_STATE_SELECTED]));
-        gtk_container_add(GTK_CONTAINER(ebox),vbox);
-
-        hbox = gtk_hbox_new(FALSE, 0);
-        gtk_container_add(GTK_CONTAINER(vbox), hbox);
+	if (icon_name != NULL)
+	{
+		img = gtk_image_new_from_stock(icon_name, GTK_ICON_SIZE_DIALOG);
+		gtk_misc_set_alignment(GTK_MISC(img), 0, 0);
+	}
 
-        if (img != NULL)
-                gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
- primary_esc = g_markup_escape_text(primary, -1);
-        if (secondary)
-                secondary_esc = g_markup_escape_text(secondary, -1);
-        g_snprintf(label_text, sizeof(label_text),
-                   "<span weight=\"bold\" size=\"smaller\">%s</span>%s<span size=\"smaller\">%s</span>",
-                   primary_esc,
-                   secondary ? "\n" : "",
-                   secondary ? secondary_esc : "");
-        g_free(primary_esc);
-        label = gtk_label_new(NULL);
-        gtk_widget_modify_text(vbox, GTK_STATE_NORMAL, &(label->style->white));
-        gtk_label_set_markup(GTK_LABEL(label), label_text);
-        gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-        gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-        gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
-#if GTK_CHECK_VERSION(2,6,0)
-        g_object_set(label, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
-#endif
-#if 0
-        if (secondary) {
-                secondary_esc = g_markup_escape_text(secondary, -1);
-                g_snprintf(label_text, sizeof(label_text),
-                           "<span size=\"smaller\">%s</span>",
-                           secondary_esc);
-                g_free(secondary_esc);
-                label = gtk_label_new(NULL);
-                gtk_label_set_markup(GTK_LABEL(label), label_text);
-                gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-                gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-                gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
-#if GTK_CHECK_VERSION(2,6,0)
-                g_object_set(label, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
-#endif
-        }
-#endif
-        bbox = gtk_hbutton_box_new();
-        gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
-        gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
+	dialog = gtk_dialog_new_with_buttons(title ? title : GAIM_ALERT_TITLE,
+										 NULL, 0, GTK_STOCK_CLOSE,
+										 GTK_RESPONSE_CLOSE, NULL);
+
+	gtk_window_set_role(GTK_WINDOW(dialog), "notify_dialog");
+
+	g_signal_connect(G_OBJECT(dialog), "response",
+					 G_CALLBACK(message_response_cb), dialog);
+
+	gtk_container_set_border_width(GTK_CONTAINER(dialog), GAIM_HIG_BORDER);
+	gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
+	gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+	gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), GAIM_HIG_BORDER);
+	gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), GAIM_HIG_BOX_SPACE);
+
+	hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER);
+	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox);
 
-        button = gtk_button_new();
-        g_signal_connect_swapped(G_OBJECT(button), "activate", gtk_widget_destroy, ebox);
-        alignment = gtk_alignment_new(0.5, 0.5, 0, 0);
-        gtk_container_add(GTK_CONTAINER(button), alignment);
+	if (img != NULL)
+		gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
 
-        hbox = gtk_hbox_new(FALSE, 0);
-        gtk_container_add(GTK_CONTAINER(alignment), hbox);
-
-        img = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
-        gtk_misc_set_alignment(GTK_MISC(img), 0.5, 0.5);
-        gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
+	primary_esc = g_markup_escape_text(primary, -1);
+	secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL;
+	g_snprintf(label_text, sizeof(label_text),
+			   "<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
+			   primary_esc, (secondary ? secondary_esc : ""));
+	g_free(primary_esc);
+	g_free(secondary_esc);
 
-        gtk_stock_lookup(GTK_STOCK_CLOSE, &close_item);
-        g_snprintf(label_text, sizeof(label_text),
-                   "<span size=\"smaller\">%s</span>", close_item.label);
-        label = gtk_label_new(NULL);
-        gtk_misc_set_alignment(GTK_MISC(img), 0.5, 0.5);
-        gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
+	label = gtk_label_new(NULL);
 
-        gtk_stock_lookup(GTK_STOCK_CLOSE, &close_item);
-        g_snprintf(label_text, sizeof(label_text),
-                   "<span size=\"smaller\">%s</span>", close_item.label);
-        label = gtk_label_new(NULL);
-        gtk_misc_set_alignment(GTK_MISC(img), 0.5, 0.5);
-        gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), label_text);
-        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+	gtk_label_set_markup(GTK_LABEL(label), label_text);
+	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
 
-        gtk_container_add(GTK_CONTAINER(bbox), button);
+	gtk_widget_show_all(dialog);
 
-        gtk_widget_show_all(ebox);
-        gaim_gtk_blist_add_alert(ebox);
-
-        return ebox;
+	return dialog;
 }
 
-
 static void
 selection_changed_cb(GtkTreeSelection *sel, GaimMailDialog *dialog)
 {
--- a/gtk/gtkstatusbox.c	Mon Oct 23 19:05:14 2006 +0000
+++ b/gtk/gtkstatusbox.c	Mon Oct 23 19:43:45 2006 +0000
@@ -83,6 +83,10 @@
 static void do_colorshift (GdkPixbuf *dest, GdkPixbuf *src, int shift);
 static void icon_choose_cb(const char *filename, gpointer data);
 
+static void (*combo_box_size_request)(GtkWidget *widget, GtkRequisition *requisition);
+static void (*combo_box_size_allocate)(GtkWidget *widget, GtkAllocation *allocation);
+static void (*combo_box_forall) (GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data);
+
 enum {
 	/** A GtkGaimStatusBoxItemType */
 	TYPE_COLUMN,
@@ -118,7 +122,7 @@
 	PROP_ICON_SEL,
 };
 
-GtkContainer *parent_class = NULL;
+GtkComboBoxClass *parent_class = NULL;
 
 static void gtk_gaim_status_box_class_init (GtkGaimStatusBoxClass *klass);
 static void gtk_gaim_status_box_init (GtkGaimStatusBox *status_box);
@@ -144,8 +148,8 @@
 			NULL  /* value_table */
 		};
 
-		status_box_type = g_type_register_static(GTK_TYPE_CONTAINER,
-							"GtkGaimStatusBox",
+		status_box_type = g_type_register_static(GTK_TYPE_COMBO_BOX,
+												 "GtkGaimStatusBox",
 												 &status_box_info,
 												 0);
 	}
@@ -195,7 +199,7 @@
 
 	if (status_no != -1) {
 		gtk_widget_set_sensitive(GTK_WIDGET(status_box), FALSE);
-//		gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), status_no);
+		gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), status_no);
 
 		message = gaim_status_get_attr_string(newstatus, "message");
 
@@ -422,16 +426,23 @@
 gtk_gaim_status_box_class_init (GtkGaimStatusBoxClass *klass)
 {
 	GObjectClass *object_class;
+	GtkComboBoxClass *combo_class;
 	GtkWidgetClass *widget_class;
 	GtkContainerClass *container_class = (GtkContainerClass*)klass;
 
 	parent_class = g_type_class_peek_parent(klass);
 
+	combo_class = (GtkComboBoxClass*)klass;
+	combo_class->changed = gtk_gaim_status_box_changed;
+
 	widget_class = (GtkWidgetClass*)klass;
+	combo_box_size_request = widget_class->size_request;
 	widget_class->size_request = gtk_gaim_status_box_size_request;
+	combo_box_size_allocate = widget_class->size_allocate;
 	widget_class->size_allocate = gtk_gaim_status_box_size_allocate;
 	widget_class->expose_event = gtk_gaim_status_box_expose_event;
 
+	combo_box_forall = container_class->forall;
 	container_class->forall = gtk_gaim_status_box_forall;
 	container_class->remove = NULL;
 
@@ -507,17 +518,16 @@
 		gpointer data;
 
 		/* Primary (get the status selected in the dropdown) */
-//		gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter);
-//		gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
-//						   TYPE_COLUMN, &type,
-//						   DATA_COLUMN, &data,
-//						   -1);
-//		if (type == GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE)
-//			primary = g_strdup(gaim_primitive_get_name_from_type(GPOINTER_TO_INT(data)));
-//		else
-//			/* This should never happen, but just in case... */
-//			primary = g_strdup("New status");
-                primary = g_strdup("Available");
+		gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter);
+		gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
+						   TYPE_COLUMN, &type,
+						   DATA_COLUMN, &data,
+						   -1);
+		if (type == GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE)
+			primary = g_strdup(gaim_primitive_get_name_from_type(GPOINTER_TO_INT(data)));
+		else
+			/* This should never happen, but just in case... */
+			primary = g_strdup("New status");
 	}
 	else if (account_status)
 		primary = g_strdup(gaim_status_get_name(gaim_account_get_active_status(acct)));
@@ -617,7 +627,7 @@
 
 	/* Make sure to activate the only row in the tree view */
 	path = gtk_tree_path_new_from_string("0");
-//	gtk_cell_view_set_displayed_row(GTK_CELL_VIEW(status_box->cell_view), path);
+	gtk_cell_view_set_displayed_row(GTK_CELL_VIEW(status_box->cell_view), path);
 	gtk_tree_path_free(path);
 
 	update_size(status_box);
@@ -683,7 +693,7 @@
 		(!gaim_savedstatus_has_substatuses(saved_status)))
 	{
 		index = get_statusbox_index(status_box, saved_status);
-//		gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), index);
+		gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), index);
 	}
 	else
 	{
@@ -692,7 +702,7 @@
 		gpointer data;
 
 		/* Unset the active item */
-//		gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), -1);
+		gtk_combo_box_set_active(GTK_COMBO_BOX(status_box), -1);
 
 		/* If this saved status is in the list store, then set it as the active item */
 		if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(status_box->dropdown_store), &iter))
@@ -720,7 +730,7 @@
 						|| !strcmp(name, acct_status_name))
 					{
 						/* Found! */
-//						gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter);
+						gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter);
 						g_free(name);
 						break;
 					}
@@ -730,7 +740,7 @@
 						(GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status)))
 				{
 					/* Found! */
-//					gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter);
+					gtk_combo_box_set_active_iter(GTK_COMBO_BOX(status_box), &iter);
 					break;
 				}
 			}
@@ -916,7 +926,7 @@
 		if (tmp != NULL)
 			g_object_unref(tmp);
 	}
-//	gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
+	gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
 }
 
 static void
@@ -933,7 +943,7 @@
 		icon_size = gtk_icon_size_from_name(GAIM_ICON_SIZE_STATUS_SMALL);
 
 	/* Unset the model while clearing it */
-//	gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), NULL);
+	gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), NULL);
 	gtk_list_store_clear(status_box->dropdown_store);
 	/* Don't set the model until the new statuses have been added to the box.
 	 * What is presumably a bug in Gtk < 2.4 causes things to get all confused
@@ -975,7 +985,7 @@
 		gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_SAVED, pixbuf, _("Saved..."), NULL, NULL);
 		if (pixbuf)	g_object_unref(G_OBJECT(pixbuf));
 
-//		gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
+		gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
 		status_menu_refresh_iter(status_box);
 
 	} else {
@@ -1177,7 +1187,7 @@
 static void
 toggled_cb(GtkWidget *widget, GtkGaimStatusBox *box)
 {
-//	gtk_combo_box_popup(GTK_COMBO_BOX(box));
+	gtk_combo_box_popup(GTK_COMBO_BOX(box));
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(box->toggle_button), FALSE);
 }
 
@@ -1262,9 +1272,9 @@
 
 	status_box->store = gtk_list_store_new(NUM_COLUMNS, G_TYPE_INT, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER);
 	status_box->dropdown_store = gtk_list_store_new(NUM_COLUMNS, G_TYPE_INT, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER);
-//	gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
+	gtk_combo_box_set_model(GTK_COMBO_BOX(status_box), GTK_TREE_MODEL(status_box->dropdown_store));
 	gtk_cell_view_set_model(GTK_CELL_VIEW(status_box->cell_view), GTK_TREE_MODEL(status_box->store));
-//	gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(status_box), 0);
+	gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(status_box), 0);
 	gtk_list_store_append(status_box->store, &(status_box->iter));
 
 	gtk_container_add(GTK_CONTAINER(status_box->toggle_button), status_box->hbox);
@@ -1278,20 +1288,20 @@
 
 	text_rend = gtk_cell_renderer_text_new();
 	icon_rend = gtk_cell_renderer_pixbuf_new();
-//	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box), icon_rend, FALSE);
-//	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box), text_rend, TRUE);
-//	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(status_box), icon_rend, "pixbuf", ICON_COLUMN, NULL);
-//	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(status_box), text_rend, "markup", TEXT_COLUMN, NULL);
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box), icon_rend, FALSE);
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box), text_rend, TRUE);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(status_box), icon_rend, "pixbuf", ICON_COLUMN, NULL);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(status_box), text_rend, "markup", TEXT_COLUMN, NULL);
 #if GTK_CHECK_VERSION(2, 6, 0)
 	g_object_set(text_rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
 #endif
 
 	status_box->icon_rend = gtk_cell_renderer_pixbuf_new();
 	status_box->text_rend = gtk_cell_renderer_text_new();
-//	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box->cell_view), status_box->icon_rend, FALSE);
-//	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box->cell_view), status_box->text_rend, TRUE);
-//	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(status_box->cell_view), status_box->icon_rend, "pixbuf", ICON_COLUMN, NULL);
-//	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(status_box->cell_view), status_box->text_rend, "markup", TEXT_COLUMN, NULL);
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box->cell_view), status_box->icon_rend, FALSE);
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(status_box->cell_view), status_box->text_rend, TRUE);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(status_box->cell_view), status_box->icon_rend, "pixbuf", ICON_COLUMN, NULL);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(status_box->cell_view), status_box->text_rend, "markup", TEXT_COLUMN, NULL);
 #if GTK_CHECK_VERSION(2, 6, 0)
 	g_object_set(status_box->text_rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
 #endif
@@ -1331,7 +1341,7 @@
 					G_CALLBACK(imhtml_scroll_event_cb), status_box->imhtml);
 
 #if GTK_CHECK_VERSION(2,6,0)
-//	gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(status_box), dropdown_store_row_separator_func, NULL, NULL);
+	gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(status_box), dropdown_store_row_separator_func, NULL, NULL);
 #endif
 
 	status_box->token_status_account = check_active_accounts_for_identical_statuses();
@@ -1366,7 +1376,7 @@
 								 GtkRequisition *requisition)
 {
 	GtkRequisition box_req;
-	gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->toggle_button, requisition);
+	combo_box_size_request(widget, requisition);
 	requisition->height += 3;
 
 	/* If the gtkimhtml is visible, then add some additional padding */
@@ -1428,7 +1438,7 @@
 	GtkAllocation parent_alc, box_alc, icon_alc;
 	gint border_width = GTK_CONTAINER (widget)->border_width;
 
-	gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->toggle_button, &req);
+	combo_box_size_request(widget, &req);
 
 	box_alc = *allocation;
 
@@ -1467,6 +1477,7 @@
 		gtk_widget_size_allocate(status_box->icon_box, &icon_alc);
 	}
 
+	combo_box_size_allocate(widget, &parent_alc);
 	gtk_widget_size_allocate(status_box->toggle_button, &parent_alc);
 	widget->allocation = *allocation;
 }
@@ -1500,7 +1511,7 @@
 			(* callback) (status_box->icon_box, callback_data);
 	}
 
-//	combo_box_forall(container, include_internals, callback, callback_data);
+	combo_box_forall(container, include_internals, callback, callback_data);
 }
 
 GtkWidget *
@@ -1713,8 +1724,8 @@
 	GaimSavedStatus *saved_status = NULL;
 	gboolean changed = TRUE;
 
-//	if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter))
-//		return;
+	if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter))
+		return;
 
 	gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
 					   TYPE_COLUMN, &type,
@@ -1953,8 +1964,8 @@
 
 	status_box = GTK_GAIM_STATUS_BOX(box);
 
-//	if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter))
-//		return;
+	if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter))
+		return;
 	gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
 			   TYPE_COLUMN, &type,
 			   DATA_COLUMN, &data,
--- a/gtk/gtkstatusbox.h	Mon Oct 23 19:05:14 2006 +0000
+++ b/gtk/gtkstatusbox.h	Mon Oct 23 19:43:45 2006 +0000
@@ -65,7 +65,7 @@
 
 struct _GtkGaimStatusBox
 {
-	GtkContainer parent_instance;
+	GtkComboBox parent_instance;
 
 	/**
 	 * This GtkListStore contains only one row--the currently selected status.
@@ -131,7 +131,7 @@
 
 struct _GtkGaimStatusBoxClass
 {
-	GtkContainerClass parent_class;
+	GtkComboBoxClass parent_class;
 
 	/* signals */
 	void     (* changed)          (GtkComboBox *combo_box);