7
7
***************************************************************************/
10
* This program is free software; you can redistribute it and/or modify
10
* Brasero is free software; you can redistribute it and/or modify
11
11
* it under the terms of the GNU General Public License as published by
12
12
* the Free Software Foundation; either version 2 of the License, or
13
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
15
* Brasero is distributed in the hope that it will be useful,
16
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
18
* GNU Library General Public License for more details.
20
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
* along with this program; if not, write to:
22
* The Free Software Foundation, Inc.,
23
* 51 Franklin Street, Fifth Floor
24
* Boston, MA 02110-1301, USA.
25
27
#ifdef HAVE_CONFIG_H
56
58
if (strstr (line, "unable to proceed with format")
57
|| strstr (line, "unable to umount")
58
59
|| strstr (line, "media is not blank")
59
60
|| strstr (line, "media is already formatted")
60
61
|| strstr (line, "you have the option to re-run")) {
61
/* FIXME: this error needs a better message */
62
brasero_job_error (BRASERO_JOB (process),
63
g_error_new (BRASERO_BURN_ERROR,
64
BRASERO_BURN_ERROR_GENERAL,
65
_("Unhandled error, aborting")));
62
brasero_job_error (BRASERO_JOB (process),
63
g_error_new (BRASERO_BURN_ERROR,
64
BRASERO_BURN_ERROR_MEDIUM_INVALID,
65
_("The disc is not supported")));
66
return BRASERO_BURN_OK;
68
else if (strstr (line, "unable to umount")) {
69
brasero_job_error (BRASERO_JOB (process),
70
g_error_new (BRASERO_BURN_ERROR,
71
BRASERO_BURN_ERROR_DRIVE_BUSY,
72
_("The drive is busy")));
66
73
return BRASERO_BURN_OK;
99
106
brasero_job_get_media (BRASERO_JOB (process), &media);
100
107
brasero_job_get_flags (BRASERO_JOB (process), &flags);
101
if (!BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW_PLUS)
108
if (!BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_BDRE)
109
&& !BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW_PLUS)
102
110
&& !BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW_RESTRICTED)) {
103
111
gchar *blank_str;
155
163
/* NOTE: sequential and restricted are added later on demand */
156
164
const BraseroMedia media = BRASERO_MEDIUM_DVD|
157
BRASERO_MEDIUM_DVD_DL|
165
BRASERO_MEDIUM_DUAL_L|
158
166
BRASERO_MEDIUM_REWRITABLE|
159
167
BRASERO_MEDIUM_APPENDABLE|
160
168
BRASERO_MEDIUM_CLOSED|
161
169
BRASERO_MEDIUM_HAS_DATA|
162
170
BRASERO_MEDIUM_UNFORMATTED|
163
171
BRASERO_MEDIUM_BLANK;
172
BraseroBurnResult result;
167
175
brasero_plugin_define (plugin,
169
_("dvd+rw-format erases and formats DVD+/-RW"),
177
_("Dvd+rw-format erases and formats DVD+/-R(W)"),
170
178
"Philippe Rouquier",
173
/* First see if this plugin can be used, i.e. if growisofs is in
175
prog_name = g_find_program_in_path ("dvd+rw-format");
177
*error = g_strdup (_("dvd+rw-format could not be found in the path"));
178
return BRASERO_BURN_ERR;
181
/* First see if this plugin can be used */
182
result = brasero_process_check_path ("dvd+rw-format", error);
183
if (result != BRASERO_BURN_OK)
182
186
output = brasero_caps_disc_new (media|
183
188
BRASERO_MEDIUM_PLUS|
184
189
BRASERO_MEDIUM_RESTRICTED|
185
190
BRASERO_MEDIUM_SEQUENTIAL);