Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
7078:acd2a66e59ed | 7079:5a45833dd253 |
---|---|
2660 return swid; | 2660 return swid; |
2661 } | 2661 } |
2662 | 2662 |
2663 void apply_font_dlg(GtkWidget *w, GtkWidget *f) | 2663 void apply_font_dlg(GtkWidget *w, GtkWidget *f) |
2664 { | 2664 { |
2665 char *fontname, *c; | 2665 char *fontname, *space; |
2666 | 2666 |
2667 fontname = | 2667 fontname = |
2668 gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(f)); | 2668 gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(f)); |
2669 | 2669 |
2670 destroy_fontsel(0, 0); | 2670 destroy_fontsel(0, 0); |
2671 | 2671 |
2672 for (c = fontname; *c != '\0'; c++) { | 2672 space = strrchr(fontname, ' '); |
2673 if (isdigit(*c)) { | 2673 if(space && isdigit(*(space+1))) |
2674 *(--c) = '\0'; | 2674 *space = '\0'; |
2675 break; | |
2676 } | |
2677 } | |
2678 | 2675 |
2679 gaim_prefs_set_string("/gaim/gtk/conversations/font_face", fontname); | 2676 gaim_prefs_set_string("/gaim/gtk/conversations/font_face", fontname); |
2680 | 2677 |
2681 g_free(fontname); | 2678 g_free(fontname); |
2682 | 2679 |