~mfisch/brasero/update-to-3.8.0

« back to all changes in this revision

Viewing changes to libbrasero-burn/brasero-burn.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-08-31 15:25:44 UTC
  • mfrom: (1.1.43 upstream)
  • Revision ID: james.westby@ubuntu.com-20100831152544-9lfh5n4atqc91i26
Tags: 2.31.91-0ubuntu1
* New upstream release
* debian/control:
  - Bump build-depends on libglib2.0-dev, libgconf2-dev
  - Drop build-depend on libunique
* debian/rules:
* debian/libbrasero-media0.install:
* debian/libbrasero-media1.install:
  - Update shlibs for libbrasero-media1
* debian/brasero-common.install:
  - Install gsettings files
* debian/libbrasero-media0.install:
* debian/rules:
* debian/patches/01_pkglibdir.patch:
  - Remove versioned plugin directory - the upstream build system has changed
* debian/patches/013_gsettings_backend.patch:
  - Remove hardcoded gconf gsettings backend
* debian/patches/014_plugin_directory.patch:
  - Fix plugin directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
        ACTION_CHANGED_SIGNAL,
137
137
        DUMMY_SUCCESS_SIGNAL,
138
138
        EJECT_FAILURE_SIGNAL,
 
139
        BLANK_FAILURE_SIGNAL,
139
140
        INSTALL_MISSING_SIGNAL,
140
141
        LAST_SIGNAL
141
142
} BraseroBurnSignalType;
191
192
}
192
193
 
193
194
static BraseroBurnResult
194
 
brasero_burn_emit_signal (BraseroBurn *burn, guint signal, BraseroBurnResult default_answer)
 
195
brasero_burn_emit_signal (BraseroBurn *burn,
 
196
                          guint signal,
 
197
                          BraseroBurnResult default_answer)
195
198
{
196
199
        GValue instance_and_params;
197
200
        GValue return_value;
540
543
                        g_set_error (error,
541
544
                                     BRASERO_BURN_ERROR,
542
545
                                     BRASERO_BURN_ERROR_OUTPUT_NONE,
543
 
                                     _("No burner specified"));
 
546
                                     "%s", _("No burner specified"));
544
547
                        return BRASERO_BURN_ERR;
545
548
                }
546
549
        }
580
583
                g_set_error (error,
581
584
                             BRASERO_BURN_ERROR,
582
585
                             BRASERO_BURN_ERROR_GENERAL,
583
 
                             _("No source drive specified"));
 
586
                             "%s", _("No source drive specified"));
584
587
                return BRASERO_BURN_ERR;
585
588
        }
586
589
 
672
675
                g_set_error (error,
673
676
                             BRASERO_BURN_ERROR,
674
677
                             BRASERO_BURN_ERROR_OUTPUT_NONE,
675
 
                             _("No burner specified"));
 
678
                             "%s", _("No burner specified"));
676
679
                return BRASERO_BURN_NOT_SUPPORTED;
677
680
        }
678
681
 
689
692
                g_set_error (error,
690
693
                             BRASERO_BURN_ERROR,
691
694
                             BRASERO_BURN_ERROR_MEDIUM_NOT_REWRITABLE,
692
 
                             _("The drive has no rewriting capabilities"));
 
695
                             "%s", _("The drive has no rewriting capabilities"));
693
696
                return BRASERO_BURN_NOT_SUPPORTED;
694
697
        }
695
698
 
755
758
                g_set_error (error,
756
759
                             BRASERO_BURN_ERROR,
757
760
                             BRASERO_BURN_ERROR_OUTPUT_NONE,
758
 
                             _("No burner specified"));
 
761
                             "%s", _("No burner specified"));
759
762
                return BRASERO_BURN_ERR;
760
763
        }
761
764
 
764
767
                g_set_error (error,
765
768
                             BRASERO_BURN_ERROR,
766
769
                             BRASERO_BURN_ERROR_GENERAL,
767
 
                             _("The drive cannot burn"));
 
770
                             "%s", _("The drive cannot burn"));
768
771
                BRASERO_BURN_NOT_SUPPORTED_LOG (burn);
769
772
        }
770
773
 
1751
1754
                g_set_error (error,
1752
1755
                             BRASERO_BURN_ERROR,
1753
1756
                             BRASERO_BURN_ERROR_GENERAL,
1754
 
                             _("There is no track to burn"));
 
1757
                             "%s", _("There is no track to burn"));
1755
1758
                return BRASERO_BURN_ERR;
1756
1759
        }
1757
1760
 
1816
1819
                                g_set_error (error,
1817
1820
                                             BRASERO_BURN_ERROR,
1818
1821
                                             BRASERO_BURN_ERROR_GENERAL,
1819
 
                                             _("Merging data is impossible with this disc"));
 
1822
                                             "%s", _("Merging data is impossible with this disc"));
1820
1823
                                return BRASERO_BURN_ERR;
1821
1824
                        }
