Skip to content
Browse files

Always select current editor font when showing the font dialog

Previously, choosing another font and then pressing cancel would keep
the font selected rather than resetting it to the current editor font
because the dialog is not destroyed between showings.
  • Loading branch information...
1 parent 9d7ff79 commit 4e5a7231bf5f7c739b0bc1cd8d55e771cebf7758 @codebrainz codebrainz committed Jun 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/dialogs.c
View
4 src/dialogs.c
@@ -922,10 +922,10 @@ void dialogs_show_open_font()
g_signal_connect(GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel)->apply_button,
"clicked", G_CALLBACK(on_font_apply_button_clicked), NULL);
- gtk_font_selection_dialog_set_font_name(
- GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel), interface_prefs.editor_font);
gtk_window_set_transient_for(GTK_WINDOW(ui_widgets.open_fontsel), GTK_WINDOW(main_widgets.window));
}
+ gtk_font_selection_dialog_set_font_name(
+ GTK_FONT_SELECTION_DIALOG(ui_widgets.open_fontsel), interface_prefs.editor_font);
/* We make sure the dialog is visible. */
gtk_window_present(GTK_WINDOW(ui_widgets.open_fontsel));
#endif

0 comments on commit 4e5a723

Please sign in to comment.
Something went wrong with that request. Please try again.