Commit cb272d4b authored by Philippe Rouquier's avatar Philippe Rouquier

Big patch (sorry I was away and couldn\'t commit earlier)

	This fixes bugs
	#477769 – Building without libburn
	#480712 – Brasero Plugins UI
	#488817 – Plugin problems?
	#490853 – Brasero refuses to start burning showing a \"File not found\" error, sometimes (weird)
	- simplified plugin dialog (only unnecessary functionalities are shown)
	- added switches to build only a set of plugins (cdrkit, libburnia, cdrtools)
	- kept all plugins\' priority under apps/brasero/config/priority
	- added group existence to plugins and a gconf key for favourite group
	   now brasero tries to use plugins from the same group (most probably the favourite one if any)
	- fix a bug where joliet option was hidden (see # )
	- fix a bug where CDRW where appended instead of being blanked
	- temporary fix for use of DAO (should be used only for first session)
	- improved flags handling in general by removing some hard set rules
	- fix drive locking when merging
	
	Now strings should be frozen hopefully.
	More to come:
	- MD5 fixes (through the use of readcd/readom)
	- improvement in flags handling by plugins (possibility to set concurent flags)
	

	* configure.in:
	* data/brasero.schemas.in:
	* src/brasero-burn-dialog.c: (brasero_burn_dialog_run):
	* src/brasero-data-disc.c: (brasero_data_disc_import_session_cb),
	(brasero_data_disc_update_multi_button_state),
	(brasero_data_disc_set_session_param):
	* src/brasero-dest-selection.c:
	(brasero_dest_selection_drive_properties),
	(brasero_dest_selection_set_drive_properties),
	(brasero_dest_selection_check_drive_settings):
	* src/brasero-disc-copy-dialog.c: (brasero_disc_copy_dialog_init):
	* src/brasero-disc-option-dialog.c:
	(brasero_disc_option_dialog_update_multi),
	(brasero_disc_option_dialog_set_joliet),
	(brasero_disc_option_dialog_set_multi),
	(brasero_disc_option_dialog_set_disc),
	(brasero_disc_option_dialog_init):
	* src/brasero-image-option-dialog.c:
	(brasero_image_option_dialog_init):
	* src/brasero-ncb.c: (NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS),
	(NCB_MEDIA_GET_LAST_DATA_TRACK_SPACE):
	* src/brasero-ncb.h:
	* src/brasero-plugin-manager-ui.c:
	(plugin_manager_ui_populate_lists), (model_name_sort_func),
	(plugin_manager_ui_construct_tree),
	(brasero_plugin_manager_ui_init):
	* src/burn-basics.h:
	* src/burn-caps.c: (brasero_burn_caps_finalize),
	(brasero_burn_caps_init),
	(brasero_burn_caps_register_plugin_group),
	(brasero_burn_caps_new_blanking_task),
	(brasero_burn_caps_new_checksuming_task),
	(brasero_caps_link_check_data_flags),
	(brasero_caps_link_check_record_flags), (brasero_caps_try_links),
	(brasero_caps_link_find_plugin), (brasero_burn_caps_new_task),
	(brasero_caps_try_output), (brasero_caps_try_output_with_blanking),
	(brasero_burn_caps_is_input_supported),
	(brasero_burn_caps_is_output_supported),
	(brasero_burn_caps_get_required_media_type),
	(brasero_caps_get_flags), (brasero_caps_get_flags_for_disc),
	(brasero_burn_caps_get_flags):
	* src/burn-caps.h:
	* src/burn-job.c: (brasero_job_get_last_session_address),
	(brasero_job_get_next_writable_address):
	* src/burn-job.h:
	* src/burn-medium.c: (brasero_medium_get_last_data_track_address),
	(brasero_medium_get_last_data_track_space),
	(brasero_medium_track_volume_size):
	* src/burn-medium.h:
	* src/burn-plugin-manager.c:
	(brasero_plugin_manager_set_plugins_state),
	(brasero_plugin_manager_plugin_state_changed):
	* src/burn-plugin-private.h:
	* src/burn-plugin.c: (brasero_plugin_get_active),
	(brasero_plugin_get_gconf_priority_key), (brasero_plugin_define),
	(brasero_plugin_register_group), (brasero_plugin_get_group),
	(brasero_plugin_get_record_flags), (brasero_plugin_get_priority),
	(brasero_plugin_priority_changed), (brasero_plugin_init_real):
	* src/burn-plugin.h:
	* src/burn-session.c:
	* src/burn.c: (brasero_burn_is_loaded_dest_media_supported),
	(brasero_burn_lock_dest_media), (brasero_burn_run_imager),
	(brasero_burn_run_recorder),
	(brasero_burn_check_session_consistency):
	* src/plugins/Makefile.am:
	* src/plugins/cdrdao/Makefile.am:
	* src/plugins/cdrdao/burn-cdrdao-common.h:
	* src/plugins/cdrdao/burn-cdrdao.c: (brasero_cdrdao_export_caps):
	* src/plugins/cdrdao/burn-toc2cue.c: (brasero_toc2cue_export_caps):
	* src/plugins/cdrkit/Makefile.am:
	* src/plugins/cdrkit/burn-cdrkit.h:
	* src/plugins/cdrkit/burn-genisoimage.c:
	(brasero_genisoimage_set_argv_image),
	(brasero_genisoimage_export_caps):
	* src/plugins/cdrkit/burn-readom.c: (brasero_readom_export_caps):
	* src/plugins/cdrkit/burn-wodim.c: (brasero_wodim_export_caps):
	* src/plugins/cdrtools/Makefile.am:
	* src/plugins/cdrtools/burn-cdrecord.c:
	(brasero_cdrecord_export_caps):
	* src/plugins/cdrtools/burn-cdrtools.h:
	* src/plugins/cdrtools/burn-mkisofs.c:
	(brasero_mkisofs_set_argv_image), (brasero_mkisofs_set_argv),
	(brasero_mkisofs_export_caps):
	* src/plugins/cdrtools/burn-readcd.c: (brasero_readcd_export_caps):
	* src/plugins/checksum/burn-md5.c: (brasero_md5_file),
	(brasero_md5_file_to_string):
	* src/plugins/checksum/burn-md5.h:
	* src/plugins/checksum/burn-md5sum.c: (brasero_md5sum_start_md5),
	(brasero_md5sum_image), (brasero_md5sum_disc),
	(brasero_md5sum_disc_files):
	* src/plugins/growisofs/Makefile.am:
	* src/plugins/growisofs/burn-dvd-rw-format.c:
	(brasero_dvd_rw_format_export_caps):
	* src/plugins/growisofs/burn-growisofs-common.h:
	* src/plugins/growisofs/burn-growisofs.c:
	(brasero_growisofs_export_caps):
	* src/plugins/libburnia/Makefile.am:
	* src/plugins/libburnia/burn-libburn.c:
	(brasero_libburn_export_caps):
	* src/plugins/libburnia/burn-libburnia.h:
	* src/plugins/libburnia/burn-libisofs.c:
	(brasero_libisofs_export_caps):

svn path=/trunk/; revision=450
parent 7ede24d5
2007-10-31 Philippe Rouquier <philippr@svn.gnome.org>
Big patch (sorry I was away and couldn't commit earlier)
This fixes bugs
#477769 – Building without libburn
#480712 – Brasero Plugins UI
#488817 – Plugin problems?
#490853 – Brasero refuses to start burning showing a "File not found" error, sometimes (weird)
- simplified plugin dialog (only unnecessary functionalities are shown)
- added switches to build only a set of plugins (cdrkit, libburnia, cdrtools)
- kept all plugins' priority under apps/brasero/config/priority
- added group existence to plugins and a gconf key for favourite group
now brasero tries to use plugins from the same group (most probably the favourite one if any)
- fix a bug where joliet option was hidden (see # )
- fix a bug where CDRW where appended instead of being blanked
- temporary fix for use of DAO (should be used only for first session)
- improved flags handling in general by removing some hard set rules
- fix drive locking when merging
Now strings should be frozen hopefully.
More to come:
- MD5 fixes (through the use of readcd/readom)
- improvement in flags handling by plugins (possibility to set concurent flags)
* configure.in:
* data/brasero.schemas.in:
* src/brasero-burn-dialog.c: (brasero_burn_dialog_run):
* src/brasero-data-disc.c: (brasero_data_disc_import_session_cb),
(brasero_data_disc_update_multi_button_state),
(brasero_data_disc_set_session_param):
* src/brasero-dest-selection.c:
(brasero_dest_selection_drive_properties),
(brasero_dest_selection_set_drive_properties),
(brasero_dest_selection_check_drive_settings):
* src/brasero-disc-copy-dialog.c: (brasero_disc_copy_dialog_init):
* src/brasero-disc-option-dialog.c:
(brasero_disc_option_dialog_update_multi),
(brasero_disc_option_dialog_set_joliet),
(brasero_disc_option_dialog_set_multi),
(brasero_disc_option_dialog_set_disc),
(brasero_disc_option_dialog_init):
* src/brasero-image-option-dialog.c:
(brasero_image_option_dialog_init):
* src/brasero-ncb.c: (NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS),
(NCB_MEDIA_GET_LAST_DATA_TRACK_SPACE):
* src/brasero-ncb.h:
* src/brasero-plugin-manager-ui.c:
(plugin_manager_ui_populate_lists), (model_name_sort_func),
(plugin_manager_ui_construct_tree),
(brasero_plugin_manager_ui_init):
* src/burn-basics.h:
* src/burn-caps.c: (brasero_burn_caps_finalize),
(brasero_burn_caps_init),
(brasero_burn_caps_register_plugin_group),
(brasero_burn_caps_new_blanking_task),
(brasero_burn_caps_new_checksuming_task),
(brasero_caps_link_check_data_flags),
(brasero_caps_link_check_record_flags), (brasero_caps_try_links),
(brasero_caps_link_find_plugin), (brasero_burn_caps_new_task),
(brasero_caps_try_output), (brasero_caps_try_output_with_blanking),
(brasero_burn_caps_is_input_supported),
(brasero_burn_caps_is_output_supported),
(brasero_burn_caps_get_required_media_type),
(brasero_caps_get_flags), (brasero_caps_get_flags_for_disc),
(brasero_burn_caps_get_flags):
* src/burn-caps.h:
* src/burn-job.c: (brasero_job_get_last_session_address),
(brasero_job_get_next_writable_address):
* src/burn-job.h:
* src/burn-medium.c: (brasero_medium_get_last_data_track_address),
(brasero_medium_get_last_data_track_space),
(brasero_medium_track_volume_size):
* src/burn-medium.h:
* src/burn-plugin-manager.c:
(brasero_plugin_manager_set_plugins_state),
(brasero_plugin_manager_plugin_state_changed):
* src/burn-plugin-private.h:
* src/burn-plugin.c: (brasero_plugin_get_active),
(brasero_plugin_get_gconf_priority_key), (brasero_plugin_define),
(brasero_plugin_register_group), (brasero_plugin_get_group),
(brasero_plugin_get_record_flags), (brasero_plugin_get_priority),
(brasero_plugin_priority_changed), (brasero_plugin_init_real):
* src/burn-plugin.h:
* src/burn-session.c:
* src/burn.c: (brasero_burn_is_loaded_dest_media_supported),
(brasero_burn_lock_dest_media), (brasero_burn_run_imager),
(brasero_burn_run_recorder),
(brasero_burn_check_session_consistency):
* src/plugins/Makefile.am:
* src/plugins/cdrdao/Makefile.am:
* src/plugins/cdrdao/burn-cdrdao-common.h:
* src/plugins/cdrdao/burn-cdrdao.c: (brasero_cdrdao_export_caps):
* src/plugins/cdrdao/burn-toc2cue.c: (brasero_toc2cue_export_caps):
* src/plugins/cdrkit/Makefile.am:
* src/plugins/cdrkit/burn-cdrkit.h:
* src/plugins/cdrkit/burn-genisoimage.c:
(brasero_genisoimage_set_argv_image),
(brasero_genisoimage_export_caps):
* src/plugins/cdrkit/burn-readom.c: (brasero_readom_export_caps):
* src/plugins/cdrkit/burn-wodim.c: (brasero_wodim_export_caps):
* src/plugins/cdrtools/Makefile.am:
* src/plugins/cdrtools/burn-cdrecord.c:
(brasero_cdrecord_export_caps):
* src/plugins/cdrtools/burn-cdrtools.h:
* src/plugins/cdrtools/burn-mkisofs.c:
(brasero_mkisofs_set_argv_image), (brasero_mkisofs_set_argv),
(brasero_mkisofs_export_caps):
* src/plugins/cdrtools/burn-readcd.c: (brasero_readcd_export_caps):
* src/plugins/checksum/burn-md5.c: (brasero_md5_file),
(brasero_md5_file_to_string):
* src/plugins/checksum/burn-md5.h:
* src/plugins/checksum/burn-md5sum.c: (brasero_md5sum_start_md5),
(brasero_md5sum_image), (brasero_md5sum_disc),
(brasero_md5sum_disc_files):
* src/plugins/growisofs/Makefile.am:
* src/plugins/growisofs/burn-dvd-rw-format.c:
(brasero_dvd_rw_format_export_caps):
* src/plugins/growisofs/burn-growisofs-common.h:
* src/plugins/growisofs/burn-growisofs.c:
(brasero_growisofs_export_caps):
* src/plugins/libburnia/Makefile.am:
* src/plugins/libburnia/burn-libburn.c:
(brasero_libburn_export_caps):
* src/plugins/libburnia/burn-libburnia.h:
* src/plugins/libburnia/burn-libisofs.c:
(brasero_libisofs_export_caps):
2007-10-21 Philippe Rouquier <philippr@svn.gnome.org>
Some improvements fixes for plugin dialog
......
......@@ -105,48 +105,47 @@ dnl ****************check for libburn (optional)**************
LIBBURN_REQUIRED=0.3.4
LIBISOFS_REQUIRED=0.2.8
AC_ARG_ENABLE(libburn,
[ --enable-libburn use libburn if available [[default = yes]]],,
[enable_libburn="yes"])
AC_ARG_ENABLE(libburnia,
[ --build-libburnia Build libburnia plugins [[default = yes]]],,
[enable_libburnia="yes"])
if test x"$enable_libburn" = "xyes"; then
PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED, build_libburn=yes, build_libburn=no)
if test x"$enable_libburnia" = "xyes"; then
PKG_CHECK_MODULES(LIBBURNIA, libburn-1 >= $LIBBURN_REQUIRED libisofs-1 >= $LIBISOFS_REQUIRED, build_libburnia=yes, build_libburnia=no)
else
build_libburn="no"
build_libburnia="no"
fi
if test x"$build_libburn" = "xyes"; then
AC_SUBST(BRASERO_LIBBURN_CFLAGS)
AC_SUBST(BRASERO_LIBBURN_LIBS)
if test x"$build_libburnia" = "xyes"; then
AC_SUBST(BRASERO_LIBBURNIA_CFLAGS)
AC_SUBST(BRASERO_LIBBURNIA_LIBS)
BRASERO_LIBBURN_CFLAGS="$LIBBURN_CFLAGS"
BRASERO_LIBBURN_LIBS="$LIBBURN_LIBS"
AC_DEFINE(HAVE_LIBBURN, 1, [define if you want to use with libburn support])
BRASERO_LIBBURNIA_CFLAGS="$LIBBURNIA_CFLAGS"
BRASERO_LIBBURNIA_LIBS="$LIBBURNIA_LIBS"
AC_DEFINE(BUILD_LIBBURNIA, 1, [define if you want to build libburnia plugins])
fi
AM_CONDITIONAL(HAVE_LIBBURN, test x"$build_libburn" = "xyes")
AM_CONDITIONAL(BUILD_LIBBURNIA, test x"$build_libburnia" = "xyes")
AC_ARG_ENABLE(libisofs,
[ --enable-libisofs use libisofs if available [[default = yes]]],,
[enable_libisofs="yes"])
dnl **************** check for cdrtools **********************
AC_ARG_ENABLE(cdrtools,
[ --build-cdrtools Build cdrtools plugins [[default = yes]]],,
[build_cdrtools="yes"])
if test x"$enable_libisofs" = "xyes"; then
PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED, build_libisofs=yes, build_libisofs=no)
else
build_libisofs="no"
if test x"$build_cdrtools" = "xyes"; then
AC_DEFINE(BUILD_CDRTOOLS, 1, [define if you want to build cdrtools plugins])
fi
AM_CONDITIONAL(BUILD_CDRTOOLS, test x"$build_cdrtools" = "xyes")
if test x"$build_libisofs" = "xyes"; then
AC_SUBST(BRASERO_LIBISOFS_CFLAGS)
AC_SUBST(BRASERO_LIBISOFS_LIBS)
dnl **************** check for cdrkit ************************
AC_ARG_ENABLE(cdrkit,
[ --build-cdrkit Build cdrkit plugins [[default = yes]]],,
[build_cdrkit="yes"])
BRASERO_LIBISOFS_CFLAGS="$LIBISOFS_CFLAGS"
BRASERO_LIBISOFS_LIBS="$LIBISOFS_LIBS"
AC_DEFINE(HAVE_LIBISOFS, 1, [define if you want to use with libisofs support])
if test x"$build_cdrkit" = "xyes"; then
AC_DEFINE(BUILD_CDRKIT, 1, [define if you want to build cdrkit plugins])
fi
AM_CONDITIONAL(HAVE_LIBISOFS, test x"$build_libisofs" = "xyes")
AM_CONDITIONAL(BUILD_CDRKIT, test x"$build_cdrkit" = "xyes")
dnl ****************check for libnotify (optional)**************
dnl maybe it will be re-enabled later if I can find a use for it
LIBNOTIFY_REQUIRED=0.3.0
AC_ARG_ENABLE(libnotify,
......@@ -325,8 +324,9 @@ echo "Version: $BRASERO_VERSION
Build Preview pane : ${enable_preview}
Build libnotify support : ${build_libnotify}
Build dbus support : ${build_dbus}
Use libburn : ${build_libburn}
Use libisofs : ${build_libisofs}
Build cdrtools plugins : ${build_cdrtools}
Build cdrkit plugins : ${build_cdrkit}
Build libburnia plugins : ${build_libburnia}
"
echo
echo
......@@ -16,29 +16,32 @@
</schema>
<schema>
<key>/schemas/apps/brasero/plugins</key>
<applyto>/apps/brasero/plugins</applyto>
<key>/schemas/apps/brasero/config/engine-group</key>
<applyto>/app/brasero/config/engine-group</applyto>
<owner>brasero</owner>
<type>list</type>
<list_type>string</list_type>
<default>[]</default>
<locale name="C">
<short>White list of plugins to use</short>
<short>Favourite burn engine</short>
<long>
Contains the list of plugings brasero will use to burn discs. If set to NULL, brasero will load them all.
Contains the name of the favourite burn engine suite installed. It will be used if possible.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/activate_checksum</key>
<applyto>/apps/brasero/config/activate_checksum</applyto>
<key>/schemas/apps/brasero/config/plugins</key>
<applyto>/apps/brasero/plugins</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>false</default>
<type>list</type>
<list_type>string</list_type>
<default>[]</default>
<locale name="C">
<short>Should brasero generate activate the "generate checksum" button</short>
<long>Should brasero generate activate the "generate checksum" button by default. Set to true, brasero will check the option by default.</long>
<short>White list of additionnal plugins to use</short>
<long>
Contains the list of additionnal plugins brasero will use to burn discs. If set to NULL, brasero will load them all.
</long>
</locale>
</schema>
......@@ -66,54 +69,6 @@
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/cdrdao_disabled</key>
<applyto>/apps/brasero/config/cdrdao_disabled</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Enable use of cdrdao</short>
<long>Whether to use cdrdao for burning or not. Set to true to use it.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/libburn_burn</key>
<applyto>/apps/brasero/config/libburn_burn</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Use libburn to burn CDs</short>
<long>Whether to use libburn to burn CDs. Set to true to use it.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/libburn_iso</key>
<applyto>/apps/brasero/config/libburn_iso</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Use libisofs to generate images</short>
<long>Whether to use libisofs to generate images. Set to true to use it.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/libburn_read</key>
<applyto>/apps/brasero/config/libburn_read</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Use libburn to read CDs</short>
<long>Whether to use libburn to read CDs. Set to true to use it.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/display/audio_pane</key>
<applyto>/apps/brasero/display/audio_pane</applyto>
......
......@@ -77,4 +77,8 @@ src/brasero-preview.c
src/brasero-split-dialog.c
src/brasero-time-button.c
src/brasero-src-selection.c
src/plugins/cdrkit/burn-cdrkit.h
src/plugins/libburnia/burn-libburnia.h
src/plugins/growisofs/burn-growisofs-common.h
src/plugins/cdrdao/burn-cdrdao-common.h
src/plugins/cdrtools/burn-cdrtools.h
......@@ -1741,16 +1741,6 @@ brasero_burn_dialog_run (BraseroBurnDialog *dialog,
drive = brasero_burn_session_get_burner (session);
flags = brasero_burn_session_get_flags (session);
/* basically we don't use DAO when:
* - we're appending to a CD/DVD
* - starting a multisession DVD-/+ R
* - we're writing to a file */
if (!(flags & (BRASERO_BURN_FLAG_APPEND|BRASERO_BURN_FLAG_MERGE))
&& (!NCB_MEDIA_IS (drive, BRASERO_MEDIUM_DVD|BRASERO_MEDIUM_WRITABLE)
|| !(flags & BRASERO_BURN_FLAG_MULTI)) /* that targets DVD+/-R */
&& NCB_DRIVE_GET_TYPE (drive) != NAUTILUS_BURN_DRIVE_TYPE_FILE)
brasero_burn_session_add_flag (session, BRASERO_BURN_FLAG_DAO);
result = brasero_burn_record (dialog->priv->burn,
session,
&error);
......
......@@ -8116,7 +8116,9 @@ brasero_data_disc_import_session_cb (GtkToggleAction *action,
}
/* get the address for the last track and retrieve the file list */
block = NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS (disc->priv->drive);
NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS (disc->priv->drive,
NULL,
&block);
if (block == -1) {
brasero_data_disc_import_session_error (disc, _("there isn't any available session on the disc"));
return;
......@@ -8186,9 +8188,7 @@ brasero_data_disc_import_session_cb (GtkToggleAction *action,
disc->priv->session = volume;
/* add the size of the session files */
brasero_disc_flags_changed (BRASERO_DISC (disc),
BRASERO_BURN_FLAG_APPEND|
BRASERO_BURN_FLAG_MERGE);
brasero_disc_flags_changed (BRASERO_DISC (disc), BRASERO_BURN_FLAG_MERGE);
}
static void
......@@ -8215,7 +8215,7 @@ brasero_data_disc_update_multi_button_state (BraseroDataDisc *disc)
multisession = (media_status & BRASERO_MEDIUM_WRITABLE) &&
(media & (BRASERO_MEDIUM_HAS_DATA|BRASERO_MEDIUM_HAS_AUDIO)) &&
(NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS (disc->priv->drive) != -1);
(NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS (disc->priv->drive, NULL, NULL) != -1);
if (multisession) {
GtkWidget *widget;
......@@ -8560,11 +8560,13 @@ brasero_data_disc_set_session_param (BraseroDisc *disc,
type.type = BRASERO_TRACK_TYPE_DATA;
type.subtype.fs_type = fs_type;
brasero_burn_session_set_input_type (session, &type);
if (BRASERO_DATA_DISC (disc)->priv->session) {
brasero_burn_session_add_flag (session,
BRASERO_BURN_FLAG_APPEND|
BRASERO_BURN_FLAG_MERGE);
/* remove the following flag just in case */
brasero_burn_session_remove_flag (session,
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
brasero_burn_session_add_flag (session, BRASERO_BURN_FLAG_MERGE);
brasero_burn_session_set_burner (session,
BRASERO_DATA_DISC (disc)->priv->drive);
}
......
......@@ -256,6 +256,25 @@ brasero_dest_selection_drive_properties (BraseroDestSelection *self)
&supported,
&compulsory);
if (supported & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) {
/* clean up the disc and have more space when possible */
brasero_burn_session_add_flag (priv->session,
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
}
else
brasero_burn_session_remove_flag (priv->session,
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
/* use DAO whenever it's possible */
if (supported & BRASERO_BURN_FLAG_DAO)
brasero_burn_session_add_flag (priv->session,
BRASERO_BURN_FLAG_DAO);
else
brasero_burn_session_remove_flag (priv->session,
BRASERO_BURN_FLAG_DAO);
brasero_drive_properties_set_flags (BRASERO_DRIVE_PROPERTIES (priv->drive_prop),
flags,
supported,
......@@ -606,6 +625,25 @@ brasero_dest_selection_set_drive_properties (BraseroDestSelection *self)
brasero_burn_session_remove_flag (priv->session, BRASERO_DRIVE_PROPERTIES_FLAGS);
brasero_burn_session_add_flag (priv->session, flags);
}
if (supported & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) {
/* clean up the disc and have more space when possible */
brasero_burn_session_add_flag (priv->session,
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
}
else
brasero_burn_session_remove_flag (priv->session,
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
/* use DAO whenever it's possible */
if (supported & BRASERO_BURN_FLAG_DAO)
brasero_burn_session_add_flag (priv->session,
BRASERO_BURN_FLAG_DAO);
else
brasero_burn_session_remove_flag (priv->session,
BRASERO_BURN_FLAG_DAO);
}
nautilus_burn_drive_unref (drive);
......@@ -779,6 +817,25 @@ brasero_dest_selection_check_drive_settings (BraseroDestSelection *self,
/* save potential changes for the new profile */
brasero_dest_selection_save_drive_properties (self);
if (supported & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) {
/* clean up the disc and have more space when possible */
brasero_burn_session_add_flag (priv->session,
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
}
else
brasero_burn_session_remove_flag (priv->session,
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
/* use DAO whenever it's possible */
if (supported & BRASERO_BURN_FLAG_DAO)
brasero_burn_session_add_flag (priv->session,
BRASERO_BURN_FLAG_DAO);
else
brasero_burn_session_remove_flag (priv->session,
BRASERO_BURN_FLAG_DAO);
if (priv->drive_prop) {
/* the dialog may need to be updated */
brasero_drive_properties_set_flags (BRASERO_DRIVE_PROPERTIES (priv->drive_prop),
......
......@@ -124,8 +124,7 @@ brasero_disc_copy_dialog_init (BraseroDiscCopyDialog *obj)
BRASERO_BURN_FLAG_BURNPROOF|
BRASERO_BURN_FLAG_CHECK_SIZE|
BRASERO_BURN_FLAG_DONT_CLEAN_OUTPUT|
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
BRASERO_BURN_FLAG_FAST_BLANK);
/* take care of source media */
priv->source = brasero_src_selection_new (priv->session);
......
......@@ -284,6 +284,25 @@ brasero_disc_option_dialog_update_multi (BraseroDiscOptionDialog *dialog)
&supported,
&compulsory);
if (supported & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) {
/* clean up the disc and have more space when possible */
brasero_burn_session_add_flag (priv->session,
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
}
else
brasero_burn_session_remove_flag (priv->session,
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
/* use DAO whenever it's possible */
if (supported & BRASERO_BURN_FLAG_DAO)
brasero_burn_session_add_flag (priv->session,
BRASERO_BURN_FLAG_DAO);
else
brasero_burn_session_remove_flag (priv->session,
BRASERO_BURN_FLAG_DAO);
if (!(supported & BRASERO_BURN_FLAG_MULTI)) {
if (GTK_WIDGET_IS_SENSITIVE (priv->multi_toggle))
priv->multi_saved = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->multi_toggle));
......@@ -364,16 +383,6 @@ brasero_disc_option_dialog_output_changed (BraseroBurnSession *session,
brasero_disc_option_dialog_update_label (dialog);
}
static void
brasero_disc_option_dialog_disc_set_output (BraseroBurnSession *session,
BraseroDiscOptionDialog *dialog)
{
BraseroDiscOptionDialogPrivate *priv;
priv = BRASERO_DISC_OPTION_DIALOG_PRIVATE (dialog);
brasero_drive_selection_lock (BRASERO_DRIVE_SELECTION (priv->selection), TRUE);
}
/**
* These functions are used to update the session according to the states
* of the buttons and entry
......@@ -421,8 +430,7 @@ brasero_disc_option_dialog_set_joliet (BraseroDiscOptionDialog *dialog)
return;
/* NOTE: we don't check for the sensitive property since when
* something is compulsory the button is active but insensitive
*/
* something is compulsory the button is active but insensitive */
brasero_burn_session_get_input_type (priv->session, &source);
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->joliet_toggle)))
source.subtype.fs_type &= ~BRASERO_IMAGE_FS_JOLIET;
......@@ -449,6 +457,9 @@ brasero_disc_option_dialog_set_multi (BraseroDiscOptionDialog *dialog)
brasero_burn_session_add_flag (priv->session, BRASERO_BURN_FLAG_MULTI);
if (!priv->video_toggle)
return;
/* to improve video DVD compatibility we don't allow to leave a disc
* open and have a video DVD created.
* NOTE: video and multi buttons are antithetic so if the user pressed
......@@ -603,7 +614,7 @@ brasero_disc_option_dialog_joliet_widget (BraseroDiscOptionDialog *dialog)
priv->joliet_toggle = gtk_check_button_new_with_mnemonic (_("Increase compatibility with _Windows systems"));
gtk_widget_set_tooltip_text (priv->joliet_toggle,
_("Improve compatibility with Windows systems by allowing to display long filenames (maximum 64 characters)"));
_("Improve compatibility with Windows systems by allowing to display long filenames (maximum 64 characters)"));
/* NOTE: we take for granted that if the source does not require
* to have the joliet extension, it's because it does have some
......@@ -720,6 +731,7 @@ brasero_disc_option_dialog_set_disc (BraseroDiscOptionDialog *dialog,
{
BraseroDiscOptionDialogPrivate *priv;
BraseroTrackType type;
gboolean lock_drive;
priv = BRASERO_DISC_OPTION_DIALOG_PRIVATE (dialog);
......@@ -729,21 +741,18 @@ brasero_disc_option_dialog_set_disc (BraseroDiscOptionDialog *dialog,
priv->disc = disc;
g_object_ref (disc);
/* detect if a drive is set by the disc object, if so then lock it */
if (priv->output_sig) {
g_signal_handler_disconnect (priv->session, priv->output_sig);
priv->output_sig = 0;
}
priv->output_sig = g_signal_connect (priv->session,
"output-changed",
G_CALLBACK (brasero_disc_option_dialog_disc_set_output),
dialog);
brasero_disc_set_session_param (disc, priv->session);
if (priv->output_sig) {
g_signal_handler_disconnect (priv->session, priv->output_sig);
priv->output_sig = 0;
}
/* see if we should lock the drive */
lock_drive = (brasero_burn_session_get_flags (priv->session) & (BRASERO_BURN_FLAG_APPEND|
BRASERO_BURN_FLAG_MERGE)) != 0;
brasero_drive_selection_lock (BRASERO_DRIVE_SELECTION (priv->selection), lock_drive);
priv->output_sig = g_signal_connect (priv->session,
"output-changed",
G_CALLBACK (brasero_disc_option_dialog_output_changed),
......@@ -825,9 +834,7 @@ brasero_disc_option_dialog_init (BraseroDiscOptionDialog *obj)
BRASERO_BURN_FLAG_NOGRACE|
BRASERO_BURN_FLAG_BURNPROOF|
BRASERO_BURN_FLAG_CHECK_SIZE|
BRASERO_BURN_FLAG_DONT_CLEAN_OUTPUT|
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
BRASERO_BURN_FLAG_DONT_CLEAN_OUTPUT);
/* first box */
priv->selection = brasero_dest_selection_new (priv->session);
......
......@@ -468,8 +468,7 @@ brasero_image_option_dialog_init (BraseroImageOptionDialog *obj)
BRASERO_BURN_FLAG_BURNPROOF|
BRASERO_BURN_FLAG_CHECK_SIZE|
BRASERO_BURN_FLAG_DONT_CLEAN_OUTPUT|
BRASERO_BURN_FLAG_FAST_BLANK|
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
BRASERO_BURN_FLAG_FAST_BLANK);
/* first box */
priv->selection = brasero_dest_selection_new (priv->session);
......
......@@ -437,19 +437,60 @@ NCB_VOLUME_GET_MOUNT_POINT (NautilusBurnDrive *drive,
return local_path;
}
gint64
NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS (NautilusBurnDrive *drive)
gboolean
NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS (NautilusBurnDrive *drive,
gint64 *byte,
gint64 *sector)
{
BraseroMedium *medium;
if (!drive)
return -1;
if (!drive) {
if (byte)
*byte = -1;
if (sector)
*sector = -1;
return FALSE;
}
medium = g_object_get_data (G_OBJECT (drive), BRASERO_MEDIUM_KEY);
if (!medium)
return -1;
if (!medium) {
if (byte)
*byte = -1;
if (sector)
*sector = -1;
return FALSE;
}
return brasero_medium_get_last_data_track_address (medium,
byte,
sector);
}
gboolean
NCB_MEDIA_GET_LAST_DATA_TRACK_SPACE (NautilusBurnDrive *drive,
gint64 *size,
gint64 *blocks)
{
BraseroMedium *medium;
if (!drive) {
if (size)
*size = -1;
if (blocks)
*blocks = -1;
return FALSE;
}
medium = g_object_get_data (G_OBJECT (drive), BRASERO_MEDIUM_KEY);
if (!medium) {
if (size)
*size = -1;
if (blocks)
*blocks = -1;
return FALSE;
}
return brasero_medium_get_last_data_track_address (medium);
return brasero_medium_get_last_data_track_space (medium, size, blocks);
}
gint64
......
......@@ -64,8 +64,15 @@ NCB_DRIVE_MOUNT (NautilusBurnDrive *drive, GError **error);
gchar *
NCB_VOLUME_GET_MOUNT_POINT (NautilusBurnDrive *drive, GError **error);
gint64
NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS (NautilusBurnDrive *drive);
gboolean
NCB_MEDIA_GET_LAST_DATA_TRACK_ADDRESS (NautilusBurnDrive *drive,
gint64 *byte,
gint64 *sector);
gboolean
NCB_MEDIA_GET_LAST_DATA_TRACK_SPACE (NautilusBurnDrive *drive,
gint64 *size,
gint64 *blocks);
gint64
NCB_MEDIA_GET_NEXT_WRITABLE_ADDRESS (NautilusBurnDrive *drive);
......
This diff is collapsed.
......@@ -129,13 +129,13 @@ typedef enum {
BRASERO_BURN_FLAG_BURNPROOF = 1 << 4,
BRASERO_BURN_FLAG_NO_TMP_FILES = 1 << 5,
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE = 1 << 6,
BRASERO_BURN_FLAG_DONT_CLEAN_OUTPUT = 1 << 7,
BRASERO_BURN_FLAG_DONT_OVERWRITE = 1 << 8,
BRASERO_BURN_FLAG_DONT_CLEAN_OUTPUT = 1 << 6,
BRASERO_BURN_FLAG_DONT_OVERWRITE = 1 << 7,
BRASERO_BURN_FLAG_MULTI = 1 << 9,
BRASERO_BURN_FLAG_APPEND = 1 << 10,
BRASERO_BURN_FLAG_MERGE = 1 << 11,
BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE = 1 << 8,
BRASERO_BURN_FLAG_APPEND = 1 << 9,
BRASERO_BURN_FLAG_MERGE = 1 << 10,
BRASERO_BURN_FLAG_MULTI = 1 << 11,
BRASERO_BURN_FLAG_DUMMY = 1 << 12,
......@@ -147,7 +147,7 @@ typedef enum {
#define BRASERO_BURN_FLAG_ALL 0x7FFF
#define BRASERO_PLUGIN_KEY "/apps/brasero/plugins"
#define BRASERO_PLUGIN_KEY "/apps/brasero/config/plugins"
BraseroBurnResult
brasero_burn_library_init (void);
......
This diff is collapsed.
......@@ -63,6 +63,10 @@ GType brasero_burn_caps_get_type();
BraseroBurnCaps *brasero_burn_caps_get_default ();
gint
brasero_burn_caps_register_plugin_group (BraseroBurnCaps *self,
const gchar *name);
void