[gnome-packagekit] New versions of GTK show image-broken when we specify an empty string
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] New versions of GTK show image-broken when we specify an empty string
- Date: Thu, 15 Dec 2011 15:54:40 +0000 (UTC)
commit 5a093bd14a2c0c9273234cbe2c0da6c1c7e73d51
Author: Richard Hughes <richard hughsie com>
Date: Thu Dec 15 15:50:03 2011 +0000
New versions of GTK show image-broken when we specify an empty string
src/gpk-cell-renderer-info.c | 2 +-
src/gpk-enum.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/gpk-cell-renderer-info.c b/src/gpk-cell-renderer-info.c
index 82f9fb9..020b8df 100644
--- a/src/gpk-cell-renderer-info.c
+++ b/src/gpk-cell-renderer-info.c
@@ -100,7 +100,7 @@ gpk_cell_renderer_info_set_property (GObject *object, guint param_id,
cru->priv->value = g_value_get_uint (value);
ret = gpk_cell_renderer_should_show (cru);
if (!ret) {
- g_object_set (cru, "icon-name", "", NULL);
+ g_object_set (cru, "icon-name", NULL, NULL);
} else {
cru->priv->icon_name = gpk_info_status_enum_to_icon_name (cru->priv->value);
g_object_set (cru, "icon-name", cru->priv->icon_name, NULL);
diff --git a/src/gpk-enum.c b/src/gpk-enum.c
index 59f8e3e..26fbf92 100644
--- a/src/gpk-enum.c
+++ b/src/gpk-enum.c
@@ -1797,7 +1797,11 @@ gpk_group_enum_to_icon_name (PkGroupEnum group)
const gchar *
gpk_restart_enum_to_icon_name (PkRestartEnum restart)
{
- return pk_enum_find_string (enum_restart_icon_name, restart);
+ const gchar *tmp;
+ tmp = pk_enum_find_string (enum_restart_icon_name, restart);
+ if (tmp[0] == '\0')
+ tmp = NULL;
+ return tmp;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]