kopia lustrzana https://gitlab.com/sane-project/backends
2000-09-17 Henning Meier-Geinitz <hmg@gmx.de>
* frontend/xscanimage.c: Fixed gtk_main_quit bug (based on patch from <moloch@nikocity.de>). An error message was printed when no sane device was found.DEVEL_2_0_BRANCH-1
rodzic
37958e8369
commit
d9e618f5ce
|
@ -123,6 +123,9 @@ static struct option long_options[] =
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static int gtk_quit_flag; /* Call gtk_main_quit() only if at least one device
|
||||||
|
device is found. */
|
||||||
|
|
||||||
/* forward declarations: */
|
/* forward declarations: */
|
||||||
|
|
||||||
int main (int argc, char ** argv);
|
int main (int argc, char ** argv);
|
||||||
|
@ -454,6 +457,7 @@ quit_xscan (void)
|
||||||
if (dialog && gsg_dialog_get_device (dialog))
|
if (dialog && gsg_dialog_get_device (dialog))
|
||||||
sane_close (gsg_dialog_get_device (dialog));
|
sane_close (gsg_dialog_get_device (dialog));
|
||||||
sane_exit ();
|
sane_exit ();
|
||||||
|
if (gtk_quit_flag == 1)
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
#ifdef HAVE_LIBGIMP_GIMP_H
|
#ifdef HAVE_LIBGIMP_GIMP_H
|
||||||
if (scan_win.mode == SANE_GIMP_EXTENSION)
|
if (scan_win.mode == SANE_GIMP_EXTENSION)
|
||||||
|
@ -1696,6 +1700,7 @@ interface (int argc, char **argv)
|
||||||
quit_xscan ();
|
quit_xscan ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
gtk_quit_flag = 1;
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
sane_exit ();
|
sane_exit ();
|
||||||
}
|
}
|
||||||
|
@ -1704,7 +1709,7 @@ int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
scan_win.mode = STANDALONE;
|
scan_win.mode = STANDALONE;
|
||||||
|
gtk_quit_flag = 0;
|
||||||
prog_name = strrchr (argv[0], '/');
|
prog_name = strrchr (argv[0], '/');
|
||||||
if (prog_name)
|
if (prog_name)
|
||||||
++prog_name;
|
++prog_name;
|
||||||
|
|
Ładowanie…
Reference in New Issue