Don't remove imput tags that haven't been added. Don't hang when EOF and

non-blocking.
Henning Meier-Geinitz <henning@meier-geinitz.de>
DEVEL_2_0_BRANCH-1
Henning Geinitz 2002-04-06 10:31:23 +00:00
rodzic fd73a53e6a
commit f5b92b13df
3 zmienionych plików z 50 dodań i 8 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2002-04-06 Henning Meier-Geinitz <henning@meier-geinitz.de>
* src/preview.c src/xscanimage.c: Don't remove imput tags that
haven't been added. Don't hang when EOF and non-blocking.
2002-04-02 Henning Meier-Geinitz <henning@meier-geinitz.de>
* src/preview.c: Used guint types instead of u_int. Set order of pixels

Wyświetl plik

@ -542,8 +542,17 @@ input_available (gpointer data, gint source, GdkInputCondition cond)
display_image (p);
else
{
gdk_input_remove (p->input_tag);
p->input_tag = -1;
if (p->input_tag < 0)
{
display_maybe (p);
while (gtk_events_pending ())
gtk_main_iteration ();
}
else
{
gdk_input_remove (p->input_tag);
p->input_tag = -1;
}
scan_start (p);
break;
}
@ -557,8 +566,18 @@ input_available (gpointer data, gint source, GdkInputCondition cond)
scan_done (p);
return;
}
if (!len)
break; /* out of data for now */
if (!len) /* out of data for now */
{
if (p->input_tag < 0)
{
display_maybe (p);
while (gtk_events_pending ())
gtk_main_iteration ();
continue;
}
else
break;
}
switch (p->params.format)
{

Wyświetl plik

@ -602,8 +602,16 @@ input_available (gpointer data, gint source, GdkInputCondition cond)
{
if (!scan_win.param.last_frame)
{
gdk_input_remove (scan_win.input_tag);
scan_win.input_tag = -1;
if (scan_win.input_tag < 0)
{
while (gtk_events_pending ())
gtk_main_iteration ();
}
else
{
gdk_input_remove (scan_win.input_tag);
scan_win.input_tag = -1;
}
scan_start ();
break;
}
@ -617,8 +625,18 @@ input_available (gpointer data, gint source, GdkInputCondition cond)
scan_done ();
return;
}
if (!len)
break; /* out of data for now */
if (!len) /* out of data for now */
{
if (scan_win.input_tag < 0)
{
while (gtk_events_pending ())
gtk_main_iteration ();
continue;
}
else
break;
}
scan_win.bytes_read += len;
progress_update (scan_win.progress,
scan_win.bytes_read / (gfloat) scan_win.num_bytes);