package xqf
tag 355045 + patch
thanks

Attached is a patch to fix this release critical xqf bug. With this
patch, xqf again starts up properly (as far as I can see, at least).
Since xqf is not currently in testing, I won't bother to do a
non-maintainer upload.

The problem as far as I can see is that the code tries to load XPM
pictures into the executable, instead of having them as files, and then
tries weird dlopen magic to get the in-executable XPM files. Magic is
not as reliable as technology, and once again it fails. So the first
change was to install the XPM files into /usr/share/xqf.

This was not enough, however, since the source refers to the files with
the wrong names: using _ instead - in filenames. The second change was
to fix that.

I hope this is useful. Happy hacking.

-- 
Teaching: the proof is in the doing.
diff -ru xqf-1.0.4/debian/changelog xqf-fixed/debian/changelog
--- xqf-1.0.4/debian/changelog	2006-04-08 16:57:41.000000000 +0000
+++ xqf-fixed/debian/changelog	2006-04-08 16:17:02.000000000 +0000
@@ -1,3 +1,10 @@
+xqf (1.0.4-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Foo.
+
+ -- Lars Wirzenius <[EMAIL PROTECTED]>  Sat,  8 Apr 2006 16:16:55 +0000
+
 xqf (1.0.4-1) unstable; urgency=low
 
   * New upstream release.
diff -ru xqf-1.0.4/debian/rules xqf-fixed/debian/rules
--- xqf-1.0.4/debian/rules	2006-04-08 16:57:41.000000000 +0000
+++ xqf-fixed/debian/rules	2006-04-08 16:21:01.000000000 +0000
@@ -12,6 +12,7 @@
 
 binary-install/xqf::
 	install -m 644 -p $(CURDIR)/debian/xqf.xpm $(CURDIR)/debian/xqf/usr/share/pixmaps/xqf.xpm
+	install -m 644 -p $(CURDIR)/src/xpm/*.xpm $(CURDIR)/debian/xqf/usr/share/xqf
 
 clean::
 	rm -f config.h
diff -ru xqf-1.0.4/src/loadpixmap.c xqf-fixed/src/loadpixmap.c
--- xqf-1.0.4/src/loadpixmap.c	2005-07-03 17:51:08.000000000 +0000
+++ xqf-fixed/src/loadpixmap.c	2006-04-08 16:46:43.000000000 +0000
@@ -149,7 +149,7 @@
   g_return_val_if_fail(pix!=NULL,NULL);
 
   found_filename = find_pixmap_file(filename);
-  if(is_suffix(filename, ".xpm")) // try png instead
+  if(!found_filename && is_suffix(filename, ".xpm")) // try png instead
   {
     char* tmp = g_strdup(filename);
     strcpy(tmp+strlen(tmp)-3, "png");
@@ -159,6 +159,7 @@
 
   if(!found_filename)
   {
+#if 0
     // not file on disk maybe xpm compiled into binary
     if(is_suffix(filename, ".xpm"))
     {
@@ -191,6 +192,7 @@
 	pix->pix = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &pix->mask, NULL, xpm);
       }
     }
+#endif
   }
   else if(is_suffix(found_filename, ".xpm"))
   {
diff -ru xqf-1.0.4/src/pixmaps.c xqf-fixed/src/pixmaps.c
--- xqf-1.0.4/src/pixmaps.c	2005-10-07 12:55:15.000000000 +0000
+++ xqf-fixed/src/pixmaps.c	2006-04-08 16:55:40.000000000 +0000
@@ -327,31 +327,31 @@
   create_pixmap (window, "record.xpm", &record_pix);
 
   create_pixmap (window, "sfilter.xpm", &sfilter_pix);
-  create_pixmap (window, "sfilter_cfg.xpm", &sfilter_cfg_pix);
+  create_pixmap (window, "sfilter-cfg.xpm", &sfilter_cfg_pix);
 
   create_pixmap (window, "pfilter.xpm", &pfilter_pix);
-  create_pixmap (window, "pfilter_cfg.xpm", &pfilter_cfg_pix);
+  create_pixmap (window, "pfilter-cfg.xpm", &pfilter_cfg_pix);
 
   create_pixmap (window, "green_plus.xpm", &gplus_pix);
   create_pixmap (window, "red_minus.xpm", &rminus_pix);
 
-  create_pixmap (window, "man_black.xpm", &man_black_pix);
-  create_pixmap (window, "man_red.xpm", &man_red_pix);
-  create_pixmap (window, "man_yellow.xpm", &man_yellow_pix);
-
-  create_pixmap (window, "group_red.xpm", &group_pix[0]);
-  create_pixmap (window, "group_green.xpm", &group_pix[1]);
-  create_pixmap (window, "group_blue.xpm", &group_pix[2]);
-
-  create_pixmap (window, "buddy_red.xpm", &buddy_pix[1]);
-  create_pixmap (window, "buddy_green.xpm", &buddy_pix[2]);
-  create_pixmap (window, "buddy_blue.xpm", &buddy_pix[4]);
-
-  create_pixmap (window, "server_na.xpm", &server_status[0]);
-  create_pixmap (window, "server_up.xpm", &server_status[1]);
-  create_pixmap (window, "server_down.xpm", &server_status[2]);
-  create_pixmap (window, "server_to.xpm", &server_status[3]);
-  create_pixmap (window, "server_error.xpm", &server_status[4]);
+  create_pixmap (window, "man-black.xpm", &man_black_pix);
+  create_pixmap (window, "man-red.xpm", &man_red_pix);
+  create_pixmap (window, "man-yellow.xpm", &man_yellow_pix);
+
+  create_pixmap (window, "group-red.xpm", &group_pix[0]);
+  create_pixmap (window, "group-green.xpm", &group_pix[1]);
+  create_pixmap (window, "group-blue.xpm", &group_pix[2]);
+
+  create_pixmap (window, "buddy-red.xpm", &buddy_pix[1]);
+  create_pixmap (window, "buddy-green.xpm", &buddy_pix[2]);
+  create_pixmap (window, "buddy-blue.xpm", &buddy_pix[4]);
+
+  create_pixmap (window, "server-na.xpm", &server_status[0]);
+  create_pixmap (window, "server-up.xpm", &server_status[1]);
+  create_pixmap (window, "server-down.xpm", &server_status[2]);
+  create_pixmap (window, "server-to.xpm", &server_status[3]);
+  create_pixmap (window, "server-error.xpm", &server_status[4]);
 
   create_pixmap (window, "error.xpm", &error_pix);
   create_pixmap (window, "delete.xpm", &delete_pix);
diff -ru xqf-1.0.4/src/xqf.c xqf-fixed/src/xqf.c
--- xqf-1.0.4/src/xqf.c	2005-08-23 18:22:19.000000000 +0000
+++ xqf-fixed/src/xqf.c	2006-04-08 16:16:43.000000000 +0000
@@ -3856,6 +3856,7 @@
   }
 
   add_pixmap_path_for_theme("default");
+  add_pixmap_directory(xqf_PACKAGE_DATA_DIR);
 
   qstat_configfile = g_strconcat(xqf_PACKAGE_DATA_DIR, "/qstat.cfg", NULL);
   

Reply via email to