don't crash if no files are selected, take two
This commit is contained in:
parent
0b2d606bf2
commit
f6bd3fd733
@ -1,7 +1,19 @@
|
|||||||
diff -up xsane-0.997/src/xsane-back-gtk.c.no-file-selected xsane-0.997/src/xsane-back-gtk.c
|
diff -up xsane-0.997/src/xsane-back-gtk.c.no-file-selected xsane-0.997/src/xsane-back-gtk.c
|
||||||
--- xsane-0.997/src/xsane-back-gtk.c.no-file-selected 2002-10-02 13:05:52.000000000 +0200
|
--- xsane-0.997/src/xsane-back-gtk.c.no-file-selected 2002-10-02 13:05:52.000000000 +0200
|
||||||
+++ xsane-0.997/src/xsane-back-gtk.c 2010-06-28 10:49:29.302391248 +0200
|
+++ xsane-0.997/src/xsane-back-gtk.c 2010-07-13 10:02:09.468118791 +0200
|
||||||
@@ -1501,12 +1501,19 @@ int xsane_back_gtk_get_filename(const ch
|
@@ -1111,6 +1111,11 @@ static void xsane_back_gtk_filetype2_cal
|
||||||
|
|
||||||
|
chooser_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooser));
|
||||||
|
|
||||||
|
+ if (!chooser_filename)
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if ((new_filetype) && (*new_filetype))
|
||||||
|
{
|
||||||
|
extension = strrchr(chooser_filename, '.');
|
||||||
|
@@ -1501,12 +1506,19 @@ int xsane_back_gtk_get_filename(const ch
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
chooser_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooser));
|
chooser_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooser));
|
||||||
@ -27,7 +39,7 @@ diff -up xsane-0.997/src/xsane-back-gtk.c.no-file-selected xsane-0.997/src/xsane
|
|||||||
gtk_widget_destroy(filechooser);
|
gtk_widget_destroy(filechooser);
|
||||||
diff -up xsane-0.997/src/xsane-front-gtk.c.no-file-selected xsane-0.997/src/xsane-front-gtk.c
|
diff -up xsane-0.997/src/xsane-front-gtk.c.no-file-selected xsane-0.997/src/xsane-front-gtk.c
|
||||||
--- xsane-0.997/src/xsane-front-gtk.c.no-file-selected 2002-10-02 13:04:33.000000000 +0200
|
--- xsane-0.997/src/xsane-front-gtk.c.no-file-selected 2002-10-02 13:04:33.000000000 +0200
|
||||||
+++ xsane-0.997/src/xsane-front-gtk.c 2010-06-28 10:46:31.025142803 +0200
|
+++ xsane-0.997/src/xsane-front-gtk.c 2010-07-13 09:59:31.005868940 +0200
|
||||||
@@ -1339,7 +1339,11 @@ static void xsane_browse_filename_callba
|
@@ -1339,7 +1339,11 @@ static void xsane_browse_filename_callba
|
||||||
snprintf(windowname, sizeof(windowname), "%s %s %s", xsane.prog_name, WINDOW_OUTPUT_FILENAME, xsane.device_text);
|
snprintf(windowname, sizeof(windowname), "%s %s %s", xsane.prog_name, WINDOW_OUTPUT_FILENAME, xsane.device_text);
|
||||||
|
|
||||||
|
11
xsane.spec
11
xsane.spec
@ -14,7 +14,7 @@
|
|||||||
Name: xsane
|
Name: xsane
|
||||||
Summary: X Window System front-end for the SANE scanner interface
|
Summary: X Window System front-end for the SANE scanner interface
|
||||||
Version: 0.997
|
Version: 0.997
|
||||||
Release: 8%{?dist}
|
Release: 10%{?dist}
|
||||||
Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz
|
Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz
|
||||||
Source1: xsane.desktop
|
Source1: xsane.desktop
|
||||||
# distro-specific: use "xdg-open" instead of "netscape" to launch help browser
|
# distro-specific: use "xdg-open" instead of "netscape" to launch help browser
|
||||||
@ -28,7 +28,7 @@ Patch2: xsane-0.996-no-eula.patch
|
|||||||
# submitted to upstream (Oliver Rauch) via email, 2010-06-23
|
# submitted to upstream (Oliver Rauch) via email, 2010-06-23
|
||||||
Patch3: xsane-0.997-off-root-build.patch
|
Patch3: xsane-0.997-off-root-build.patch
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=608047
|
# https://bugzilla.redhat.com/show_bug.cgi?id=608047
|
||||||
# submitted to upstream (Oliver Rauch) via email, 2010-06-28
|
# submitted to upstream (Oliver Rauch) via email, 2010-07-13
|
||||||
Patch4: xsane-0.997-no-file-selected.patch
|
Patch4: xsane-0.997-no-file-selected.patch
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=198422
|
# https://bugzilla.redhat.com/show_bug.cgi?id=198422
|
||||||
# submitted to upstream (Oliver Rauch) via email, 2010-06-29
|
# submitted to upstream (Oliver Rauch) via email, 2010-06-29
|
||||||
@ -154,10 +154,17 @@ fi
|
|||||||
|
|
||||||
%files common
|
%files common
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
%doc xsane.AUTHOR xsane.COPYING
|
||||||
%dir %{_datadir}/sane
|
%dir %{_datadir}/sane
|
||||||
%{_datadir}/sane/xsane
|
%{_datadir}/sane/xsane
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 13 2010 Nils Philippsen <nils@redhat.com> - 0.997-10
|
||||||
|
- don't crash if no files are selected, take two
|
||||||
|
|
||||||
|
* Mon Jul 12 2010 Nils Philippsen <nils@redhat.com> - 0.997-9
|
||||||
|
- distribute license and other documentation with xsane-common
|
||||||
|
|
||||||
* Tue Jun 29 2010 Nils Philippsen <nils@redhat.com> 0.997-8
|
* Tue Jun 29 2010 Nils Philippsen <nils@redhat.com> 0.997-8
|
||||||
- support IPv6 (#198422)
|
- support IPv6 (#198422)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user