changeset 6141:387221e0623f

[gaim-migrate @ 6615] make the register button behave itself also actually use the font face and size prefs, not that anyone actually uses those ;-) committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 15 Jul 2003 19:52:52 +0000
parents 04c1b0ba74eb
children 9a1c1b1764ac
files src/gtkaccount.c src/gtkconv.c src/gtkprefs.c
diffstat 3 files changed, 26 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkaccount.c	Tue Jul 15 18:39:10 2003 +0000
+++ b/src/gtkaccount.c	Tue Jul 15 19:52:52 2003 +0000
@@ -91,6 +91,7 @@
 	GtkWidget *top_vbox;
 	GtkWidget *bottom_vbox;
 	GtkWidget *ok_button;
+	GtkWidget *register_button;
 
 	/* Login Options */
 	GtkWidget *login_frame;
@@ -190,6 +191,11 @@
 	add_login_options(dialog,    dialog->top_vbox);
 	add_user_options(dialog,     dialog->top_vbox);
 	add_protocol_options(dialog, dialog->bottom_vbox);
+
+	if (dialog->prpl_info->register_user == NULL)
+		gtk_widget_hide(dialog->register_button);
+	else
+		gtk_widget_show(dialog->register_button);
 }
 
 static void
@@ -1186,15 +1192,18 @@
 	gtk_box_pack_end(GTK_BOX(main_vbox), bbox, FALSE, TRUE, 0);
 	gtk_widget_show(bbox);
 
-	if (dialog->prpl_info->register_user != NULL) {
-		/* Register button */
-		button = gtk_button_new_with_label(_("Register"));
-		gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-		gtk_widget_show(button);
+	/* Register button */
+	button = gtk_button_new_with_label(_("Register"));
+	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
+	gtk_widget_show(button);
 
-		g_signal_connect(G_OBJECT(button), "clicked",
-						 G_CALLBACK(register_account_prefs_cb), dialog);
-	}
+	g_signal_connect(G_OBJECT(button), "clicked",
+			G_CALLBACK(register_account_prefs_cb), dialog);
+
+	dialog->register_button = button;
+
+	if (dialog->prpl_info->register_user == NULL)
+		gtk_widget_hide(button);
 
 	/* Cancel button */
 	button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
--- a/src/gtkconv.c	Tue Jul 15 18:39:10 2003 +0000
+++ b/src/gtkconv.c	Tue Jul 15 19:52:52 2003 +0000
@@ -111,9 +111,6 @@
 
 } InviteBuddyInfo;
 
-char fontface[128] = { 0 };
-int fontsize = 3;
-
 static GtkWidget *invite_dialog = NULL;
 
 /* Prototypes. <-- because Paco-Paco hates this comment. */
@@ -411,7 +408,9 @@
 
 		if (gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_size")) {
 			g_snprintf(buf2, limit,
-					   "<FONT SIZE=\"%d\">%s</FONT>", fontsize, buf);
+					   "<FONT SIZE=\"%d\">%s</FONT>",
+					   gaim_prefs_get_int("/gaim/gtk/conversations/font_size"),
+					   buf);
 			strcpy(buf, buf2);
 		}
 
@@ -5226,13 +5225,15 @@
 gaim_gtkconv_update_font_face(GaimConversation *conv)
 {
 	GaimGtkConversation *gtkconv;
-	
+
 	if (!GAIM_IS_GTK_CONVERSATION(conv))
 		return;
-	
+
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
 
-	strncpy(gtkconv->fontface, fontface, 128);
+	strncpy(gtkconv->fontface,
+			gaim_prefs_get_string("/gaim/gtk/conversations/font_face"),
+			sizeof(gtkconv->fontface));
 }
 
 void
--- a/src/gtkprefs.c	Tue Jul 15 18:39:10 2003 +0000
+++ b/src/gtkprefs.c	Tue Jul 15 19:52:52 2003 +0000
@@ -697,7 +697,7 @@
 	gtk_container_add(GTK_CONTAINER(vbox), hbox);
 
 	button = prefs_checkbox(_("Use custom si_ze"),
-						   "/gaim/gtk/conversations/use_custom_font", hbox);
+						   "/gaim/gtk/conversations/use_custom_size", hbox);
 	gtk_size_group_add_widget(sg, button);
 	select = prefs_labeled_spin_button(hbox, NULL,
 									   "/gaim/gtk/conversations/font_size",