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;
6 vbox = gtk_vbox_new(FALSE,10);
7 gtk_table_attach_defaults(GTK_TABLE(tbl),vbox,1,2,0,1);
8 - if (!curset.isProDVD) {
10 f1 = gtk_frame_new(_("CD-Information"));
12 f1 = gtk_frame_new(_("CD/DVD-Information"));
13 @@ -1260,7 +1260,7 @@ GtkWidget *scrolled_win, *img_list;
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"));
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"));
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);
35 - if (curset.isProDVD) {
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"));
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);
53 - if (!curset.isProDVD) {
54 + if (!curset.isDVD) {
55 l1 = rightjust_gtk_label_new(_("Make CD bootable?"));
57 l1 = rightjust_gtk_label_new(_("Make CD/DVD bootable?"));
58 @@ -7023,7 +7023,7 @@ gchar tmp2[MAXLINE];
59 gtk_widget_show (menu_item);
62 - if (curset.isProDVD) {
65 tmpval = curset.cdrtype;
66 while (dvdtypes[i] != 0) {
67 @@ -7174,7 +7174,7 @@ gchar tmp2[MAXLINE];
69 define_tooltip(b1,_("Set additional write options for advanced users."));
71 - if (!curset.isProDVD) {
72 + if (!curset.isDVD) {
73 b1 = gtk_button_new_with_label(_("Blank CD-RW"));
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;
83 - curset.isProDVD = 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;
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);
113 - fd = open(fname,O_WRONLY | O_CREAT);
114 + fd = open(fname,O_WRONLY | O_CREAT, 0600);
116 g_warning("Can't open file %s for writing\n",fname);
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) {
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) {
161 gchar vline[MAXLINE];
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);
184 @@ -9955,7 +9955,7 @@ gchar *p;
186 p = strstr(vline, "ProDVD");
192 p = strtok(NULL, " ");
193 @@ -10005,6 +10005,7 @@ gchar *p;
195 gint check_version_mkisofs(gchar *match, gchar *found) {
197 +gchar vline[MAXLINE];
201 @@ -10019,17 +10020,22 @@ gchar *p;
207 if (fgets(line,MAXLINE,fpin) == NULL)
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 */
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");
232 - p = strtok(p+8, " ");
233 + p = strtok(p+11, " ");
237 @@ -10070,7 +10076,7 @@ gchar line[MAXLINE];
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)
249 dodebug(10,"got: %s",line);
250 + if (strstr(line, "icedax") != NULL) {
255 if (pclose(fpin) == -1) {
256 @@ -10096,6 +10105,11 @@ gchar *p;
261 + strcpy(found, CDDA2WAV_VERSION);
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) {
272 +gchar vline[MAXLINE];
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;
290 if (fgets(line,MAXLINE,fpin) == NULL)
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 */
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"));
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);
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:"));
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"));
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"));
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);
372 - if (!curset.isProDVD) {
373 + if (!curset.isDVD) {
374 l2 = gtk_label_new(_("CD Settings"));
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... */
389 @@ -3521,7 +3521,7 @@ gint isdvd,i;
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?");