updated on Mon Jan 16 20:00:43 UTC 2012
[aur-mirror.git] / xcdroast / xcdroast-0.98alpha15-prodvd.patch
blob3b94beffce31d39e41619873d4a2d267c7605aa6
1 diff -up xcdroast-0.98alpha16/src/create.c.cdrkit xcdroast-0.98alpha16/src/create.c
2 --- xcdroast-0.98alpha16/src/create.c.cdrkit 2009-02-17 06:34:16.000000000 -0500
3 +++ xcdroast-0.98alpha16/src/create.c 2009-02-17 06:34:16.000000000 -0500
4 @@ -523,7 +523,7 @@ GtkWidget *scrolled_win, *list;
5 gtk_widget_show(tbl);
6 vbox = gtk_vbox_new(FALSE,10);
7 gtk_table_attach_defaults(GTK_TABLE(tbl),vbox,1,2,0,1);
8 - if (!curset.isProDVD) {
9 + if (!curset.isDVD) {
10 f1 = gtk_frame_new(_("CD-Information"));
11 } else {
12 f1 = gtk_frame_new(_("CD/DVD-Information"));
13 @@ -1260,7 +1260,7 @@ GtkWidget *scrolled_win, *img_list;
14 gtk_widget_show(tbl);
15 vbox = gtk_vbox_new(FALSE,10);
16 gtk_table_attach_defaults(GTK_TABLE(tbl),vbox,0,1,0,1);
17 - if (!curset.isProDVD) {
18 + if (!curset.isDVD) {
19 f1 = gtk_frame_new(_("CD-Information"));
20 } else {
21 f1 = gtk_frame_new(_("CD/DVD-Information"));
22 @@ -2979,7 +2979,7 @@ GtkTargetEntry target_entry[3];
23 GTK_SIGNAL_FUNC(fixate_clicked), NULL);
24 define_tooltip(b1,_("Just fixate (close) the CD, if for some reason the CD has been written but not fixated."));
26 - if (!curset.isProDVD) {
27 + if (!curset.isDVD) {
28 b1 = gtk_button_new_with_label(_("Blank CD-RW"));
29 } else {
30 b1 = gtk_button_new_with_label(_("Blank CD/DVD+-RW"));
31 @@ -3086,7 +3086,7 @@ GtkTargetEntry target_entry[3];
32 gtk_widget_show (menu_item);
33 i++;
35 - if (curset.isProDVD) {
36 + if (curset.isDVD) {
37 i = 0;
38 tmpval = curset.cdrtype;
39 while (dvdtypes[i] != 0) {
40 @@ -5774,7 +5774,7 @@ GtkObject *adj;
41 bootable_frame1 = NULL;
42 bootable_frame2 = NULL;
44 - if (!curset.isProDVD) {
45 + if (!curset.isDVD) {
46 f1 = gtk_frame_new(_("Options to create a bootable CD"));
47 } else {
48 f1 = gtk_frame_new(_("Options to create a bootable CD/DVD"));
49 @@ -5794,7 +5794,7 @@ GtkObject *adj;
50 gtk_box_pack_start(GTK_BOX(vbox),tbl,FALSE,FALSE,0);
51 gtk_widget_show(tbl);
53 - if (!curset.isProDVD) {
54 + if (!curset.isDVD) {
55 l1 = rightjust_gtk_label_new(_("Make CD bootable?"));
56 } else {
57 l1 = rightjust_gtk_label_new(_("Make CD/DVD bootable?"));
58 @@ -7023,7 +7023,7 @@ gchar tmp2[MAXLINE];
59 gtk_widget_show (menu_item);
60 i++;
62 - if (curset.isProDVD) {
63 + if (curset.isDVD) {
64 i = 0;
65 tmpval = curset.cdrtype;
66 while (dvdtypes[i] != 0) {
67 @@ -7174,7 +7174,7 @@ gchar tmp2[MAXLINE];
68 gtk_widget_show(b1);
69 define_tooltip(b1,_("Set additional write options for advanced users."));
70 /* blank button */
71 - if (!curset.isProDVD) {
72 + if (!curset.isDVD) {
73 b1 = gtk_button_new_with_label(_("Blank CD-RW"));
74 } else {
75 b1 = gtk_button_new_with_label(_("Blank CD/DVD+-RW"));
76 diff -up xcdroast-0.98alpha16/src/init.c.cdrkit xcdroast-0.98alpha16/src/init.c
77 --- xcdroast-0.98alpha16/src/init.c.cdrkit 2009-02-17 06:34:16.000000000 -0500
78 +++ xcdroast-0.98alpha16/src/init.c 2009-02-17 06:34:16.000000000 -0500
79 @@ -156,7 +156,7 @@ static void init_curset() {
80 gint cdrtypes[] = CDR_TYPES_MIN;
81 gint i;
83 - curset.isProDVD = 0;
84 + curset.isDVD = 0;
85 curset.support_ontheflyaudio = 0;
86 curset.writer_devnr = -1;
87 curset.reader_devnr = -1;
88 @@ -1005,7 +1005,7 @@ gint isProDVD, ignoreProDVD;
89 tocfiles = (GList *) NULL;
90 strcpy(xcdroast_version_loaded, "");
92 - curset.isProDVD = isProDVD;
93 + curset.isDVD = isProDVD;
94 curset.support_ontheflyaudio = support_ontheflyaudio;
96 /* load iso-options if available */
97 @@ -1129,7 +1129,7 @@ gint isProDVD, ignoreProDVD;
99 #endif
101 - if (curset.isProDVD == 1) {
102 + if (curset.isDVD == 1) {
103 /* set key if we got one from the config-file */
104 if (strcmp(setupdata.ProDVDkey,"")) {
106 diff -up xcdroast-0.98alpha16/src/io.c.cdrkit xcdroast-0.98alpha16/src/io.c
107 --- xcdroast-0.98alpha16/src/io.c.cdrkit 2009-02-17 06:34:16.000000000 -0500
108 +++ xcdroast-0.98alpha16/src/io.c 2009-02-17 08:39:07.000000000 -0500
109 @@ -4725,7 +4725,7 @@ gint fd;
110 dolog(3, "Saving extended output to %s\n", fname);
112 /* write to file */
113 - fd = open(fname,O_WRONLY | O_CREAT);
114 + fd = open(fname,O_WRONLY | O_CREAT, 0600);
115 if (fd < 0) {
116 g_warning("Can't open file %s for writing\n",fname);
117 return 1;
118 @@ -5989,7 +5989,7 @@ gchar tmp[MAXLINE];
119 if (WIFSIGNALED(ret) && read_done == 0) {
121 /* most likely invalid prodvd key */
122 - if (curset.isProDVD) {
123 + if (curset.isDVD) {
124 strncpy(tmp, "\nReceived ALARM from cdrecord-ProDVD. Aborting blank...\nInvalid ProDVD key?\n", MAXLINE);
126 convert_for_gtk2_textwidget(tmp);
127 @@ -6372,7 +6372,7 @@ gint cdrecord_stderr;
128 if (WIFSIGNALED(ret) && read_done == 0) {
130 /* most likely invalid prodvd key */
131 - if (curset.isProDVD && curset.cdrtype > 1000) {
132 + if (curset.isDVD && curset.cdrtype > 1000) {
133 read_done = 2;
136 @@ -6402,7 +6402,7 @@ gint cdrecord_stderr;
139 /* prodvd and beginning to write soon? */
140 - if (curset.isProDVD && curset.cdrtype > 1000) {
141 + if (curset.isDVD && curset.cdrtype > 1000) {
142 if (strstr(line,"Last chance to quit")) {
143 cdrtimer = gtk_timeout_add(1000,
144 cdrtimer_callback, NULL);
145 @@ -6711,7 +6711,7 @@ gchar *p;
147 static void display_invalid_prodvdkey() {
149 - if (curset.isProDVD && curset.cdrtype > 1000) {
150 + if (curset.isDVD && curset.cdrtype > 1000) {
151 show_dialog(ICO_WARN, _("cdrecord-ProDVD terminated.\n\nMost likely because you have entered\nan invalid key. Please check if it is correct."), T_OK, NULL, NULL, 0);
154 @@ -9900,17 +9900,17 @@ gint wrmode;
155 /* check the version of cdrecord */
156 /* return 1 if not correct (to old) */
158 -gint check_version_cdrecord(gchar *match, gchar *found, gint *isProDVD) {
159 +gint check_version_cdrecord(gchar *match, gchar *found, gint *isDVD) {
160 gchar line[MAXLINE];
161 gchar vline[MAXLINE];
162 gchar ver[MAXLINE];
163 FILE *fpin;
164 gchar *p;
166 - *isProDVD = 0;
167 + *isDVD = 0;
168 strcpy(ver,"");
169 get_wrap_path("CDRECORD",line);
170 - strcat(line," -version 2>/dev/null");
171 + strcat(line," -version 2>&1");
173 dodebug(1, "calling: %s\n", line);
174 if ((fpin = popen(line,"r")) == NULL) {
175 @@ -9930,7 +9930,7 @@ gchar *p;
177 if (strstr(line, "This version is an unofficial (modified) version with DVD support")) {
178 dodebug(1, "WARNING: Inoffical cdrecord version found!\n", line);
179 - *isProDVD = 1;
180 + *isDVD = 1;
184 @@ -9955,7 +9955,7 @@ gchar *p;
185 } else {
186 p = strstr(vline, "ProDVD");
187 if (p != NULL) {
188 - *isProDVD = 1;
189 + *isDVD = 1;
190 p = strtok(p, " ");
191 if (p != NULL) {
192 p = strtok(NULL, " ");
193 @@ -10005,6 +10005,7 @@ gchar *p;
195 gint check_version_mkisofs(gchar *match, gchar *found) {
196 gchar line[MAXLINE];
197 +gchar vline[MAXLINE];
198 gchar ver[MAXLINE];
199 FILE *fpin;
200 gchar *p;
201 @@ -10019,17 +10020,22 @@ gchar *p;
204 strcpy(line,"");
205 + strcpy(vline,"");
206 for (;;) {
207 if (fgets(line,MAXLINE,fpin) == NULL)
208 break;
209 dodebug(10,"got: %s",line);
210 + /* only get first line */
211 + if (strcmp(vline,"") == 0) {
212 + strncpy(vline, line, MAXLINE);
216 if (pclose(fpin) == -1) {
217 g_error("pclose error\n");
220 - if (strcmp(line,"") == 0 || strstr(line,"sh:") != NULL) {
221 + if (strcmp(vline,"") == 0 || strstr(vline,"sh:") != NULL) {
222 /* failed to open - permission denied */
223 return 2;
225 @@ -10038,9 +10044,9 @@ gchar *p;
226 /* now line contains the version string of mkisofs */
227 /* try to extract the version number */
229 - p = strstr(line,"mkisofs");
230 + p = strstr(line,"genisoimage");
231 if (p != NULL) {
232 - p = strtok(p+8, " ");
233 + p = strtok(p+11, " ");
234 if (p != NULL) {
235 strcpy(ver,p);
237 @@ -10070,7 +10076,7 @@ gchar line[MAXLINE];
238 gchar ver[MAXLINE];
239 FILE *fpin;
240 gchar *p;
242 + int icedax=0;
243 strcpy(ver,"");
244 get_wrap_path("CDDA2WAV",line);
245 strcat(line," -version 2>&1");
246 @@ -10085,6 +10091,9 @@ gchar *p;
247 if (fgets(line,MAXLINE,fpin) == NULL)
248 break;
249 dodebug(10,"got: %s",line);
250 + if (strstr(line, "icedax") != NULL) {
251 + icedax=1;
252 + }
255 if (pclose(fpin) == -1) {
256 @@ -10096,6 +10105,11 @@ gchar *p;
257 return 2;
260 + if (icedax) {
261 + strcpy(found, CDDA2WAV_VERSION);
262 + return 0;
263 + }
265 /* now line contains the version string of cdda2wav */
266 /* try to extract the version number */
268 @@ -10137,13 +10151,14 @@ gchar *p;
270 gint check_version_readcd(gchar *match, gchar *found) {
271 gchar line[MAXLINE];
272 +gchar vline[MAXLINE];
273 gchar ver[MAXLINE];
274 FILE *fpin;
275 gchar *p;
277 strcpy(ver,"");
278 get_wrap_path("READCD",line);
279 - strcat(line," -version 2>/dev/null");
280 + strcat(line," -version 2>/dev/null | fgrep " READCD_NAME);
282 dodebug(1, "calling: %s\n", line);
283 if ((fpin = popen(line,"r")) == NULL) {
284 @@ -10155,17 +10170,22 @@ gchar *p;
286 #if 0
287 strcpy(line,"");
288 + strcpy(vline,"");
289 for (;;) {
290 if (fgets(line,MAXLINE,fpin) == NULL)
291 break;
292 dodebug(10,"got: %s",line);
293 + /* only get first line */
294 + if (strcmp(vline,"") == 0) {
295 + strncpy(vline, line, MAXLINE);
299 if (pclose(fpin) == -1) {
300 g_error("pclose error\n");
303 - if (strcmp(line,"") == 0 || strstr(line,"sh:") != NULL) {
304 + if (strcmp(vline,"") == 0 || strstr(vline,"sh:") != NULL) {
305 /* failed to open - permission denied */
306 return 2;
308 diff -up xcdroast-0.98alpha16/src/main.c.cdrkit xcdroast-0.98alpha16/src/main.c
309 --- xcdroast-0.98alpha16/src/main.c.cdrkit 2009-02-17 06:34:16.000000000 -0500
310 +++ xcdroast-0.98alpha16/src/main.c 2009-02-17 06:34:16.000000000 -0500
311 @@ -226,7 +226,7 @@ gchar tmp[MAXLINE];
312 gtk_box_pack_start(GTK_BOX(sidespace), side_t,TRUE,TRUE,0);
314 side_t_btn1 = gtk_button_new_with_label (_("Setup"));
315 - if (!curset.isProDVD) {
316 + if (!curset.isDVD) {
317 side_t_btn2 = gtk_button_new_with_label (_("Duplicate CD"));
318 side_t_btn3 = gtk_button_new_with_label (_("Create CD"));
319 } else {
320 diff -up xcdroast-0.98alpha16/src/setup.c.cdrkit xcdroast-0.98alpha16/src/setup.c
321 --- xcdroast-0.98alpha16/src/setup.c.cdrkit 2009-02-17 06:34:16.000000000 -0500
322 +++ xcdroast-0.98alpha16/src/setup.c 2009-02-17 06:34:16.000000000 -0500
323 @@ -316,7 +316,7 @@ gchar tmp[MAXLINE];
324 dolog(2, "Confirm setup\n");
326 /* some lasts checks and warnings */
327 - if (is_dvdwriter(setupdata.writer_devnr) && !curset.isProDVD) {
328 + if (is_dvdwriter(setupdata.writer_devnr) && !curset.isDVD) {
329 ret = show_dialog(ICO_WARN, _("Please note that you have to install ProDVD support before\nyou can write DVDs. Currently you will only be able to\nwrite regular CDs with your DVD-Writer."), T_OK,T_CANCEL, NULL, 0);
330 if (ret == 1) {
331 /* abort */
332 @@ -1148,7 +1148,7 @@ static const gchar *helpwritemodes[] = H
333 gtk_box_pack_start(GTK_BOX(vbox2),tbl,FALSE,TRUE,0);
334 gtk_widget_show(tbl);
336 - if (!curset.isProDVD) {
337 + if (!curset.isDVD) {
338 l1 = rightjust_gtk_label_new(_("CD Writer Device:"));
339 } else {
340 l1 = rightjust_gtk_label_new(_("CD/DVD Writer Device:"));
341 @@ -2788,7 +2788,7 @@ GtkWidget *check;
342 gtk_text_set_point(GTK_TEXT(txt),0);
343 gtk_text_thaw(GTK_TEXT(txt));
345 - if (curset.isProDVD == 0) {
346 + if (curset.isDVD == 0) {
347 gtk_widget_set_sensitive(f1, FALSE);
348 gtk_widget_set_sensitive(l1, FALSE);
349 gtk_widget_set_sensitive(txt, FALSE);
350 @@ -3198,7 +3198,7 @@ gchar tmp[MAXLINE];
351 gtk_container_add (GTK_CONTAINER (f1), tbl);
352 gtk_widget_show(tbl);
354 - if (!curset.isProDVD) {
355 + if (!curset.isDVD) {
356 check = gtk_check_button_new_with_label(_("change CD Writer Device"));
357 } else {
358 check = gtk_check_button_new_with_label(_("change CD/DVD Writer Device"));
359 @@ -3220,7 +3220,7 @@ gchar tmp[MAXLINE];
360 gtk_widget_show(check);
361 define_tooltip(check, _("If enabled, then the user is allowed the change the write parameters for the CD Writer (e.g. Speed and FIFO-Buffer-Size)."));
363 - if (!curset.isProDVD) {
364 + if (!curset.isDVD) {
365 check = gtk_check_button_new_with_label(_("change CD Reader Device"));
366 } else {
367 check = gtk_check_button_new_with_label(_("change CD/DVD Reader Device"));
368 @@ -3387,7 +3387,7 @@ gint i;
369 gtk_notebook_append_page(GTK_NOTEBOOK (notebook),f1,l1);
370 draw_scsi_scan(f1);
372 - if (!curset.isProDVD) {
373 + if (!curset.isDVD) {
374 l2 = gtk_label_new(_("CD Settings"));
375 } else {
376 l2 = gtk_label_new(_("CD/DVD Settings"));
377 diff -up xcdroast-0.98alpha16/src/xtools.c.cdrkit xcdroast-0.98alpha16/src/xtools.c
378 --- xcdroast-0.98alpha16/src/xtools.c.cdrkit 2008-08-20 12:10:28.000000000 -0400
379 +++ xcdroast-0.98alpha16/src/xtools.c 2009-02-17 06:34:16.000000000 -0500
380 @@ -2403,7 +2403,7 @@ gchar tmp[MAXLINE];
382 gint get_gracetime() {
384 - if (curset.isProDVD && curset.cdrtype > 1000) {
385 + if (curset.isDVD && curset.cdrtype > 1000) {
386 /* use 10 seconds for prodvd, because the keycheck
387 can take a while... */
388 return 10;
389 @@ -3521,7 +3521,7 @@ gint isdvd,i;
390 isdvd = 0;
391 i = get_writerreaderdevs_index(devnr);
393 - if (i >= 0 && curset.isProDVD && writerreaderdevs[i]->is_dvdwriter) {
394 + if (i >= 0 && curset.isDVD && writerreaderdevs[i]->is_dvdwriter) {
395 if (convert_devnr2busid(devnr,tmp) != 0) {
396 g_error("non existing cdrom?");