[gtk+] Stop using gtk_icon_size_lookup_for_settings()



commit 7f93858cccbd33f1bae98f107d9665a91e0ec58d
Author: Benjamin Otte <otte redhat com>
Date:   Tue Dec 1 20:12:45 2015 +0100

    Stop using gtk_icon_size_lookup_for_settings()
    
    Use the equivalent gtk_icon_size_lookup() instead.

 gtk/deprecated/gtkiconfactory.c |    4 +---
 gtk/gtkdnd-quartz.c             |   10 ++--------
 2 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gtk/deprecated/gtkiconfactory.c b/gtk/deprecated/gtkiconfactory.c
index 21425bf..2a259ef 100644
--- a/gtk/deprecated/gtkiconfactory.c
+++ b/gtk/deprecated/gtkiconfactory.c
@@ -1277,16 +1277,14 @@ render_icon_name_pixbuf (GtkIconSource    *icon_source,
   GtkIconSource tmp_source;
   GdkScreen *screen;
   GtkIconTheme *icon_theme;
-  GtkSettings *settings;
   gint width, height, pixel_size;
   gint *sizes, *s, dist;
   GError *error = NULL;
 
   screen = gtk_style_context_get_screen (context);
   icon_theme = gtk_icon_theme_get_for_screen (screen);
-  settings = gtk_settings_get_for_screen (screen);
 
-  if (!gtk_icon_size_lookup_for_settings (settings, size, &width, &height))
+  if (!gtk_icon_size_lookup (size, &width, &height))
     {
       if (size == (GtkIconSize)-1)
        {
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index 7505482..08240b0 100644
--- a/gtk/gtkdnd-quartz.c
+++ b/gtk/gtkdnd-quartz.c
@@ -1595,7 +1595,6 @@ gtk_drag_set_icon_name (GdkDragContext *context,
                        gint            hot_y)
 {
   GdkScreen *screen;
-  GtkSettings *settings;
   GtkIconTheme *icon_theme;
   GdkPixbuf *pixbuf;
   gint width, height, icon_size;
@@ -1606,13 +1605,8 @@ gtk_drag_set_icon_name (GdkDragContext *context,
   screen = gdk_window_get_screen (gdk_drag_context_get_source_window (context));
   g_return_if_fail (screen != NULL);
 
-  settings = gtk_settings_get_for_screen (screen);
-  if (gtk_icon_size_lookup_for_settings (settings,
-                                        GTK_ICON_SIZE_DND,
-                                        &width, &height))
-    icon_size = MAX (width, height);
-  else 
-    icon_size = 32; /* default value for GTK_ICON_SIZE_DND */ 
+  gtk_icon_size_lookup (GTK_ICON_SIZE_DND, &width, &height);
+  icon_size = MAX (width, height);
 
   icon_theme = gtk_icon_theme_get_for_screen (screen);
 


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