diff src/gtkprefs.c @ 7079:5a45833dd253

[gaim-migrate @ 7644] close 772082 committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 30 Sep 2003 20:13:22 +0000
parents 083d1e4a9c78
children f89146deac3d
line wrap: on
line diff
--- a/src/gtkprefs.c	Tue Sep 30 18:41:28 2003 +0000
+++ b/src/gtkprefs.c	Tue Sep 30 20:13:22 2003 +0000
@@ -2662,19 +2662,16 @@
 
 void apply_font_dlg(GtkWidget *w, GtkWidget *f)
 {
-	char *fontname, *c;
+	char *fontname, *space;
 
 	fontname =
 		gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(f));
 
 	destroy_fontsel(0, 0);
 
-	for (c = fontname; *c != '\0'; c++) {
-		if (isdigit(*c)) {
-			*(--c) = '\0';
-			break;
-		}
-	}
+	space = strrchr(fontname, ' ');
+	if(space && isdigit(*(space+1)))
+		*space = '\0';
 
 	gaim_prefs_set_string("/gaim/gtk/conversations/font_face", fontname);