~ubuntu-branches/debian/wheezy/brasero/wheezy

« back to all changes in this revision

Viewing changes to src/plugins/growisofs/burn-dvd-rw-format.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette, Pedro Fragoso, Luca Bruno, Josselin Mouette, Emilio Pozuelo Monfort
  • Date: 2009-06-24 18:59:46 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624185946-iyxkgf3gjptir5y3
Tags: 2.26.2-1
[ Pedro Fragoso ]
* Add myself to Maintainer field
  - Thanks Ondřej Surý
* New upstream version (Closes: #528945)
  - Split package into brasero, libbrasero-media0 and libbrasero-dev
  - Add Replaces to libbrasero-media0
  - Bump libgtk to 2.14.0
  - Remove libnotify Build-dep
  - Add Build-dep libnautilus-extension-dev (>= 2.22.2)
    and install it.
  - Add Build-dep to libsm-dev
  - Add Build-dep on intltool
* Install omf files to prevent crash on Help
* Move gstreamer0.10-plugins-bad to Suggests, and add
  dvdauthor and vcdimager
* Recommends gvfs (Closes: #491827)
* Pass --disable-scrollkeeper in DEB_CONFIGURE_EXTRA_FLAGS
* debian/patches/007-fix-gnome-doc-utils-path.patch:
  - Removed, not needed anymore
* debian/patches/008-fix-volume-identifier-crash.patch:
  - Removed, merged upstream
* debian/patches/011_nautilus_menu_move.patch:
 - Move CD/DVD Creator Menu to Acessories, taken from Ubuntu

[ Luca Bruno ]
* debian/control.in:
  - Add Build-Depend gtk-doc-tools 1.9.
* debian/patches/006-fix-libdvdcss.patch:
  - Removed as applied upstream.

[ Josselin Mouette ]
* New upstream release.
* Update build-dependencies.
* Move the translations and data to a new brasero-common package.
* Rewrite the descriptions.
* Add -dev depends to the development package.
* Remove inappropriate recommends in the library package.
* Let’s not forget dvd+rw-tools so that we can write DVDs too.
* Rework dependencies accordingly.
* Put the nautilus extension in brasero.
* Conflict against nautilus-cd-burner to avoid having two burning 
  extensions.
* Include clean-la.mk and gnome-version.mk; build-depend on 
  gnome-pkg-tools 0.7.
* Don’t run dh_makeshlibs on brasero and libbrasero-plugins.
* 011_nautilus_menu_move.patch: add NoDisplay=true, this icon is 
  duplicating existing functionality (brasero icon in sound&video 
  menu, and nautilus autorun).
* Update list of copyright holders.

[ Emilio Pozuelo Monfort ]
* debian/copyright: updated.

[ Josselin Mouette ]
* copyright: improve indentation, and point to versioned LGPL.
* 090_relibtoolize.patch: add a relibtoolization patch to avoid the 
  rpath crap.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 ***************************************************************************/
8
8
 
9
9
/*
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.
14
14
 *
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.
19
19
 *
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.
23
25
 */
24
26
 
25
27
#ifdef HAVE_CONFIG_H
39
41
#include "burn-plugin.h"
40
42
#include "burn-job.h"
41
43
#include "burn-process.h"
42
 
#include "burn-medium.h"
 
44
#include "brasero-medium.h"
43
45
#include "burn-dvd-rw-format.h"
44
46
#include "burn-growisofs-common.h"
45
47
 
54
56
        float percent;
55
57
 
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;
 
67
        }
 
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;
67
74
        }
68
75
 
98
105
 
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;
104
112
 
154
162
{
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;
164
 
        gchar *prog_name;
 
172
        BraseroBurnResult result;
165
173
        GSList *output;
166
174
 
167
175
        brasero_plugin_define (plugin,
168
176
                               "dvd+rw-format",
169
 
                               _("dvd+rw-format erases and formats DVD+/-RW"),
 
177
                               _("Dvd+rw-format erases and formats DVD+/-R(W)"),
170
178
                               "Philippe Rouquier",
171
 
                               0);
 
179
                               4);
172
180
 
173
 
        /* First see if this plugin can be used, i.e. if growisofs is in
174
 
         * the path */
175
 
        prog_name = g_find_program_in_path ("dvd+rw-format");
176
 
        if (!prog_name) {
177
 
                *error = g_strdup (_("dvd+rw-format could not be found in the path"));
178
 
                return BRASERO_BURN_ERR;
179
 
        }
180
 
        g_free (prog_name);
 
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)
 
184
                return result;
181
185
 
182
186
        output = brasero_caps_disc_new (media|
 
187
                                        BRASERO_MEDIUM_BDRE|
183
188
                                        BRASERO_MEDIUM_PLUS|
184
189
                                        BRASERO_MEDIUM_RESTRICTED|
185
190
                                        BRASERO_MEDIUM_SEQUENTIAL);
188
193
 
189
194
        brasero_plugin_set_blank_flags (plugin,
190
195
                                        media|
 
196
                                        BRASERO_MEDIUM_BDRE|
191
197
                                        BRASERO_MEDIUM_PLUS|
192
198
                                        BRASERO_MEDIUM_RESTRICTED,
193
199
                                        BRASERO_BURN_FLAG_NOGRACE,