PKGBUILDs/community/xchat-systray-integration/default-icons.patch
2009-10-09 21:15:33 -05:00

37 lines
1.7 KiB
Diff

diff -Nur xchat-systray-integration-2.4.5.orig/src/menu.c xchat-systray-integration-2.4.5/src/menu.c
--- xchat-systray-integration-2.4.5.orig/src/menu.c 2004-04-30 12:38:10.000000000 +0000
+++ xchat-systray-integration-2.4.5/src/menu.c 2005-06-09 16:30:54.609907253 +0000
@@ -91,8 +91,8 @@
char temp[200];
if (filename)
{
- if (imagepath) sprintf(temp,"%s/Menu/%s", imagepath ,filename);
- else sprintf(temp,"%s/Menu/%s", xchat_get_info(ph, "xchatdir"),filename);
+ if (imagepath && 0 == access(imagepath, X_OK)) sprintf(temp,"%s/Menu/%s", imagepath ,filename);
+ else sprintf(temp,"/usr/share/xchat-systray-integration/Menu/%s", filename);
tempbuffer= gdk_pixbuf_new_from_file(temp,NULL);
return tempbuffer;
}
diff -Nur xchat-systray-integration-2.4.5.orig/src/systray.c xchat-systray-integration-2.4.5/src/systray.c
--- xchat-systray-integration-2.4.5.orig/src/systray.c 2004-04-30 12:38:10.000000000 +0000
+++ xchat-systray-integration-2.4.5/src/systray.c 2005-06-09 16:30:47.170967680 +0000
@@ -117,7 +117,7 @@
edit=TRUE;
go_change=TRUE;
go_identify=TRUE;
- strcpy(imagepath,xchat_get_info(ph, "xchatdir"));
+ strcpy(imagepath, "/usr/share/xchat-systray-integration");
}
// events handling
@@ -190,8 +190,8 @@
char temp[200];
if (filename && type)
{
- if (imagepath) sprintf(temp,"%s/%s/%s", imagepath ,type,filename);
- else sprintf(temp,"%s/%s/%s", xchat_get_info(ph, "xchatdir"),type,filename);
+ if (imagepath && 0 == access(imagepath, X_OK)) sprintf(temp,"%s/%s/%s", imagepath ,type,filename);
+ else sprintf(temp,"/usr/share/xchat-systray-integration/%s/%s", type,filename);
#ifdef _WIN32_
tempbuffer= ((HICON)LoadImage( tray_inst, temp, IMAGE_ICON, 16, 16, LR_LOADFROMFILE ));
#else