mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
5b64c1e3e0
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
52 lines
1.6 KiB
Diff
52 lines
1.6 KiB
Diff
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);
|
|
|