[gtk+] [GtkFontSel] Remove GdkFont "font" deprecated property



commit 418d84f3114548381ca86745d54fad2d7be8cc98
Author: Javier Jardón <jjardon gnome org>
Date:   Thu Jun 24 23:04:46 2010 +0200

    [GtkFontSel] Remove GdkFont "font" deprecated property

 gtk/gtkfontsel.c |   32 --------------------------------
 gtk/gtkfontsel.h |    4 ----
 2 files changed, 0 insertions(+), 36 deletions(-)
---
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index cf4108c..9e4daab 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -97,7 +97,6 @@ static const guint16 font_sizes[] = {
 enum {
    PROP_0,
    PROP_FONT_NAME,
-   PROP_FONT,
    PROP_PREVIEW_TEXT
 };
 
@@ -164,7 +163,6 @@ static void     gtk_font_selection_scroll_to_selection   (GtkFontSelection *font
 static void    gtk_font_selection_load_font          (GtkFontSelection *fs);
 static void    gtk_font_selection_update_preview     (GtkFontSelection *fs);
 
-static GdkFont* gtk_font_selection_get_font_internal (GtkFontSelection *fontsel);
 static PangoFontDescription *gtk_font_selection_get_font_description (GtkFontSelection *fontsel);
 static gboolean gtk_font_selection_select_font_desc  (GtkFontSelection      *fontsel,
 						      PangoFontDescription  *new_desc,
@@ -198,13 +196,6 @@ gtk_font_selection_class_init (GtkFontSelectionClass *klass)
                                                         DEFAULT_FONT_NAME,
                                                         GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
-				   PROP_FONT,
-				   g_param_spec_boxed ("font",
-						       P_("Font"),
-						       P_("The GdkFont that is currently selected"),
-						       GDK_TYPE_FONT,
-						       GTK_PARAM_READABLE));
-  g_object_class_install_property (gobject_class,
                                    PROP_PREVIEW_TEXT,
                                    g_param_spec_string ("preview-text",
                                                         P_("Preview text"),
@@ -252,9 +243,6 @@ static void gtk_font_selection_get_property (GObject         *object,
     case PROP_FONT_NAME:
       g_value_take_string (value, gtk_font_selection_get_font_name (fontsel));
       break;
-    case PROP_FONT:
-      g_value_set_boxed (value, gtk_font_selection_get_font_internal (fontsel));
-      break;
     case PROP_PREVIEW_TEXT:
       g_value_set_string (value, gtk_font_selection_get_preview_text (fontsel));
       break;
@@ -578,9 +566,6 @@ gtk_font_selection_finalize (GObject *object)
   
   fontsel = GTK_FONT_SELECTION (object);
 
-  if (fontsel->font)
-    gdk_font_unref (fontsel->font);
-
   gtk_font_selection_ref_family (fontsel, NULL);
   gtk_font_selection_ref_face (fontsel, NULL);
 
@@ -1106,10 +1091,6 @@ gtk_font_selection_select_size (GtkTreeSelection *selection,
 static void
 gtk_font_selection_load_font (GtkFontSelection *fontsel)
 {
-  if (fontsel->font)
-    gdk_font_unref (fontsel->font);
-  fontsel->font = NULL;
-
   gtk_font_selection_update_preview (fontsel);
 }
 
@@ -1167,19 +1148,6 @@ gtk_font_selection_update_preview (GtkFontSelection *fontsel)
   gtk_editable_set_position (GTK_EDITABLE (preview_entry), 0);
 }
 
-static GdkFont*
-gtk_font_selection_get_font_internal (GtkFontSelection *fontsel)
-{
-  if (!fontsel->font)
-    {
-      PangoFontDescription *font_desc = gtk_font_selection_get_font_description (fontsel);
-      fontsel->font = gdk_font_from_description_for_display (gtk_widget_get_display (GTK_WIDGET (fontsel)), font_desc);
-      pango_font_description_free (font_desc);
-    }
-  
-  return fontsel->font;
-}
-
 
 /*****************************************************************************
  * These functions are the main public interface for getting/setting the font.
diff --git a/gtk/gtkfontsel.h b/gtk/gtkfontsel.h
index 3a37f65..b62039c 100644
--- a/gtk/gtkfontsel.h
+++ b/gtk/gtkfontsel.h
@@ -83,10 +83,6 @@ struct _GtkFontSelection
   PangoFontFace *GSEAL (face);		/* Current face */
   
   gint GSEAL (size);
-  
-  GdkFont *GSEAL (font);		/* Cache for gdk_font_selection_get_font, so we can preserve
-                                         * refcounting behavior
-                                         */
 };
 
 struct _GtkFontSelectionClass



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]