| 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 |