[gnome-software] Allow a GsApp to have text to use when the package is not available
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Allow a GsApp to have text to use when the package is not available
- Date: Wed, 16 Oct 2013 13:25:15 +0000 (UTC)
commit 06fb64272e3205b7eedc1c421923b3f58eb34a4d
Author: Richard Hughes <richard hughsie com>
Date: Wed Oct 16 14:05:09 2013 +0100
Allow a GsApp to have text to use when the package is not available
src/gs-app.c | 25 +++++++++++++++++++++++++
src/gs-app.h | 3 +++
2 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 06cae2c..62c7645 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -60,6 +60,7 @@ struct GsAppPrivate
gchar *version;
gchar *version_ui;
gchar *summary;
+ gchar *summary_missing;
gchar *description;
GPtrArray *screenshots;
GPtrArray *categories;
@@ -203,6 +204,8 @@ gs_app_to_string (GsApp *app)
g_string_append_printf (str, "\turl:\t%s\n", priv->url);
if (priv->licence != NULL)
g_string_append_printf (str, "\tlicence:\t%s\n", priv->licence);
+ if (priv->summary_missing != NULL)
+ g_string_append_printf (str, "\tsummary-missing:\t%s\n", priv->summary_missing);
if (priv->menu_path != NULL)
g_string_append_printf (str, "\tmenu-path:\t%s\n", priv->menu_path);
if (priv->rating != -1)
@@ -776,6 +779,27 @@ gs_app_set_licence (GsApp *app, const gchar *licence)
}
/**
+ * gs_app_get_summary_missing:
+ */
+const gchar *
+gs_app_get_summary_missing (GsApp *app)
+{
+ g_return_val_if_fail (GS_IS_APP (app), NULL);
+ return app->priv->summary_missing;
+}
+
+/**
+ * gs_app_set_summary_missing:
+ */
+void
+gs_app_set_summary_missing (GsApp *app, const gchar *summary_missing)
+{
+ g_return_if_fail (GS_IS_APP (app));
+ g_free (app->priv->summary_missing);
+ app->priv->summary_missing = g_strdup (summary_missing);
+}
+
+/**
* gs_app_get_menu_path:
*/
const gchar *
@@ -1291,6 +1315,7 @@ gs_app_finalize (GObject *object)
g_free (priv->version);
g_free (priv->version_ui);
g_free (priv->summary);
+ g_free (priv->summary_missing);
g_free (priv->description);
g_ptr_array_unref (priv->screenshots);
g_free (priv->update_version);
diff --git a/src/gs-app.h b/src/gs-app.h
index ec129f4..a10afd2 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -110,6 +110,9 @@ void gs_app_set_version (GsApp *app,
const gchar *gs_app_get_summary (GsApp *app);
void gs_app_set_summary (GsApp *app,
const gchar *summary);
+const gchar *gs_app_get_summary_missing (GsApp *app);
+void gs_app_set_summary_missing (GsApp *app,
+ const gchar *missing);
const gchar *gs_app_get_description (GsApp *app);
void gs_app_set_description (GsApp *app,
const gchar *description);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]