patch 9.1.1199: gvim uses hardcoded xpm icon file

Commit: 
https://github.com/vim/vim/commit/0adbe639a587a2a5d16de3461adfbe800dd05dd8
Author: Aurelien Gateau <m...@agateau.com>
Date:   Wed Mar 12 23:16:42 2025 +0100

    patch 9.1.1199: gvim uses hardcoded xpm icon file
    
    Problem:  Many X11/Wayland desktops support icon themes, and many themes
              provide a gvim icon, but this icon is ignored for the window
              itself because it is hardcoded in the source code.
    Solution: Read the icon from the theme instead (Aurelien Gateau).
    
    closes: #16859
    
    Signed-off-by: Aurelien Gateau <m...@agateau.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 284be3088..f9d593f91 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -2704,10 +2704,6 @@ global_event_filter(GdkXEvent *xev,
     static void
 mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
 {
-#include "../runtime/vim32x32.xpm"
-#include "../runtime/vim16x16.xpm"
-#include "../runtime/vim48x48.xpm"
-
     GdkWindow * const mainwin_win = gtk_widget_get_window(gui.mainwin);
 
     // When started with "--echo-wid" argument, write window ID on stdout.
@@ -2725,17 +2721,7 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data 
UNUSED)
        /*
         * Add an icon to the main window. For fun and convenience of the user.
         */
-       GList *icons = NULL;
-
-       icons = g_list_prepend(icons, gdk_pixbuf_new_from_xpm_data((const char 
**)vim16x16));
-       icons = g_list_prepend(icons, gdk_pixbuf_new_from_xpm_data((const char 
**)vim32x32));
-       icons = g_list_prepend(icons, gdk_pixbuf_new_from_xpm_data((const char 
**)vim48x48));
-
-       gtk_window_set_icon_list(GTK_WINDOW(gui.mainwin), icons);
-
-       // TODO: is this type cast OK?
-       g_list_foreach(icons, (GFunc)(void *)&g_object_unref, NULL);
-       g_list_free(icons);
+       gtk_window_set_icon_name(GTK_WINDOW(gui.mainwin), "gvim");
     }
 
 #if !defined(USE_GNOME_SESSION)
diff --git a/src/version.c b/src/version.c
index 265081a83..d7ded9f6f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1199,
 /**/
     1198,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1tsUaQ-006rXg-OQ%40256bit.org.

Raspunde prin e-mail lui