Merge lp:~david.gabor.bodor/sakura/config-file-option into lp:~dabisu/sakura/sakura

Proposed by Dávid Gábor Bodor
Status: Merged
Merge reported by: David Gómez
Merged at revision: not available
Proposed branch: lp:~david.gabor.bodor/sakura/config-file-option
Merge into: lp:~dabisu/sakura/sakura
Diff against target: 393 lines (+72/-20)
16 files modified
po/ca.po (+4/-1)
po/cs.po (+4/-1)
po/de.po (+4/-1)
po/es.po (+4/-1)
po/fr.po (+4/-1)
po/hr.po (+4/-1)
po/hu.po (+4/-1)
po/it.po (+4/-1)
po/ja.po (+4/-1)
po/ko.po (+4/-1)
po/pl.po (+4/-1)
po/pt_BR.po (+4/-1)
po/ru.po (+4/-1)
po/sakura.pot (+4/-1)
po/zh_CN.po (+4/-1)
src/sakura.c (+12/-5)
To merge this branch: bzr merge lp:~david.gabor.bodor/sakura/config-file-option
Reviewer Review Type Date Requested Status
David Gómez Approve
Review via email: mp+65984@code.launchpad.net

Description of the change

Fixes Bug #802509

This branch adds a --config-file <filename> option to sakura,
that let's the user select a separate config file, instead of the defaults.

To post a comment you must log in.
351. By Dávid Gábor Bodor

Run make to update po files.

352. By Dávid Gábor Bodor

Merge from sakura main branch.

