[gnome-packagekit] Do not use the deprecated gtk_icon_size_lookup_for_settings()
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Do not use the deprecated gtk_icon_size_lookup_for_settings()
- Date: Fri, 23 Aug 2013 08:08:24 +0000 (UTC)
commit c17cf32f3ee05daaab180119dcae5aa0b7b95cca
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 16 12:18:25 2013 +0100
Do not use the deprecated gtk_icon_size_lookup_for_settings()
src/gpk-animated-icon.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/gpk-animated-icon.c b/src/gpk-animated-icon.c
index 496785b..b8fa29a 100644
--- a/src/gpk-animated-icon.c
+++ b/src/gpk-animated-icon.c
@@ -81,12 +81,11 @@ gpk_animated_icon_set_icon_name (GpkAnimatedIcon *icon, GtkIconSize size, const
gboolean
gpk_animated_icon_set_filename_tile (GpkAnimatedIcon *icon, GtkIconSize size, const gchar *name)
{
+ gboolean ret;
gint w, h;
gint rows, cols;
gint r, c, i;
GdkPixbuf *pixbuf;
- GdkScreen *screen;
- GtkSettings *settings;
g_return_val_if_fail (GPK_IS_ANIMATED_ICON (icon), FALSE);
g_return_val_if_fail (name != NULL, FALSE);
@@ -110,9 +109,11 @@ gpk_animated_icon_set_filename_tile (GpkAnimatedIcon *icon, GtkIconSize size, co
}
g_debug ("loading from %s", name);
- screen = gdk_screen_get_default ();
- settings = gtk_settings_get_for_screen (screen);
- gtk_icon_size_lookup_for_settings (settings, size, &w, &h);
+ ret = gtk_icon_size_lookup (size, &w, &h);
+ if (!ret) {
+ g_warning ("Can't get icon size info");
+ return FALSE;
+ }
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), name, w, 0, NULL);
/* can't load from gnome-icon-theme */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]