[gimp] app/text: nuke gimpfont-utils.[ch]



commit 439e8b0bf15991fa7a977b5ee841d753e7eec63c
Author: Nils Philippsen <nils redhat com>
Date:   Sat Sep 17 00:13:08 2011 +0200

    app/text: nuke gimpfont-utils.[ch]
    
    gimp_font_util_pango_font_description_to_string() isn't needed any
    longer as this was fixed long ago in pango itself (and we require a much
    higher version anyway). See Pango bug #166540 (at GNOME Bugzilla).

 app/text/Makefile.am            |    2 -
 app/text/gimpfont-utils.c       |   81 ---------------------------------------
 app/text/gimpfont-utils.h       |   35 -----------------
 app/text/gimpfontlist.c         |   29 +-------------
 app/text/gimptext-compat.c      |    4 +-
 devel-docs/app/app-sections.txt |    6 ---
 6 files changed, 2 insertions(+), 155 deletions(-)
---
diff --git a/app/text/Makefile.am b/app/text/Makefile.am
index 5edf2d5..27a4790 100644
--- a/app/text/Makefile.am
+++ b/app/text/Makefile.am
@@ -22,8 +22,6 @@ libapptext_a_sources = \
 	gimp-fonts.h			\
 	gimpfont.c			\
 	gimpfont.h			\
-	gimpfont-utils.c		\
-	gimpfont-utils.h		\
 	gimpfontlist.c			\
 	gimpfontlist.h			\
 	gimptext.c			\
diff --git a/app/text/gimpfontlist.c b/app/text/gimpfontlist.c
index 3459331..a89adde 100644
--- a/app/text/gimpfontlist.c
+++ b/app/text/gimpfontlist.c
@@ -31,7 +31,6 @@
 #include "text-types.h"
 
 #include "gimpfont.h"
-#include "gimpfont-utils.h"
 #include "gimpfontlist.h"
 
 #include "gimp-intl.h"
@@ -47,9 +46,6 @@
 #endif
 
 
-typedef char * (* GimpFontDescToStringFunc) (const PangoFontDescription *desc);
-
-
 static void   gimp_font_list_add_font   (GimpFontList         *list,
                                          PangoContext         *context,
                                          PangoFontDescription *desc);
@@ -61,8 +57,6 @@ static void   gimp_font_list_load_names (GimpFontList         *list,
 
 G_DEFINE_TYPE (GimpFontList, gimp_font_list, GIMP_TYPE_LIST)
 
-static GimpFontDescToStringFunc font_desc_to_string = NULL;
-
 
 static void
 gimp_font_list_class_init (GimpFontListClass *klass)
@@ -102,27 +96,6 @@ gimp_font_list_restore (GimpFontList *list)
 
   g_return_if_fail (GIMP_IS_FONT_LIST (list));
 
-  if (font_desc_to_string == NULL)
-    {
-      PangoFontDescription *desc;
-      gchar                *name;
-      gchar                 last_char;
-
-      desc = pango_font_description_new ();
-      pango_font_description_set_family (desc, "Wilber 12");
-
-      name = pango_font_description_to_string (desc);
-      last_char = name[strlen (name) - 1];
-
-      g_free (name);
-      pango_font_description_free (desc);
-
-      if (last_char != ',')
-        font_desc_to_string = &gimp_font_util_pango_font_description_to_string;
-      else
-        font_desc_to_string = &pango_font_description_to_string;
-    }
-
   fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT);
   if (! fontmap)
     g_error ("You are using a Pango that has been built against a cairo "
@@ -153,7 +126,7 @@ gimp_font_list_add_font (GimpFontList         *list,
   if (! desc)
     return;
 
-  name = font_desc_to_string (desc);
+  name = pango_font_description_to_string (desc);
 
   if (g_utf8_validate (name, -1, NULL))
     {
diff --git a/app/text/gimptext-compat.c b/app/text/gimptext-compat.c
index 1faee01..0dbdc93 100644
--- a/app/text/gimptext-compat.c
+++ b/app/text/gimptext-compat.c
@@ -36,8 +36,6 @@
 #include "core/gimpimage-undo.h"
 #include "core/gimplayer-floating-sel.h"
 
-#include "gimpfont-utils.h"
-
 #include "gimptext.h"
 #include "gimptext-compat.h"
 #include "gimptextlayer.h"
@@ -78,7 +76,7 @@ text_render (GimpImage    *image,
   size = PANGO_PIXELS (pango_font_description_get_size (desc));
 
   pango_font_description_unset_fields (desc, PANGO_FONT_MASK_SIZE);
-  font = gimp_font_util_pango_font_description_to_string (desc);
+  font = pango_font_description_to_string (desc);
 
   pango_font_description_free (desc);
 
diff --git a/devel-docs/app/app-sections.txt b/devel-docs/app/app-sections.txt
index 2321f78..9e3bda1 100644
--- a/devel-docs/app/app-sections.txt
+++ b/devel-docs/app/app-sections.txt
@@ -4232,12 +4232,6 @@ GIMP_FONT_GET_CLASS
 </SECTION>
 
 <SECTION>
-<FILE>gimpfont-utils</FILE>
-<TITLE>GimpFont-utils</TITLE>
-gimp_font_util_pango_font_description_to_string
-</SECTION>
-
-<SECTION>
 <FILE>gimpfontlist</FILE>
 <TITLE>GimpFontList</TITLE>
 GimpFontList



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