sane-project-website/old-archive/1998-04/0318.html

106 wiersze
3.8 KiB
HTML

<!-- received="Thu Apr 30 08:25:20 1998 PDT" -->
<!-- sent="Thu, 30 Apr 1998 11:24:35 -0400 (EDT)" -->
<!-- name="Matto Marjanovic" -->
<!-- email="maddog@mir.com" -->
<!-- subject="xscanimage patch #2(er, 3): preview window segfault" -->
<!-- id="m0yUvCN-000J3NC@yoo-hoo.ai.mit.edu" -->
<!-- inreplyto="" -->
<title>sane-devel: xscanimage patch #2(er, 3): preview window segfault</title>
<h1>xscanimage patch #2(er, 3): preview window segfault</h1>
<b>Matto Marjanovic</b> (<a href="mailto:maddog@mir.com"><i>maddog@mir.com</i></a>)<br>
<i>Thu, 30 Apr 1998 11:24:35 -0400 (EDT)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#318">[ date ]</a><a href="index.html#318">[ thread ]</a><a href="subject.html#318">[ subject ]</a><a href="author.html#318">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0319.html">Ray Muno: "Polaroid SprintScan 35"</a>
<li> <b>Previous message:</b> <a href="0317.html">charter@cs.ualberta.ca: "Re: Agfa Arcus II"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Here's another patch, to fix the problem with xscanimage segfaulting<br>
when the Preview window is closed. (It also clears up a warning if<br>
you compile without GIMP support.)<br>
<p>
Basic problem: preview_window_destroyed() expected an extra argument<br>
containing a GdkEvent, which isn't supplied. Again, I think the design<br>
of GTK+ changed in some subtle way ("non-event signals no longer send a<br>
GdkEvent argument"). This patch fixes that, and cleans up the declarations<br>
of a couple of other signal handlers (which didn't suffer because of <br>
fortunate use of arguments).<br>
<p>
-matt m.<br>
<p>
<p>
--- frontend/xscanimage.c-dist Sun Apr 26 11:46:31 1998<br>
+++ frontend/xscanimage.c Thu Apr 30 10:54:52 1998<br>
@@ -465,14 +467,14 @@<br>
/* Invoked when window manager's "delete" (or "close") function is<br>
invoked. */<br>
static gint<br>
-scan_win_delete (GtkWidget *w, GdkEvent *e, gpointer data)<br>
+scan_win_delete (GtkWidget *w, gpointer data)<br>
{<br>
quit_xscan();<br>
return FALSE;<br>
}<br>
<br>
static void<br>
-preview_window_destroyed (GtkWidget *widget, GdkEvent *e, gpointer call_data)<br>
+preview_window_destroyed (GtkWidget *widget, gpointer call_data)<br>
{<br>
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (call_data), FALSE);<br>
}<br>
@@ -734,12 +779,14 @@<br>
}<br>
return;<br>
<br>
+#ifdef HAVE_LIBGIMP_GIMP_H<br>
bad_depth:<br>
snprintf (buf, sizeof (buf), "Cannot handle depth %d.",<br>
scan_win.param.depth);<br>
gsg_error (buf);<br>
scan_done ();<br>
return;<br>
+#endif /* HAVE_LIBGIMP_GIMP_H */<br>
}<br>
<br>
static void<br>
@@ -962,8 +1014,7 @@<br>
<br>
/* Invoked when the scan button is pressed */<br>
static void<br>
-scan_dialog (GtkWidget * widget,<br>
- gpointer client_data, gpointer call_data)<br>
+scan_dialog (GtkWidget * widget, gpointer call_data)<br>
{<br>
char buf[256];<br>
<br>
--- frontend/gtkglue.c-dist Wed Apr 29 16:05:00 1998<br>
+++ frontend/gtkglue.c Thu Apr 30 11:09:25 1998<br>
@@ -207,7 +207,7 @@<br>
<br>
void<br>
gsg_close_dialog_callback (GtkWidget * widget,<br>
- gpointer client_data, gpointer call_data)<br>
+ gpointer client_data)<br>
{<br>
gtk_widget_destroy (client_data);<br>
gsg_message_dialog_active = 0;<br>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0319.html">Ray Muno: "Polaroid SprintScan 35"</a>
<li> <b>Previous message:</b> <a href="0317.html">charter@cs.ualberta.ca: "Re: Agfa Arcus II"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>