[gnome-software] Use the translated name and summary rather than hardcoding the feature strings



commit e999c4b14848cac0d2ff1bede7a1a7aac66ff8e4
Author: Richard Hughes <richard hughsie com>
Date:   Mon Sep 9 21:53:20 2013 +0100

    Use the translated name and summary rather than hardcoding the feature strings

 data/featured.ini                          |    6 ------
 src/gs-feature-tile.c                      |    6 ++----
 src/plugins/gs-plugin-hardcoded-featured.c |   10 ----------
 3 files changed, 2 insertions(+), 20 deletions(-)
---
diff --git a/data/featured.ini b/data/featured.ini
index b56bd3c..afec169 100644
--- a/data/featured.ini
+++ b/data/featured.ini
@@ -1,7 +1,5 @@
 [darktable]
 image=featured-darktable.png
-title=Darktable
-subtitle=Organize and develop images from digital cameras
 gradient1=#393d39
 gradient2=#5a5e58
 stroke=#1f2122
@@ -9,8 +7,6 @@ text=#ffffff
 
 [gimp]
 image=featured-gimp.png
-title=GNU Image Manipulation Program
-subtitle=Create images and edit still photographs
 gradient1=#8ac674
 gradient2=#cbddc3
 stroke=#2a6c10
@@ -18,8 +14,6 @@ text=#000000
 
 [mypaint]
 image=featured-mypaint.png
-title=Mypaint
-subtitle=Painting programs for digital artists
 gradient1=#8fa5d9
 gradient2=#d8e0ef
 stroke=#4c52aa
diff --git a/src/gs-feature-tile.c b/src/gs-feature-tile.c
index 7007e89..d281267 100644
--- a/src/gs-feature-tile.c
+++ b/src/gs-feature-tile.c
@@ -72,10 +72,8 @@ gs_feature_tile_set_app (GsFeatureTile *tile, GsApp *app)
 
         gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image),
                                    gs_app_get_featured_pixbuf (priv->app));
-        gtk_label_set_label (GTK_LABEL (priv->title),
-                             gs_app_get_metadata_item (app, "Featured::title"));
-        gtk_label_set_label (GTK_LABEL (priv->subtitle),
-                             gs_app_get_metadata_item (app, "Featured::subtitle"));
+        gtk_label_set_label (GTK_LABEL (priv->title), gs_app_get_name (app));
+        gtk_label_set_label (GTK_LABEL (priv->subtitle), gs_app_get_summary (app));
         data = g_strdup_printf (
                 ".button.featured-tile {\n"
                 "  padding: 0;\n"
diff --git a/src/plugins/gs-plugin-hardcoded-featured.c b/src/plugins/gs-plugin-hardcoded-featured.c
index 25633fd..8d0bce9 100644
--- a/src/plugins/gs-plugin-hardcoded-featured.c
+++ b/src/plugins/gs-plugin-hardcoded-featured.c
@@ -103,16 +103,6 @@ gs_plugin_add_featured (GsPlugin *plugin,
         app = gs_app_new (apps[i]);
        gs_app_set_featured_pixbuf (app, pixbuf);
         gs_app_set_metadata (app, "Featured::image-path", path);
-        s = g_key_file_get_locale_string (kf, group, "title", NULL, NULL);
-        if (s) {
-                gs_app_set_metadata (app, "Featured::title", s);
-                g_free (s);
-        }
-        s = g_key_file_get_locale_string (kf, group, "subtitle", NULL, NULL);
-        if (s) {
-                gs_app_set_metadata (app, "Featured::subtitle", s);
-                g_free (s);
-        }
         s = g_key_file_get_string (kf, group, "gradient1", NULL);
         if (s) {
                 gs_app_set_metadata (app, "Featured::gradient1-color", s);


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