File: global.dpatch

package info (click to toggle)
rox 2.2.0-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,628 kB
  • ctags: 3,426
  • sloc: ansic: 36,949; xml: 9,296; sh: 520; makefile: 125; python: 28; perl: 27
file content (190 lines) | stat: -rw-r--r-- 6,860 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#! /bin/sh -e
## global.dpatch by Francesco Paolo Lovergine <frankie@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
diff -urNad rox-2.1.6/ROX-Filer/src/choices.c /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/choices.c
--- rox-2.1.6/ROX-Filer/src/choices.c	2005-01-16 17:48:00.000000000 +0100
+++ /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/choices.c	2005-01-27 00:06:28.000000000 +0100
@@ -77,11 +77,12 @@
 	{
 		saving_disabled = FALSE;
 
-		dir_list = g_new(gchar *, 4);
-		dir_list[0] = g_strconcat(getenv("HOME"), "/Choices", NULL);
-		dir_list[1] = g_strdup("/usr/local/share/Choices");
-		dir_list[2] = g_strdup("/usr/share/Choices");
-		dir_list[3] = NULL;
+		dir_list = g_new(gchar *, 5);
+		dir_list[0] = g_strconcat(getenv("HOME"), "/.choice", NULL);
+		dir_list[1] = g_strconcat(getenv("HOME"), "/.rox/choices", NULL);
+		dir_list[2] = g_strconcat(getenv("HOME"), "/.rox_choices", NULL);
+		dir_list[3] = g_strdup("/usr/share/rox/Choices");
+		dir_list[4] = NULL;
 	}
 
 #if 0
diff -urNad rox-2.1.6/ROX-Filer/src/config.h.in /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/config.h.in
--- rox-2.1.6/ROX-Filer/src/config.h.in	2004-09-17 16:38:40.000000000 +0200
+++ /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/config.h.in	2005-01-26 23:48:19.000000000 +0100
@@ -3,6 +3,9 @@
 #define PROJECT "ROX-Filer"
 #define VERSION "Unknown"
 #define GTK_VERSION "Unknown"
+#define APP_DIR "/usr/share/rox"
+#define HTMLHELP_DIR "/usr/share/doc/rox-filer"
+extern const char *htmlhelp_dir;
 
 #undef STDC_HEADERS
 #undef HAVE_SYS_UCRED_H
diff -urNad rox-2.1.6/ROX-Filer/src/i18n.c /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/i18n.c
--- rox-2.1.6/ROX-Filer/src/i18n.c	2005-01-16 17:48:01.000000000 +0100
+++ /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/i18n.c	2005-01-26 23:48:19.000000000 +0100
@@ -200,7 +200,7 @@
 
 	current_lang = lang2 ? lang2 : g_strdup(lang);
 
-	path = g_strdup_printf("%s/Messages/%s.gmo", app_dir, current_lang);
+	path = g_strdup_printf("/usr/share/locale/%s/LC_MESSAGES/rox.mo", current_lang);
 	if (file_exists(path))
 		rox_add_translations(path);
 	g_free(path);
diff -urNad rox-2.1.6/ROX-Filer/src/main.c /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/main.c
--- rox-2.1.6/ROX-Filer/src/main.c	2005-01-16 17:48:01.000000000 +0100
+++ /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/main.c	2005-01-26 23:49:55.000000000 +0100
@@ -87,7 +87,7 @@
 const gchar *show_user_message = NULL;
 
 int home_dir_len;
-const char *home_dir, *app_dir;
+const char *home_dir, *app_dir, *htmlhelp_dir;
 
 GtkTooltips *tooltips = NULL;
 
@@ -101,10 +101,10 @@
 		"see the file named COPYING.\n")
 
 #ifdef HAVE_GETOPT_LONG
-#  define USAGE   N_("Try `ROX-Filer/AppRun --help' for more information.\n")
+#  define USAGE   N_("Try `rox --help' for more information.\n")
 #  define SHORT_ONLY_WARNING ""
 #else
-#  define USAGE   N_("Try `ROX-Filer/AppRun -h' for more information.\n")
+#  define USAGE   N_("Try `rox -h' for more information.\n")
 #  define SHORT_ONLY_WARNING	\
 		_("NOTE: Your system does not support long options - \n" \
 		"you must use the short versions instead.\n\n")
