changeset 488:0fcb7e7a263c

[gaim-migrate @ 498] Font button stuff. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 12 Jul 2000 06:01:57 +0000
parents e1021544e257
children 6156467eaca8
files src/conversation.c src/dialogs.c
diffstat 2 files changed, 11 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Tue Jul 11 22:58:03 2000 +0000
+++ b/src/conversation.c	Wed Jul 12 06:01:57 2000 +0000
@@ -250,8 +250,8 @@
                 if (c->strike)
                         gtk_widget_set_sensitive(c->strike, ((font_options & OPT_FONT_STRIKE)) ? FALSE : TRUE);
 
-/*                if (c->font)
-                        gtk_widget_set_sensitive(c->font, ((font_options & OPT_FONT_FACE)) ? TRUE : FALSE);*/
+                if (c->font)
+                        gtk_widget_set_sensitive(c->font, ((font_options & OPT_FONT_FACE)) ? TRUE : FALSE);
 		
 		cnv = cnv->next;
 	}
@@ -312,9 +312,6 @@
 	char *pre_fontface, *old_font_face;
 	int alloc = 0;
 
-	if (!(font_options & OPT_FONT_FACE))
-		return;
-
 	if (c->current_fontface[0] && strcmp(c->current_fontface, "(null)"))
 	{
 		pre_fontface = g_strconcat("<FONT FACE=\"", c->current_fontface, "\">", '\0');
@@ -484,6 +481,11 @@
                 strcpy(buf, buf2);
         }
 
+        if (font_options & OPT_FONT_FACE) {
+                g_snprintf(buf2, BUF_LONG, "<FONT FACE=\"%s\">%s</FONT>", c->current_fontface, buf);
+                strcpy(buf, buf2);
+        }
+
 #ifdef GAIM_PLUGINS
 	{
 		GList *ca = callbacks;
@@ -542,11 +544,9 @@
 		do_im_back();
 	}
 
-	set_font_face(NULL, c);
-	
 	gtk_widget_grab_focus(c->entry);
 
-        g_free(buf2);
+	g_free(buf2);
 	g_free(buf);
 }
 
@@ -1219,9 +1219,6 @@
 						NULL, _("Font"), _("Select Font"),
 						_("Font"), font_p, GTK_SIGNAL_FUNC(toggle_font), c);
 
-	if (!(font_options & OPT_FONT_FACE))
-		gtk_widget_set_sensitive(GTK_WIDGET(font), FALSE);
-	
 	gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
 	link = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
                                             GTK_TOOLBAR_CHILD_TOGGLEBUTTON,                                                 NULL, _("Link"), _("Insert Link"),
@@ -1427,8 +1424,6 @@
 	if (fontname)
 		strncpy(c->current_fontname, fontname, sizeof(c->current_fontname));
 	
-	set_font_face(NULL, c);
-	
 	gtk_widget_show(win);
 }
 
--- a/src/dialogs.c	Tue Jul 11 22:58:03 2000 +0000
+++ b/src/dialogs.c	Wed Jul 12 06:01:57 2000 +0000
@@ -2763,6 +2763,9 @@
 		}
 		c->current_fontface[k] = '\0';
 
+		sprintf(debug_buff, "Setting font face %s\n", c->current_fontface);
+		debug_print(debug_buff);
+
 		set_font_face(NULL, c);
 	}
 	else