changeset 3375:fb1a0caadb9f

[gaim-migrate @ 3394] A patch by Etan. A patch by Ben. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 05 Aug 2002 07:44:11 +0000
parents 3cd2fbddf95a
children 8d0fa912ecaf
files src/multi.c src/protocols/msn/msn.c
diffstat 2 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/multi.c	Mon Aug 05 07:33:09 2002 +0000
+++ b/src/multi.c	Mon Aug 05 07:44:11 2002 +0000
@@ -1075,6 +1075,7 @@
 
 struct signon_meter {
 	struct gaim_connection *gc;
+	GtkWidget *label;
 	GtkWidget *button;
 	GtkWidget *progress;
 	GtkWidget *status;
@@ -1111,6 +1112,12 @@
 	gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), 1);
 	gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1);
 	gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, "Done.");
+
+	gtk_widget_hide(meter->label);
+	gtk_widget_hide(meter->button);
+	gtk_widget_hide(meter->progress);
+	gtk_widget_hide(meter->status);
+
 	meter_win->active_count--;
 	if (meter_win->active_count == 0) {
 		gtk_widget_destroy(meter_win->window);
@@ -1234,7 +1241,6 @@
 static struct signon_meter *register_meter(struct gaim_connection *gc, GtkWidget *widget, GtkTable *table, gint *rows)
 {
 	GtkWidget *graphic;
-	GtkWidget *label;
 	GtkWidget *nest_vbox;
 	GString *name_to_print;
 	struct signon_meter *meter;
@@ -1251,8 +1257,8 @@
 	nest_vbox = gtk_vbox_new (FALSE, 0);
 	
 	name_to_print = g_string_prepend(name_to_print, "Signon: ");
-	label = gtk_label_new (name_to_print->str);
-	gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+	meter->label = gtk_label_new (name_to_print->str);
+	gtk_misc_set_alignment (GTK_MISC (meter->label), 0, 0.5);
 		
 	meter->status = gtk_statusbar_new();
 	gtk_widget_set_usize(meter->status, 250, 0);
@@ -1264,7 +1270,7 @@
 		
 	gtk_table_attach (GTK_TABLE (table), graphic, 0, 1, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
 	gtk_table_attach (GTK_TABLE (table), nest_vbox, 1, 2, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
-		gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (label), FALSE, FALSE, 0);
+		gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->label), FALSE, FALSE, 0);
 		gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->status), FALSE, FALSE, 0);
 	gtk_table_attach (GTK_TABLE (table), meter->progress, 2, 3, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
 	gtk_table_attach (GTK_TABLE (table), meter->button, 3, 4, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
--- a/src/protocols/msn/msn.c	Mon Aug 05 07:33:09 2002 +0000
+++ b/src/protocols/msn/msn.c	Mon Aug 05 07:44:11 2002 +0000
@@ -587,7 +587,9 @@
 {
 	char *cur;
 	GString *ret = g_string_new(NULL);
-	char colors[3];
+	guint colorbuf;
+	char *colors = (char *)(&colorbuf);
+	
 
 	cur = strstr(mime, "FN=");
 	if (cur && (*(cur = cur + 3) != ';')) {
@@ -611,7 +613,7 @@
 	
 	cur = strstr(mime, "CO=");
 	if (cur && (*(cur = cur + 3) != ';')) {
-		if (sscanf (cur, "%x;", (int*)(&colors)) == 1) {
+		if (sscanf (cur, "%x;", &colorbuf) == 1) {
 			char tag[MSN_BUF_LEN];
 			g_snprintf(tag, sizeof(tag), "<FONT COLOR=\"#%02hhx%02hhx%02hhx\">", colors[0], colors[1], colors[2]);
 			ret = g_string_append(ret, tag);