aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@canonical.com>2013-12-20 11:30:44 +0000
committerColin Watson <cjwatson@canonical.com>2013-12-20 11:30:44 +0000
commita1e53835ca8e1d0d18bc9f79cfe4baec2f9edf1d (patch)
tree3193f4935cf8886dc5683f8ded00c1d2a5f352e7
parentf6b60f14c68216d8db69b30da26f3f2bee6a7675 (diff)
downloadlibayatana-indicator-a1e53835ca8e1d0d18bc9f79cfe4baec2f9edf1d.tar.gz
libayatana-indicator-a1e53835ca8e1d0d18bc9f79cfe4baec2f9edf1d.tar.bz2
libayatana-indicator-a1e53835ca8e1d0d18bc9f79cfe4baec2f9edf1d.zip
Use named icons rather than (deprecated) stock items.
-rw-r--r--libindicator/indicator-image-helper.c4
-rw-r--r--libindicator/indicator-ng.c2
-rw-r--r--tests/test-indicator-ng.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/libindicator/indicator-image-helper.c b/libindicator/indicator-image-helper.c
index 9f48895..28a6c92 100644
--- a/libindicator/indicator-image-helper.c
+++ b/libindicator/indicator-image-helper.c
@@ -65,7 +65,7 @@ refresh_image (GtkImage * image)
if (icon_filename == NULL && !G_IS_BYTES_ICON (icon_names)) {
/* show a broken image if we don't have a filename or image data */
- gtk_image_set_from_stock (image, GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_LARGE_TOOLBAR);
+ gtk_image_set_from_icon_name (image, "image-missing", GTK_ICON_SIZE_LARGE_TOOLBAR);
return;
}
@@ -115,7 +115,7 @@ refresh_image (GtkImage * image)
gtk_image_set_from_pixbuf(image, pixbuf);
g_object_unref(G_OBJECT(pixbuf));
} else {
- gtk_image_set_from_stock (image, GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_LARGE_TOOLBAR);
+ gtk_image_set_from_icon_name (image, "image-missing", GTK_ICON_SIZE_LARGE_TOOLBAR);
}
if (icon_info != NULL) {
diff --git a/libindicator/indicator-ng.c b/libindicator/indicator-ng.c
index 507f979..c7a4899 100644
--- a/libindicator/indicator-ng.c
+++ b/libindicator/indicator-ng.c
@@ -252,7 +252,7 @@ indicator_ng_set_icon_from_variant (IndicatorNg *self,
{
gchar *text = g_variant_print (variant, TRUE);
g_warning ("invalid icon variant '%s'", text);
- gtk_image_set_from_stock (self->entry.image, GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_LARGE_TOOLBAR);
+ gtk_image_set_from_icon_name (self->entry.image, "image-missing", GTK_ICON_SIZE_LARGE_TOOLBAR);
g_free (text);
}
}
diff --git a/tests/test-indicator-ng.c b/tests/test-indicator-ng.c
index cf1f59a..296e00b 100644
--- a/tests/test-indicator-ng.c
+++ b/tests/test-indicator-ng.c
@@ -148,7 +148,7 @@ test_menu (void)
g_assert_cmpstr (entry->name_hint, ==, "indicator-test");
g_assert_cmpstr (entry->accessible_desc, ==, "Test indicator");
g_assert_cmpstr (gtk_label_get_label (entry->label), ==, "Test");
- g_assert (gtk_image_get_storage_type (entry->image) == GTK_IMAGE_STOCK);
+ g_assert (gtk_image_get_storage_type (entry->image) == GTK_IMAGE_ICON_NAME);
{
GList *children;
GtkMenuItem *item;