patches/xsane-02-doc.diff
author Jon Tibble <meths@btinternet.com>
Sat, 06 Oct 2012 16:11:50 +0100
branchs11express-2010-11
changeset 22109 db10202d5f6d
parent 18110 93461edb1490
permissions -rw-r--r--
Added tag oi_151a_prestable7 for changeset 25dee50cecca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18110
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     1
--- xsane-0.995/src/xsane.c.orig	2008-07-01 18:50:56.144479000 +0800
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     2
+++ xsane-0.995/src/xsane.c	2008-07-01 19:35:41.122804000 +0800
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     3
@@ -3751,7 +3751,11 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     4
   else /* netscape not running */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     5
   { 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     6
     DBG(DBG_proc, "xsane_show_doc_via_nsr: netscape is not running, trying to start netscape\n");
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     7
+#if defined(sun) && defined(__SVR4)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     8
+    arg[0] = "firefox";
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     9
+#else
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    10
     arg[0] = "netscape";
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    11
+#endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    12
     arg[1] = name;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    13
     arg[2] = 0;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    14
  
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    15
@@ -3860,13 +3864,17 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    16
   /* translation of language_dir gives the name of the subdirectory in */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    17
   /* which there may be a translation of a documentation */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    18
   language_dir = XSANE_LANGUAGE_DIR;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    19
+#if defined(sun) && defined(__SVR4)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    20
+  snprintf(path, sizeof(path), "%s/%s-doc.html", STRINGIFY(PATH_XSANE_DOC_DIR), name);  
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    21
+#else
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    22
   snprintf(path, sizeof(path), "%s/%s/%s-doc.html", STRINGIFY(PATH_XSANE_DOC_DIR), language_dir, name);  
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    23
+#endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    24
   if (stat(path, &st) != 0) /* test if file does exist */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    25
   {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    26
     snprintf(path, sizeof(path), "%s/%s-doc.html", STRINGIFY(PATH_XSANE_DOC_DIR), name); /* no, we use original doc */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    27
   }
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    28
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    29
-  if (!strcmp(preferences.browser, BROWSER_NETSCAPE))
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    30
+  if (!strcmp(preferences.browser, BROWSER_NETSCAPE) || !strcmp(preferences.browser, BROWSER_FIREFOX))
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    31
   {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    32
     xsane_show_doc_via_nsr(widget, (void *) path);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    33
   }
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    34
@@ -4246,9 +4254,8 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    35
   gtk_menu_append(GTK_MENU(menu), item);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    36
   gtk_widget_show(item);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    37
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    38
-
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    39
+#if !defined(sun) || !defined(__SVR4)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    40
   /* Backend doc -> html viewer */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    41
-
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    42
   if (xsane.backend)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    43
   {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    44
     item = gtk_menu_item_new_with_label(MENU_ITEM_BACKEND_DOC);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    45
@@ -4257,7 +4264,7 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    46
     gtk_widget_add_accelerator(item, "activate", xsane.accelerator_group, GDK_F2, 0, GTK_ACCEL_VISIBLE | DEF_GTK_ACCEL_LOCKED);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    47
     gtk_widget_show(item);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    48
   }
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    49
-
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    50
+#endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    51
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    52
   /* available backends -> html viewer */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    53
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    54
--- xsane-0.995/src/xsane.h.orig	2008-07-01 18:51:52.865496000 +0800
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    55
+++ xsane-0.995/src/xsane.h	2008-07-01 19:17:48.644923000 +0800
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    56
@@ -250,6 +250,8 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    57
 #  define DEFAULT_BROWSER "iexplore.exe"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    58
 # elif defined(HAVE_OS2_H)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    59
 #  define DEFAULT_BROWSER "netscape"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    60
+# elif defined(sun) && defined(__SVR4)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    61
+#  define DEFAULT_BROWSER "firefox"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    62
 # else
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    63
 #  define DEFAULT_BROWSER "netscape"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    64
 # endif
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    65
@@ -530,6 +532,7 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    66
 #define OCROUTFDOPT		"-x"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    67
 #define OCRPROGRESSKEY		""
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    68
 #define BROWSER_NETSCAPE	"netscape"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    69
+#define BROWSER_FIREFOX 	"firefox"
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    70
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    71
 #define XSANE_MEDIUM_CALIB_BRIGHTNESS_MIN	-1000.0
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    72
 #define XSANE_MEDIUM_CALIB_BRIGHTNESS_MAX	 1000.0