Revision history for this message
David Gómez (dabisu) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/ca.po'
2--- po/ca.po 2011-06-26 07:43:36 +0000
3+++ po/ca.po 2011-07-01 16:02:44 +0000
4@@ -5,7 +5,7 @@
5 msgstr ""
6 "Project-Id-Version: sakura\n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
9+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
10 "PO-Revision-Date: 2010-10-06 13:57+0000\n"
11 "Last-Translator: David Gómez <david@pleyades.net>\n"
12 "Language-Team: Jordi Jané Cardo <jordi.jane@gmail.com>\n"
13@@ -49,6 +49,9 @@
14 msgid "X geometry specification"
15 msgstr "Especificació de la geometria X"
16
17+msgid "Use alternate configuration file"
18+msgstr ""
19+
20 msgid "Configuration has been modified by another proccess. Overwrite?"
21 msgstr ""
22
23
24=== modified file 'po/cs.po'
25--- po/cs.po 2011-06-26 07:43:36 +0000
26+++ po/cs.po 2011-07-01 16:02:44 +0000
27@@ -7,7 +7,7 @@
28 msgstr ""
29 "Project-Id-Version: sakura 2.3.8\n"
30 "Report-Msgid-Bugs-To: \n"
31-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
32+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
33 "PO-Revision-Date: 2010-06-05 01:16+0200\n"
34 "Last-Translator: Lucas Lommer <llommer@svn.gnome.org>\n"
35 "Language-Team: Czech <gnome-cs-list@gnome.org>\n"
36@@ -51,6 +51,9 @@
37 msgid "X geometry specification"
38 msgstr "Volba rozměru v ose X"
39
40+msgid "Use alternate configuration file"
41+msgstr ""
42+
43 msgid "Configuration has been modified by another proccess. Overwrite?"
44 msgstr ""
45
46
47=== modified file 'po/de.po'
48--- po/de.po 2011-06-26 07:43:36 +0000
49+++ po/de.po 2011-07-01 16:02:44 +0000
50@@ -7,7 +7,7 @@
51 msgstr ""
52 "Project-Id-Version: 2.3.4\n"
53 "Report-Msgid-Bugs-To: \n"
54-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
55+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
56 "PO-Revision-Date: 2011-04-28 11:38+0000\n"
57 "Last-Translator: Jan-Christoph Borchardt <Unknown>\n"
58 "Language-Team: Deutsch <de@li.org>\n"
59@@ -51,6 +51,9 @@
60 msgid "X geometry specification"
61 msgstr ""
62
63+msgid "Use alternate configuration file"
64+msgstr ""
65+
66 msgid "Configuration has been modified by another proccess. Overwrite?"
67 msgstr ""
68
69
70=== modified file 'po/es.po'
71--- po/es.po 2011-06-26 07:43:36 +0000
72+++ po/es.po 2011-07-01 16:02:44 +0000
73@@ -5,7 +5,7 @@
74 msgstr ""
75 "Project-Id-Version: sakura\n"
76 "Report-Msgid-Bugs-To: \n"
77-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
78+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
79 "PO-Revision-Date: 2011-02-21 11:10+0000\n"
80 "Last-Translator: David Gómez <david@pleyades.net>\n"
81 "Language-Team: <davidge@pleyades.net>\n"
82@@ -49,6 +49,9 @@
83 msgid "X geometry specification"
84 msgstr "Especificación de geometría de las X"
85
86+msgid "Use alternate configuration file"
87+msgstr ""
88+
89 msgid "Configuration has been modified by another proccess. Overwrite?"
90 msgstr "La configuración ha sido modificada por otro proceso. ¿Sobreescribir?"
91
92
93=== modified file 'po/fr.po'
94--- po/fr.po 2011-06-26 07:43:36 +0000
95+++ po/fr.po 2011-07-01 16:02:44 +0000
96@@ -6,7 +6,7 @@
97 msgstr ""
98 "Project-Id-Version: sakura 1.2.0\n"
99 "Report-Msgid-Bugs-To: \n"
100-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
101+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
102 "PO-Revision-Date: 2010-10-06 14:04+0000\n"
103 "Last-Translator: David Gómez <david@pleyades.net>\n"
104 "Language-Team: <fabrice.thiroux@free.fr>\n"
105@@ -50,6 +50,9 @@
106 msgid "X geometry specification"
107 msgstr ""
108
109+msgid "Use alternate configuration file"
110+msgstr ""
111+
112 msgid "Configuration has been modified by another proccess. Overwrite?"
113 msgstr ""
114
115
116=== modified file 'po/hr.po'
117--- po/hr.po 2011-06-26 07:43:36 +0000
118+++ po/hr.po 2011-07-01 16:02:44 +0000
119@@ -6,7 +6,7 @@
120 msgstr ""
121 "Project-Id-Version: Sakura 2.3.2\n"
122 "Report-Msgid-Bugs-To: \n"
123-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
124+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
125 "PO-Revision-Date: 2010-10-06 17:20+0000\n"
126 "Last-Translator: Dražen Odobašić <dodobas@geoinfo.geof.hr>\n"
127 "Language-Team: brentaal <Unknown>\n"
128@@ -50,6 +50,9 @@
129 msgid "X geometry specification"
130 msgstr "Specifikacija X geometrije"
131
132+msgid "Use alternate configuration file"
133+msgstr ""
134+
135 msgid "Configuration has been modified by another proccess. Overwrite?"
136 msgstr ""
137
138
139=== modified file 'po/hu.po'
140--- po/hu.po 2011-06-23 08:01:30 +0000
141+++ po/hu.po 2011-07-01 16:02:44 +0000
142@@ -5,7 +5,7 @@
143 msgstr ""
144 "Project-Id-Version: sakura\n"
145 "Report-Msgid-Bugs-To: \n"
146-"POT-Creation-Date: 2011-05-17 19:34+0200\n"
147+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
148 "PO-Revision-Date: 2010-03-03 12:14+0000\n"
149 "Last-Translator: Szervác Attila <sas@321.hu>\n"
150 "Language-Team: hu\n"
151@@ -51,6 +51,9 @@
152 msgid "X geometry specification"
153 msgstr ""
154
155+msgid "Use alternate configuration file"
156+msgstr ""
157+
158 msgid "Configuration has been modified by another proccess. Overwrite?"
159 msgstr ""
160
161
162=== modified file 'po/it.po'
163--- po/it.po 2011-06-23 08:01:30 +0000
164+++ po/it.po 2011-07-01 16:02:44 +0000
165@@ -5,7 +5,7 @@
166 msgstr ""
167 "Project-Id-Version: sakura\n"
168 "Report-Msgid-Bugs-To: \n"
169-"POT-Creation-Date: 2011-05-17 19:34+0200\n"
170+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
171 "PO-Revision-Date: 2010-10-06 14:01+0000\n"
172 "Last-Translator: nTia89 <tia.tif@fastwebnet.it>\n"
173 "Language-Team: sakura-it <nicola@entidi.it>\n"
174@@ -52,6 +52,9 @@
175 msgid "X geometry specification"
176 msgstr "Specificazione della geometria di X"
177
178+msgid "Use alternate configuration file"
179+msgstr ""
180+
181 msgid "Configuration has been modified by another proccess. Overwrite?"
182 msgstr ""
183
184
185=== modified file 'po/ja.po'
186--- po/ja.po 2011-06-26 07:43:36 +0000
187+++ po/ja.po 2011-07-01 16:02:44 +0000
188@@ -4,7 +4,7 @@
189 msgstr ""
190 "Project-Id-Version: ja\n"
191 "Report-Msgid-Bugs-To: \n"
192-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
193+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
194 "PO-Revision-Date: 2011-02-21 13:28+0000\n"
195 "Last-Translator: David Gómez <david@pleyades.net>\n"
196 "Language-Team: Japanese <ja@li.org>\n"
197@@ -48,6 +48,9 @@
198 msgid "X geometry specification"
199 msgstr "X幾何学指定"
200
201+msgid "Use alternate configuration file"
202+msgstr ""
203+
204 msgid "Configuration has been modified by another proccess. Overwrite?"
205 msgstr "設定は外のプロセスに変化されました。書換えますか?"
206
207
208=== modified file 'po/ko.po'
209--- po/ko.po 2011-06-26 07:43:36 +0000
210+++ po/ko.po 2011-07-01 16:02:44 +0000
211@@ -7,7 +7,7 @@
212 msgstr ""
213 "Project-Id-Version: sakura\n"
214 "Report-Msgid-Bugs-To: \n"
215-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
216+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
217 "PO-Revision-Date: 2011-02-12 17:09+0000\n"
218 "Last-Translator: Bundo <bundo@bundo.biz>\n"
219 "Language-Team: Korean <ko@li.org>\n"
220@@ -51,6 +51,9 @@
221 msgid "X geometry specification"
222 msgstr "프로그램의 위치"
223
224+msgid "Use alternate configuration file"
225+msgstr ""
226+
227 msgid "Configuration has been modified by another proccess. Overwrite?"
228 msgstr ""
229
230
231=== modified file 'po/pl.po'
232--- po/pl.po 2011-06-26 07:43:36 +0000
233+++ po/pl.po 2011-07-01 16:02:44 +0000
234@@ -7,7 +7,7 @@
235 msgstr ""
236 "Project-Id-Version: sakura\n"
237 "Report-Msgid-Bugs-To: \n"
238-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
239+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
240 "PO-Revision-Date: 2011-01-24 15:40+0000\n"
241 "Last-Translator: Mateusz Micał <Unknown>\n"
242 "Language-Team: Polish <pl@li.org>\n"
243@@ -51,6 +51,9 @@
244 msgid "X geometry specification"
245 msgstr "Ustawienia geometrii serwera X"
246
247+msgid "Use alternate configuration file"
248+msgstr ""
249+
250 msgid "Configuration has been modified by another proccess. Overwrite?"
251 msgstr ""
252
253
254=== modified file 'po/pt_BR.po'
255--- po/pt_BR.po 2011-06-26 07:43:36 +0000
256+++ po/pt_BR.po 2011-07-01 16:02:44 +0000
257@@ -2,7 +2,7 @@
258 msgstr ""
259 "Project-Id-Version: sakura\n"
260 "Report-Msgid-Bugs-To: \n"
261-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
262+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
263 "PO-Revision-Date: 2010-03-03 12:18+0000\n"
264 "Last-Translator: David Gómez <david@pleyades.net>\n"
265 "Language-Team: fabio.antunes@hotmail.com <fabio.antunes@hotmail.com>\n"
266@@ -46,6 +46,9 @@
267 msgid "X geometry specification"
268 msgstr ""
269
270+msgid "Use alternate configuration file"
271+msgstr ""
272+
273 msgid "Configuration has been modified by another proccess. Overwrite?"
274 msgstr ""
275
276
277=== modified file 'po/ru.po'
278--- po/ru.po 2011-06-26 07:43:36 +0000
279+++ po/ru.po 2011-07-01 16:02:44 +0000
280@@ -2,7 +2,7 @@
281 msgstr ""
282 "Project-Id-Version: sakura\n"
283 "Report-Msgid-Bugs-To: \n"
284-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
285+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
286 "PO-Revision-Date: 2011-06-11 23:11+0000\n"
287 "Last-Translator: Anton Lashkov <Unknown>\n"
288 "Language-Team: Evgenij Vdovin <evdovin@pochta.ru>\n"
289@@ -46,6 +46,9 @@
290 msgid "X geometry specification"
291 msgstr "Определение геометрии окна X"
292
293+msgid "Use alternate configuration file"
294+msgstr ""
295+
296 msgid "Configuration has been modified by another proccess. Overwrite?"
297 msgstr "Настройки могут быть изменены в другом процессе. Перезаписать?"
298
299
300=== modified file 'po/sakura.pot'
301--- po/sakura.pot 2011-06-30 06:25:14 +0000
302+++ po/sakura.pot 2011-07-01 16:02:44 +0000
303@@ -8,7 +8,7 @@
304 msgstr ""
305 "Project-Id-Version: PACKAGE VERSION\n"
306 "Report-Msgid-Bugs-To: \n"
307-"POT-Creation-Date: 2011-06-26 09:44+0200\n"
308+"POT-Creation-Date: 2011-07-01 17:59+0200\n"
309 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
310 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
311 "Language-Team: LANGUAGE <LL@li.org>\n"
312@@ -50,6 +50,9 @@
313 msgid "X geometry specification"
314 msgstr ""
315
316+msgid "Use alternate configuration file"
317+msgstr ""
318+
319 msgid "Configuration has been modified by another proccess. Overwrite?"
320 msgstr ""
321
322
323=== modified file 'po/zh_CN.po'
324--- po/zh_CN.po 2011-06-26 07:43:36 +0000
325+++ po/zh_CN.po 2011-07-01 16:02:44 +0000
326@@ -7,7 +7,7 @@
327 msgstr ""
328 "Project-Id-Version: sakura 1.0.4\n"
329 "Report-Msgid-Bugs-To: \n"
330-"POT-Creation-Date: 2011-06-23 10:08+0200\n"
331+"POT-Creation-Date: 2011-06-27 15:39+0200\n"
332 "PO-Revision-Date: 2010-04-14 06:29+0000\n"
333 "Last-Translator: Heling Yao <Unknown>\n"
334 "Language-Team: Chinese/Simplified <i18n-translation@lists.linux.net.cn>\n"
335@@ -51,6 +51,9 @@
336 msgid "X geometry specification"
337 msgstr "尺寸设定"
338
339+msgid "Use alternate configuration file"
340+msgstr ""
341+
342 msgid "Configuration has been modified by another proccess. Overwrite?"
343 msgstr ""
344
345
346=== modified file 'src/sakura.c'
347--- src/sakura.c 2011-05-17 17:34:53 +0000
348+++ src/sakura.c 2011-07-01 16:02:44 +0000
349@@ -213,7 +213,7 @@
350 #define ICON_FILE "terminal-tango.svg"
351 #define SCROLL_LINES 4096
352 #define HTTP_REGEXP "(ftp|http)s?://[-a-zA-Z0-9.?$%&/=_~#.,:;+]*"
353-#define CONFIGFILE "sakura.conf"
354+#define DEFAULT_CONFIGFILE "sakura.conf"
355 #define DEFAULT_COLUMNS 80
356 #define DEFAULT_ROWS 24
357 #define DEFAULT_FONT "monospace 11"
358@@ -326,6 +326,7 @@
359 static int option_rows, option_columns;
360 static gboolean option_hold=FALSE;
361 static const char *option_geometry;
362+static char *option_config_file;
363
364 static GOptionEntry entries[] = {
365 { "version", 'v', 0, G_OPTION_ARG_NONE, &option_version, N_("Print version number"), NULL },
366@@ -339,8 +340,9 @@
367 { "columns", 'c', 0, G_OPTION_ARG_INT, &option_columns, N_("Set columns number"), NULL },
368 { "rows", 'r', 0, G_OPTION_ARG_INT, &option_rows, N_("Set rows number"), NULL },
369 { "hold", 'h', 0, G_OPTION_ARG_NONE, &option_hold, N_("Hold window after execute command"), NULL },
370- { "geometry", 0, 0, G_OPTION_ARG_STRING, &option_geometry, N_("X geometry specification"), NULL },
371- { NULL }
372+ { "geometry", 0, 0, G_OPTION_ARG_STRING, &option_geometry, N_("X geometry specification"), NULL },
373+ { "config-file", 0, 0, G_OPTION_ARG_FILENAME, &option_config_file, N_("Use alternate configuration file"), NULL },
374+ { NULL }
375 };
376
377
378@@ -1567,8 +1569,13 @@
379 g_mkdir( g_get_user_config_dir(), 0755 );
380 if( ! g_file_test( configdir, G_FILE_TEST_EXISTS) )
381 g_mkdir( configdir, 0755 );
382- /* Use more standard-conforming path for config files, if available. */
383- sakura.configfile=g_build_filename(configdir, CONFIGFILE, NULL);
384+ if (option_config_file) {
385+ sakura.configfile=option_config_file;
386+ printf("The config file is: %s", option_config_file);
387+ } else {
388+ /* Use more standard-conforming path for config files, if available. */
389+ sakura.configfile=g_build_filename(configdir, DEFAULT_CONFIGFILE, NULL);
390+ }
391 g_free(configdir);
392
393 /* Open config file */

Subscribers

People subscribed via source and target branches