summaryrefslogtreecommitdiffstats
path: root/system/gnome-pkgtool/no_custom_icons.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/gnome-pkgtool/no_custom_icons.patch')
-rw-r--r--system/gnome-pkgtool/no_custom_icons.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/system/gnome-pkgtool/no_custom_icons.patch b/system/gnome-pkgtool/no_custom_icons.patch
new file mode 100644
index 0000000000..34d363739a
--- /dev/null
+++ b/system/gnome-pkgtool/no_custom_icons.patch
@@ -0,0 +1,52 @@
+diff -pruN old/src/packages.c new/src/packages.c
+--- old/src/packages.c 2004-07-22 22:20:17.000000000 +0300
++++ new/src/packages.c 2021-05-16 19:12:35.881205853 +0300
+@@ -743,47 +743,7 @@ get_pixbuf_from_desktop (PkgEntry *entry
+
+ str = g_malloc (256);
+ gboolean go = TRUE;
+- while (((str = fgets (str, 255, desktop)) != NULL) && go)
+- {
+- if (fnmatch ("Icon=*", str, 0) == 0)
+- {
+- f = &str[5];
+- if (index (f, '/'))
+- {
+- if ((p = index (f, '\n')))
+- *p = '\0';
+- if (entry->pixbuf != NULL)
+- g_free (entry->pixbuf);
+- entry->pixbuf = gdk_pixbuf_new_from_file (f, NULL);
+-
+- if(entry->pixbuf)
+- {
+- go = FALSE;
+- }
+- }
+- else
+- {
+- if ((p = index (f, '\n')))
+- *p = '\0';
+- p = index (f, '.');
+-
+- if(p && (strcmp (".png", p) == 0))
+- *p = '\0';
+- else if(p && (strcmp (".gif", p) == 0))
+- *p = '\0';
+- else if(p && (strcmp (".xpm", p) == 0))
+- *p = '\0';
+- if (entry->pixbuf != NULL)
+- g_free (entry->pixbuf);
+-
+- entry->pixbuf =
+- gtk_icon_theme_load_icon (gtk_icon_theme_get_default(),
+- f, 48, 0, NULL);
+- go = FALSE;
+- }
+- }
+- }
+-
++
+ g_free (str);
+ fclose (desktop);
+