1822
1825
                        /* No need to tell the user burnproof is not supported
1865
1868
                        g_set_error (error,
1866
1869
                                     BRASERO_BURN_ERROR,
1867
1870
                                     BRASERO_BURN_ERROR_MISSING_APP_AND_PLUGIN,
1868
 
                                     string->str);
 
1871
                                     "%s", string->str);
1869
1872
 
1870
1873
                        g_string_free (string, TRUE);
1871
1874
                }
2051
2054
                return result;
2052
2055
        }
2053
2056
 
2054
 
        /* performed some additional tests that can
2055
 
         * only be performed at this point. They are
2056
 
         * mere warnings. */
 
2057
        /* performed some additional tests that can only be performed at this
 
2058
         * point. They are mere warnings. */
2057
2059
        result = brasero_burn_check_data_loss (burn, error);
2058
2060
        if (result != BRASERO_BURN_OK) {
2059
2061
                brasero_burn_session_pop_settings (priv->session);
2148
2150
                         * data on it when we get to the real recording. */
2149
2151
                        if (erase_allowed) {
2150
2152
                                result = brasero_burn_run_eraser (burn, error);
2151
 
                                if (result != BRASERO_BURN_OK)
 
2153
                                if (result == BRASERO_BURN_CANCEL)
 
2154
                                        return result;
 
2155
 
 
2156
                                /* If the erasing process did not work then do
 
2157
                                 * not fail and cancel the entire session but
 
2158
                                 * ask the user if he wants to insert another
 
2159
                                 * disc instead. */
 
2160
                                if (result != BRASERO_BURN_OK) {
 
2161
                                        BraseroBurnResult local_result;
 
2162
 
 
2163
                                        local_result = brasero_burn_emit_signal (burn,
 
2164
                                                                                 BLANK_FAILURE_SIGNAL,
 
2165
                                                                                 BRASERO_BURN_ERR);
 
2166
                                        if (local_result == BRASERO_BURN_OK) {
 
2167
                                                local_result = brasero_burn_reload_dest_media (burn,
 
2168
                                                                                               BRASERO_BURN_ERROR_NONE,
 
2169
                                                                                               NULL);
 
2170
                                                if (local_result == BRASERO_BURN_OK)
 
2171
                                                        result = BRASERO_BURN_RETRY;
 
2172
                                        }
 
2173
 
2152
2174
                                        break;
 
2175
                                }
2153
2176
 
2154
2177
                                /* Since we blanked/formatted we need to recheck the burn 
2155
2178
                                 * flags with the new medium type as some flags could have
2556
2579
                g_set_error (error,
2557
2580
                             BRASERO_BURN_ERROR,
2558
2581
                             BRASERO_BURN_ERROR_GENERAL,
2559
 
                             _("Only one track at a time can be checked"));
 
2582
                             "%s", _("Only one track at a time can be checked"));
2560
2583
                return BRASERO_BURN_ERR;
2561
2584
        }
2562
2585
 
2615
2638
                g_set_error (error,
2616
2639
                             BRASERO_BURN_ERROR,
2617
2640
                             BRASERO_BURN_ERROR_GENERAL,
2618
 
                             _("No format for the temporary image could be found"));
 
2641
                             "%s", _("No format for the temporary image could be found"));
2619
2642
                return result;
2620
2643
        }
2621
2644
 
2826
2849
                g_set_error (error,
2827
2850
                             BRASERO_BURN_ERROR,
2828
2851
                             BRASERO_BURN_ERROR_GENERAL,
2829
 
                             _("An internal error occurred"));
 
2852
                             "%s", _("An internal error occurred"));
2830
2853
        }
2831
2854
 
2832
2855
        if (result == BRASERO_BURN_CANCEL) {
2925
2948
                goto end;
2926
2949
 
2927
2950
        result = brasero_burn_blank_real (burn, &ret_error);
2928
 
        while (result == BRASERO_BURN_ERR
2929
 
        &&     ret_error
2930
 
        &&     ret_error->code == BRASERO_BURN_ERROR_MEDIUM_NOT_REWRITABLE) {
 
2951
        while (result == BRASERO_BURN_ERR &&
 
2952
               ret_error &&
 
2953
               ret_error->code == BRASERO_BURN_ERROR_MEDIUM_NOT_REWRITABLE) {
2931
2954
                g_error_free (ret_error);
2932
2955
                ret_error = NULL;
2933
2956
 
3166
3189
                              brasero_marshal_INT__OBJECT,
3167
3190
                              G_TYPE_INT, 1,
3168
3191
                              BRASERO_TYPE_DRIVE);
3169
 
        brasero_burn_signals [INSTALL_MISSING_SIGNAL] =
 
3192
        brasero_burn_signals [BLANK_FAILURE_SIGNAL] =
 
3193
                g_signal_new ("blank_failure",
 
3194
                              G_TYPE_FROM_CLASS (klass),
 
3195
                              G_SIGNAL_RUN_LAST,
 
3196
                              G_STRUCT_OFFSET (BraseroBurnClass,
 
3197
                                               blank_failure),
 
3198
                              NULL, NULL,
 
3199
                              brasero_marshal_INT__VOID,
 
3200
                              G_TYPE_INT, 0,
 
3201
                              G_TYPE_NONE);
 
3202
        brasero_burn_signals [INSTALL_MISSING_SIGNAL] =
3170
3203
                g_signal_new ("install_missing",
3171
3204
                              G_TYPE_FROM_CLASS (klass),
3172
3205
                              G_SIGNAL_RUN_LAST,