@@ -112,7 +112,7 @@
 
 #define BUGS_TO "<rox-devel@lists.sourceforge.net>"
 
-#define HELP N_("Usage: ROX-Filer/AppRun [OPTION]... [FILE]...\n"	\
+#define HELP N_("Usage: rox [OPTION]... [FILE]...\n"	\
        "Open each directory or file listed, or the current working\n"	\
        "directory if no arguments are given.\n\n"			\
        "  -b, --bottom=PANEL	open PAN as a bottom-edge panel\n"	\
@@ -233,7 +233,8 @@
 
 	home_dir = g_get_home_dir();
 	home_dir_len = strlen(home_dir);
-	app_dir = g_strdup(getenv("APP_DIR"));
+	app_dir = g_strdup(APP_DIR);
+ 	htmlhelp_dir = g_strdup(HTMLHELP_DIR);
 
 	/* Get internationalisation up and running. This requires the
 	 * choices system, to discover the user's preferred language.
@@ -248,20 +249,6 @@
 		g_warning("Failed to init gnomevfs!");
 #endif
 
-	if (!app_dir)
-	{
-		g_warning("APP_DIR environment variable was unset!\n"
-			"Use the AppRun script to invoke ROX-Filer...\n");
-		app_dir = g_get_current_dir();
-	}
-#ifdef HAVE_UNSETENV 
-	else
-	{
-		/* Don't pass it on to our child processes... */
-		unsetenv("APP_DIR");
-	}
-#endif
-
 	/* Sometimes we want to take special action when a child
 	 * process exits. This hash table is used to convert the
 	 * child's PID to the callback function.
diff -urNad rox-2.1.6/ROX-Filer/src/menu.c /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/menu.c
--- rox-2.1.6/ROX-Filer/src/menu.c	2005-01-16 17:48:01.000000000 +0100
+++ /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/menu.c	2005-01-26 23:48:19.000000000 +0100
@@ -1737,22 +1737,22 @@
 	if (action == HELP_ABOUT)
 		infobox_new(app_dir);
 	else if (action == HELP_DIR)
-		filer_opendir(make_path(app_dir, "Help"), NULL, NULL);
+   	filer_opendir(make_path(htmlhelp_dir, "html"), NULL, NULL);
 	else if (action == HELP_MANUAL)
 	{
 		gchar *manual = NULL;
 
 		if (current_lang)
 		{
-			manual = g_strconcat(app_dir, "/Help/Manual-",
+ 			manual = g_strconcat(htmlhelp_dir, "/html/Manual-",
 					     current_lang, ".html", NULL);
 			if (access(manual, F_OK))
 				null_g_free(&manual);
 		}
 
 		if (!manual)
-			manual = g_strconcat(app_dir,
-						"/Help/Manual.html", NULL);
+  			manual = g_strconcat(htmlhelp_dir,
+						"/html/Manual.html", NULL);
 		
 		run_by_path(manual);
 
diff -urNad rox-2.1.6/ROX-Filer/src/session.c /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/session.c
--- rox-2.1.6/ROX-Filer/src/session.c	2005-01-16 17:48:03.000000000 +0100
+++ /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/session.c	2005-01-26 23:48:19.000000000 +0100
@@ -107,7 +107,7 @@
 		return;
 
 	pw = getpwuid(euid);
-	bin_path = g_strconcat(app_dir, "/AppRun", NULL);
+	bin_path = g_strconcat("", "/rox", NULL);
 	clone_cmd[0] = bin_path,
 	clone_cmd[1] = "-n";
 
diff -urNad rox-2.1.6/ROX-Filer/src/toolbar.c /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/toolbar.c
--- rox-2.1.6/ROX-Filer/src/toolbar.c	2005-01-16 17:48:03.000000000 +0100
+++ /tmp/dpep.wCTZK2/rox-2.1.6/ROX-Filer/src/toolbar.c	2005-01-26 23:48:19.000000000 +0100
@@ -299,7 +299,7 @@
 			((GdkEventButton *) event)->button != 1)
 		menu_rox_help(NULL, HELP_MANUAL, NULL);
 	else
-		filer_opendir(make_path(app_dir, "Help"), NULL, NULL);
+   		filer_opendir(make_path(htmlhelp_dir, "html"), NULL, NULL);
 }
 
 static void toolbar_refresh_clicked(GtkWidget *widget,