kopia lustrzana https://gitlab.com/sane-project/frontends
Added a couple of GTK mainloop calls so that the UI is updated in
a more timely fashion. Helps with backends which have potentially slow sane_start() and sane_read() commands (e.g. microtek).DEVEL_2_0_BRANCH-1
rodzic
2c4687302e
commit
84a3d61f3e
|
@ -69,6 +69,7 @@ progress_new (char *title, char *text,
|
|||
gtk_widget_show (p->pbar);
|
||||
gtk_widget_show (button);
|
||||
gtk_widget_show (GTK_WIDGET (p->shell));
|
||||
gtk_progress_bar_update (GTK_PROGRESS_BAR (p->pbar), 0);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
|
@ -890,6 +890,8 @@ scan_start (void)
|
|||
|
||||
scan_win.x = scan_win.y = 0;
|
||||
|
||||
while (gtk_events_pending ())
|
||||
gtk_main_iteration ();
|
||||
status = sane_start (dev);
|
||||
if (status != SANE_STATUS_GOOD)
|
||||
{
|
||||
|
@ -1032,8 +1034,12 @@ scan_start (void)
|
|||
&& sane_get_select_fd (dev, &fd) == SANE_STATUS_GOOD)
|
||||
scan_win.input_tag = gdk_input_add (fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
|
||||
input_available, 0);
|
||||
else
|
||||
input_available (0, -1, GDK_INPUT_READ);
|
||||
else
|
||||
{
|
||||
while (gtk_events_pending ())
|
||||
gtk_main_iteration ();
|
||||
input_available (0, -1, GDK_INPUT_READ);
|
||||
}
|
||||
}
|
||||
|
||||
/* Invoked when the scan button is pressed */
|
||||
|
|
Ładowanie…
Reference in New Issue