Updating branch refs/heads/master
         to f3509117abbea85cbf65506c47a8430eb5392db0 (commit)
       from d155b3f066fc6dcc30074680b14a2a5711d716c8 (commit)

commit f3509117abbea85cbf65506c47a8430eb5392db0
Author: Mike Massonnet <[email protected]>
Date:   Mon Mar 4 09:58:47 2013 +0100

    gtk3: Use FontChooser instead of FontSelection
    
    FontSelection is deprecated in GTK+3.
    
    NB: the code is actually not used, may be useful for giving an
    option for none global font description in the future.

 lib/window.vala |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/lib/window.vala b/lib/window.vala
index d16f8b4..6d36cfe 100644
--- a/lib/window.vala
+++ b/lib/window.vala
@@ -1089,12 +1089,21 @@ namespace Xnp {
                                return;
                        var note = (Xnp.Note)(this.notebook.get_nth_page 
(page));
 
+#if ENABLE_GTK3
+                       var dialog = new Gtk.FontChooserDialog ("Choose current 
note font", this);
+                       dialog.set_font (note.text_view.font);
+#else
                        var dialog = new Gtk.FontSelectionDialog ("Choose 
current note font");
                        dialog.set_font_name (note.text_view.font);
+#endif
                        int res = dialog.run ();
                        dialog.hide ();
                        if (res == Gtk.ResponseType.OK) {
+#if ENABLE_GTK3
+                               note.text_view.font = dialog.get_font ();
+#else
                                note.text_view.font = dialog.get_font_name ();
+#endif
                        }
                        dialog.destroy ();
                }
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to