pango: update to 1.56.1
[oi-userland.git] / components / image / xsane / patches / 02-doc.patch
blobde2d3b2430fdda4e945aac469a5834b6ef748caa
1 --- xsane-0.995/src/xsane.c.orig 2008-07-01 18:50:56.144479000 +0800
2 +++ xsane-0.995/src/xsane.c 2008-07-01 19:35:41.122804000 +0800
3 @@ -3751,7 +3751,11 @@
4 else /* netscape not running */
5 {
6 DBG(DBG_proc, "xsane_show_doc_via_nsr: netscape is not running, trying to start netscape\n");
7 +#if defined(sun) && defined(__SVR4)
8 + arg[0] = "firefox";
9 +#else
10 arg[0] = "netscape";
11 +#endif
12 arg[1] = name;
13 arg[2] = 0;
15 @@ -3860,13 +3864,17 @@
16 /* translation of language_dir gives the name of the subdirectory in */
17 /* which there may be a translation of a documentation */
18 language_dir = XSANE_LANGUAGE_DIR;
19 +#if defined(sun) && defined(__SVR4)
20 + snprintf(path, sizeof(path), "%s/%s-doc.html", STRINGIFY(PATH_XSANE_DOC_DIR), name);
21 +#else
22 snprintf(path, sizeof(path), "%s/%s/%s-doc.html", STRINGIFY(PATH_XSANE_DOC_DIR), language_dir, name);
23 +#endif
24 if (stat(path, &st) != 0) /* test if file does exist */
26 snprintf(path, sizeof(path), "%s/%s-doc.html", STRINGIFY(PATH_XSANE_DOC_DIR), name); /* no, we use original doc */
29 - if (!strcmp(preferences.browser, BROWSER_NETSCAPE))
30 + if (!strcmp(preferences.browser, BROWSER_NETSCAPE) || !strcmp(preferences.browser, BROWSER_FIREFOX))
32 xsane_show_doc_via_nsr(widget, (void *) path);
34 @@ -4246,9 +4254,8 @@
35 gtk_menu_append(GTK_MENU(menu), item);
36 gtk_widget_show(item);
39 +#if !defined(sun) || !defined(__SVR4)
40 /* Backend doc -> html viewer */
42 if (xsane.backend)
44 item = gtk_menu_item_new_with_label(MENU_ITEM_BACKEND_DOC);
45 @@ -4257,7 +4264,7 @@
46 gtk_widget_add_accelerator(item, "activate", xsane.accelerator_group, GDK_F2, 0, GTK_ACCEL_VISIBLE | DEF_GTK_ACCEL_LOCKED);
47 gtk_widget_show(item);
50 +#endif
52 /* available backends -> html viewer */
54 --- xsane-0.995/src/xsane.h.orig 2008-07-01 18:51:52.865496000 +0800
55 +++ xsane-0.995/src/xsane.h 2008-07-01 19:17:48.644923000 +0800
56 @@ -250,6 +250,8 @@
57 # define DEFAULT_BROWSER "iexplore.exe"
58 # elif defined(HAVE_OS2_H)
59 # define DEFAULT_BROWSER "netscape"
60 +# elif defined(sun) && defined(__SVR4)
61 +# define DEFAULT_BROWSER "firefox"
62 # else
63 # define DEFAULT_BROWSER "netscape"
64 # endif
65 @@ -530,6 +532,7 @@
66 #define OCROUTFDOPT "-x"
67 #define OCRPROGRESSKEY ""
68 #define BROWSER_NETSCAPE "netscape"
69 +#define BROWSER_FIREFOX "firefox"
71 #define XSANE_MEDIUM_CALIB_BRIGHTNESS_MIN -1000.0
72 #define XSANE_MEDIUM_CALIB_BRIGHTNESS_MAX 1000.0