[geany/geany] 7d0ade: Use GtkFontChooserDialog on GTK >= 3.2 for consistency
Colomban Wendling
git-noreply at xxxxx
Sun Mar 10 16:23:36 UTC 2013
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Tue, 09 Oct 2012 11:25:12 UTC
Commit: 7d0adef31b60b4b7d042d708754d01caffdf7e4f
https://github.com/geany/geany/commit/7d0adef31b60b4b7d042d708754d01caffdf7e4f
Log Message:
-----------
Use GtkFontChooserDialog on GTK >= 3.2 for consistency
GtkFontButton uses GtkFontChooserDialog on GTK 3.2 so the UI is more
consistent if we use it explicitly too, and GtkFontSelectionDialog
is somewhat broken on 3.4.
Modified Paths:
--------------
src/dialogs.c
Modified: src/dialogs.c
14 files changed, 14 insertions(+), 0 deletions(-)
===================================================================
@@ -866,6 +866,20 @@ gboolean dialogs_show_unsaved_file(GeanyDocument *doc)
#ifndef G_OS_WIN32
+/* Use GtkFontChooserDialog on GTK3.2 for consistency, and because
+ * GtkFontSelectionDialog is somewhat broken on 3.4 */
+#if GTK_CHECK_VERSION(3, 0, 0)
+# undef GTK_FONT_SELECTION_DIALOG
+# define GTK_FONT_SELECTION_DIALOG GTK_FONT_CHOOSER_DIALOG
+
+# define gtk_font_selection_dialog_new(title) \
+ gtk_font_chooser_dialog_new((title), NULL)
+# define gtk_font_selection_dialog_get_font_name(dlg) \
+ gtk_font_chooser_get_font(GTK_FONT_CHOOSER(dlg))
+# define gtk_font_selection_dialog_set_font_name(dlg, font) \
+ gtk_font_chooser_set_font(GTK_FONT_CHOOSER(dlg), (font))
+#endif
+
static void
on_font_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
{
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list