[balsa/gtk3] More GtkStock deprecation cleanup



commit 3299ab5b6219949cc8e48322c21589bd6f2c2410
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Jul 18 17:14:13 2013 -0400

    More GtkStock deprecation cleanup
    
        * configure.ac: to build, we must drop -DGDK_MULTIHEAD_SAFE.
        * libbalsa/files.c (libbalsa_icon_finder):
        gtk_icon_size_lookup_for_settings is deprecated for
        gtk_icon_size_lookup.
        * src/balsa-index.c (balsa_index_set_column_widths): ditto.
        * src/balsa-app.c (balsa_stock_button_with_label):
        gtk_image_new_from_stock is deprecated for
        gtk_image_new_from_icon_name.

 ChangeLog         |   13 +++++++++++++
 configure.ac      |    1 -
 libbalsa/files.c  |    6 +-----
 src/balsa-app.c   |    3 ++-
 src/balsa-index.c |    7 +------
 5 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 521a203..eb007db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2013-07-18  Peter Bloomfield
 
+       More GtkStock deprecation cleanup
+
+       * configure.ac: to build, we must drop -DGDK_MULTIHEAD_SAFE.
+       * libbalsa/files.c (libbalsa_icon_finder):
+       gtk_icon_size_lookup_for_settings is deprecated for
+       gtk_icon_size_lookup.
+       * src/balsa-index.c (balsa_index_set_column_widths): ditto.
+       * src/balsa-app.c (balsa_stock_button_with_label):
+       gtk_image_new_from_stock is deprecated for
+       gtk_image_new_from_icon_name.
+
+2013-07-18  Peter Bloomfield
+
        Clean up deprecation of stock icons
 
        * libbalsa/html.c (lbh_info_bar), (lbh_show_info_bar):
diff --git a/configure.ac b/configure.ac
index 624ffc6..5379b85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -901,7 +901,6 @@ if test -d "${srcdir}/.git" ; then
 -DGDK_DISABLE_DEPRECATED \
 -DGDK_PIXBUF_DISABLE_DEPRECATED \
 -DGDK_MULTIDEVICE_SAFE \
--DGDK_MULTIHEAD_SAFE \
 -DGMIME_DISABLE_DEPRECATED \
 -DGNOME_DISABLE_DEPRECATED \
 -DGNOME_DISABLE_DEPRECATED_SOURCE \
diff --git a/libbalsa/files.c b/libbalsa/files.c
index b6b8d57..06fd1b0 100644
--- a/libbalsa/files.c
+++ b/libbalsa/files.c
@@ -139,12 +139,8 @@ libbalsa_icon_finder(GtkWidget         * widget,
     GdkPixbuf *pixbuf = NULL;
     gint width, height;
     GtkIconTheme *icon_theme;
-    GtkSettings *settings;
 
-    settings = widget ? gtk_widget_get_settings(widget) : NULL;
-    if (!settings
-        || !gtk_icon_size_lookup_for_settings(settings, size,
-                                              &width, &height))
+    if (!gtk_icon_size_lookup(size, &width, &height))
         width = height = 16;
 
     if (mime_type)
diff --git a/src/balsa-app.c b/src/balsa-app.c
index dbff7b9..b9d501d 100644
--- a/src/balsa-app.c
+++ b/src/balsa-app.c
@@ -584,7 +584,8 @@ GtkWidget *
 balsa_stock_button_with_label(const char *icon, const char *text)
 {
     GtkWidget *button;
-    GtkWidget *pixmap = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_BUTTON);
+    GtkWidget *pixmap =
+        gtk_image_new_from_icon_name(icon, GTK_ICON_SIZE_BUTTON);
     GtkWidget *align = gtk_alignment_new(0.5, 0.5, 0, 0);
     GtkWidget *hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
 
diff --git a/src/balsa-index.c b/src/balsa-index.c
index fa6b143..6bf31f4 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -1319,8 +1319,6 @@ balsa_index_set_column_widths(BalsaIndex * index)
 {
     GtkTreeView *tree_view = GTK_TREE_VIEW(index);
     gint icon_w;
-    GdkScreen *screen;
-    GtkSettings *settings;
 
 #if defined(TREE_VIEW_FIXED_HEIGHT)
     /* so that fixed width works properly */
@@ -1330,10 +1328,7 @@ balsa_index_set_column_widths(BalsaIndex * index)
 #endif
     /* I have no idea why we must add 5 pixels to the icon width - otherwise,
        the icon will be clipped... */
-    screen = gtk_widget_get_screen(GTK_WIDGET(index));
-    settings = gtk_settings_get_for_screen(screen);
-    gtk_icon_size_lookup_for_settings(settings, GTK_ICON_SIZE_MENU,
-                                      &icon_w, NULL);
+    gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &icon_w, NULL);
     gtk_tree_view_column_set_fixed_width(gtk_tree_view_get_column
                                          (tree_view, LB_MBOX_MARKED_COL),
                                          icon_w + 5);


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