diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-09 19:05:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-09 19:05:13 +0200 |
commit | 81a4cf469a0f5c1603ac3130af9f011053854180 (patch) | |
tree | 3c0578bddf565bd5a66e71ac9990a76aa281615e /src/gui_gtk_x11.c | |
parent | ba7c0d7b4ce03336b4aebe1959c1a8342fa6dbd4 (diff) | |
download | vim-git-81a4cf469a0f5c1603ac3130af9f011053854180.tar.gz |
patch 8.2.1645: GTK3: icons become broken images when resizedv8.2.1645
Problem: GTK3: icons become broken images when resized.
Solution: Use gtk_image_new_from_icon_name(). (closes #6916)
Fix compiler warnings.
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r-- | src/gui_gtk_x11.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 341db3d5a..fe1ac5878 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -2555,7 +2555,8 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED) gtk_window_set_icon_list(GTK_WINDOW(gui.mainwin), icons); - g_list_foreach(icons, (GFunc)&g_object_unref, NULL); + // TODO: is this type cast OK? + g_list_foreach(icons, (GFunc)(void *)&g_object_unref, NULL); g_list_free(icons); } @@ -3092,8 +3093,8 @@ icon_size_changed_foreach(GtkWidget *widget, gpointer user_data) const gchar *icon_name; gtk_image_get_icon_name(image, &icon_name, NULL); - - gtk_image_set_from_icon_name(image, icon_name, icon_size); + image = (GtkImage *)gtk_image_new_from_icon_name( + icon_name, icon_size); } # else // User-defined icons are stored in a GtkIconSet @@ -4967,7 +4968,8 @@ ascii_glyph_table_init(void) } } - g_list_foreach(item_list, (GFunc)&pango_item_free, NULL); + // TODO: is this type cast OK? + g_list_foreach(item_list, (GFunc)(void *)&pango_item_free, NULL); g_list_free(item_list); pango_attr_list_unref(attr_list); } |