~ubuntu-branches/ubuntu/natty/xsane/natty

« back to all changes in this revision

Viewing changes to debian/patches/04_inhibit_clickthrough.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-05-29 10:29:02 UTC
  • Revision ID: james.westby@ubuntu.com-20080529102902-t40w3fcx7q4d2z60
Tags: 0.995-3ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/patches/13_pot_desktop_msgid.dpatch: Add .desktop file Name and
    Comment to the POT.
  - debian/control:
    - build seperate xsane doc package
  - rename xsane-common.doc-base to xsane-doc.doc-base
  - debian/control: Ubuntu maintainer.
* dropped debian/patches/04_disable_eula.dpatch: part of debian now

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 04_inhibit_clickthrough.dpatch by  <jblache@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Finally give up and inhibit the license clickthrough.
 
6
 
 
7
@DPATCH@
 
8
diff -urNad xsane-0.995~/src/xsane.c xsane-0.995/src/xsane.c
 
9
--- xsane-0.995~/src/xsane.c    2007-09-28 17:24:56.000000000 +0200
 
10
+++ xsane-0.995/src/xsane.c     2008-04-11 18:56:55.120439147 +0200
 
11
@@ -1901,11 +1901,11 @@
 
12
 /* ---------------------------------------------------------------------------------------------------------------------- */
 
13
 
 
14
 static int xsane_pref_restore(void)
 
15
-/* returns true if this is the first time this xsane version is called */
 
16
+/* Originally: returns true if this is the first time this xsane version is called */
 
17
 {
 
18
  char filename[PATH_MAX];
 
19
  int fd;
 
20
- int result = TRUE;
 
21
+ int result = FALSE;
 
22
  int i;
 
23
 
 
24
   DBG(DBG_proc, "xsane_pref_restore\n");
 
25
@@ -1919,6 +1919,7 @@
 
26
     preferences_restore(fd);
 
27
     close(fd);
 
28
 
 
29
+#if 0
 
30
     /* the version test only is done for the local xsane.rc file because each user */
 
31
     /* shall accept (or not) the license for xsane */
 
32
     if (preferences.xsane_version_str)
 
33
@@ -1928,6 +1929,7 @@
 
34
         result = FALSE; /* this version already has been started */
 
35
       }
 
36
     }
 
37
+#endif /* 0 */
 
38
   }
 
39
   else /* no local sane file, look for system file */
 
40
   {
 
41
@@ -5795,7 +5797,10 @@
 
42
     xsane.xsane_rc_set_filename = strdup("xsane"); /* ".rc" is appended later */
 
43
   }
 
44
 
 
45
+  xsane_pref_restore();
 
46
+  xsane_pref_save();
 
47
 
 
48
+#if 0 /* Original XSane code */
 
49
   if (xsane_pref_restore()) /* restore preferences, returns TRUE if license is not accpted yet */
 
50
   {
 
51
     if (xsane_display_eula(1)) /* show license and ask for accept/not accept */
 
52
@@ -5808,6 +5813,7 @@
 
53
       xsane_pref_save();
 
54
     }
 
55
   }
 
56
+#endif /* Original XSane code */
 
57
 
 
58
   xsane_pref_restore_media();
 
59