[brasero] Remove joliet option from the burn option dialog (except for nautilus extension) and ask the user in
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Subject: [brasero] Remove joliet option from the burn option dialog (except for nautilus extension) and ask the user in
- Date: Tue, 2 Jun 2009 14:15:45 -0400 (EDT)
commit e5af2f14d584ddbcb40bf042a1dbe68c5caebed8
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Tue Jun 2 20:01:56 2009 +0200
Remove joliet option from the burn option dialog (except for nautilus extension) and ask the user in the data project if he wants joliet or not
---
libbrasero-burn/brasero-burn-options.c | 6 ---
libbrasero-burn/brasero-data-project.c | 16 ++++++++
libbrasero-burn/brasero-track-data-cfg.c | 40 ++++++++++++++++++-
nautilus/nautilus-burn-extension.c | 13 ++++++-
src/brasero-data-disc.c | 61 +++++++++++++++++++++++++++++-
5 files changed, 126 insertions(+), 10 deletions(-)
diff --git a/libbrasero-burn/brasero-burn-options.c b/libbrasero-burn/brasero-burn-options.c
index b541f3d..9090f1c 100644
--- a/libbrasero-burn/brasero-burn-options.c
+++ b/libbrasero-burn/brasero-burn-options.c
@@ -806,7 +806,6 @@ static void
brasero_burn_options_setup_data (BraseroBurnOptions *self)
{
GSList *tracks;
- GtkWidget *options;
BraseroBurnOptionsPrivate *priv;
priv = BRASERO_BURN_OPTIONS_PRIVATE (self);
@@ -830,11 +829,6 @@ brasero_burn_options_setup_data (BraseroBurnOptions *self)
brasero_burn_options_set_type_shown (BRASERO_BURN_OPTIONS (self),
BRASERO_MEDIA_TYPE_WRITABLE|
BRASERO_MEDIA_TYPE_FILE);
-
- /* create the options box */
- options = brasero_data_options_new (BRASERO_BURN_SESSION (priv->session));
- gtk_widget_show (options);
- brasero_burn_options_add_options (self, options);
}
static void
diff --git a/libbrasero-burn/brasero-data-project.c b/libbrasero-burn/brasero-data-project.c
index f524068..efb6e7b 100644
--- a/libbrasero-burn/brasero-data-project.c
+++ b/libbrasero-burn/brasero-data-project.c
@@ -106,6 +106,7 @@ G_DEFINE_TYPE (BraseroDataProject, brasero_data_project, G_TYPE_OBJECT);
enum {
+ JOLIET_RENAME_SIGNAL,
NAME_COLLISION_SIGNAL,
SIZE_CHANGED_SIGNAL,
DEEP_DIRECTORY_SIGNAL,
@@ -432,6 +433,11 @@ brasero_data_project_joliet_add_node (BraseroDataProject *self,
g_hash_table_insert (priv->joliet,
&key,
list);
+
+ /* Signal that we'll have a collision */
+ g_signal_emit (self,
+ brasero_data_project_signals [JOLIET_RENAME_SIGNAL],
+ 0);
}
static gboolean
@@ -4322,6 +4328,16 @@ brasero_data_project_class_init (BraseroDataProjectClass *klass)
object_class->finalize = brasero_data_project_finalize;
+ brasero_data_project_signals [JOLIET_RENAME_SIGNAL] =
+ g_signal_new ("joliet-rename",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST|G_SIGNAL_NO_RECURSE,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0,
+ G_TYPE_NONE);
brasero_data_project_signals [NAME_COLLISION_SIGNAL] =
g_signal_new ("name_collision",
G_TYPE_FROM_CLASS (klass),
diff --git a/libbrasero-burn/brasero-track-data-cfg.c b/libbrasero-burn/brasero-track-data-cfg.c
index dea3073..7229845 100644
--- a/libbrasero-burn/brasero-track-data-cfg.c
+++ b/libbrasero-burn/brasero-track-data-cfg.c
@@ -77,6 +77,8 @@ struct _BraseroTrackDataCfgPrivate
gint sort_column;
GtkSortType sort_type;
+ guint joliet_rename:1;
+
guint deep_directory:1;
guint G2_files:1;
};
@@ -124,7 +126,8 @@ enum {
NAME_COLLISION,
DEEP_DIRECTORY,
SOURCE_LOADED,
- SOURCE_LOADING,
+ SOURCE_LOADING,
+ JOLIET_RENAME_SIGNAL,
LAST_SIGNAL
};
@@ -1917,7 +1920,7 @@ brasero_track_data_cfg_reset (BraseroTrackDataCfg *track)
priv->G2_files = FALSE;
priv->deep_directory = FALSE;
-
+ priv->joliet_rename = FALSE;
return TRUE;
}
@@ -2456,6 +2459,25 @@ brasero_track_data_cfg_find_icon_name (BraseroTrackDataCfg *track)
}
static void
+brasero_track_data_cfg_joliet_rename_cb (BraseroDataProject *project,
+ BraseroTrackDataCfg *self)
+{
+ BraseroTrackDataCfgPrivate *priv;
+
+ priv = BRASERO_TRACK_DATA_CFG_PRIVATE (self);
+
+ /* Signal this once */
+ if (priv->joliet_rename)
+ return;
+
+ g_signal_emit (self,
+ brasero_track_data_cfg_signals [JOLIET_RENAME_SIGNAL],
+ 0);
+
+ priv->joliet_rename = 1;
+}
+
+static void
brasero_track_data_cfg_virtual_sibling_cb (BraseroDataProject *project,
BraseroFileNode *node,
BraseroFileNode *sibling,
@@ -3037,6 +3059,10 @@ brasero_track_data_cfg_init (BraseroTrackDataCfg *object)
"name-collision",
G_CALLBACK (brasero_track_data_cfg_name_collision_cb),
object);
+ g_signal_connect (priv->tree,
+ "joliet-rename",
+ G_CALLBACK (brasero_track_data_cfg_joliet_rename_cb),
+ object);
}
static void
@@ -3172,6 +3198,16 @@ brasero_track_data_cfg_class_init (BraseroTrackDataCfgClass *klass)
G_TYPE_BOOLEAN,
1,
G_TYPE_STRING);
+ brasero_track_data_cfg_signals [JOLIET_RENAME_SIGNAL] =
+ g_signal_new ("joliet_rename",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST|G_SIGNAL_NO_RECURSE,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0,
+ G_TYPE_NONE);
brasero_track_data_cfg_signals [DEEP_DIRECTORY] =
g_signal_new ("deep_directory",
G_TYPE_FROM_CLASS (klass),
diff --git a/nautilus/nautilus-burn-extension.c b/nautilus/nautilus-burn-extension.c
index de13f17..0d157d1 100644
--- a/nautilus/nautilus-burn-extension.c
+++ b/nautilus/nautilus-burn-extension.c
@@ -216,6 +216,7 @@ write_activate (GtkWindow *toplevel)
BraseroTrackDataCfg *track;
GtkWidget *name_options;
GtkWidget *options;
+ GtkWidget *box;
gchar *string;
if (nautilus_disc_burn_is_empty (toplevel))
@@ -224,6 +225,9 @@ write_activate (GtkWindow *toplevel)
track = brasero_track_data_cfg_new ();
brasero_track_data_cfg_add (track, BURN_URI, NULL);
+ box = gtk_vbox_new (FALSE, 6);
+ gtk_widget_show (box);
+
/* add name widget here to set the label of the volume */
name_options = brasero_project_name_new ();
brasero_project_name_set_type (BRASERO_PROJECT_NAME (name_options),
@@ -235,10 +239,17 @@ write_activate (GtkWindow *toplevel)
NULL);
g_free (string);
gtk_widget_show_all (options);
+ gtk_box_pack_start (GTK_BOX (box), options, FALSE, TRUE, 0);
+
+ /* create the options box */
+ options = brasero_data_options_new (BRASERO_BURN_SESSION (priv->session));
+ gtk_widget_show (options);
+ brasero_burn_options_add_options (self, options);
+ gtk_box_pack_start (GTK_BOX (box), options, FALSE, TRUE, 0);
/* NOTE: set the disc we're handling */
launch_brasero_on_window_track (BRASERO_TRACK (track),
- options,
+ box,
toplevel);
/* cleanup */
diff --git a/src/brasero-data-disc.c b/src/brasero-data-disc.c
index c859a18..c89c149 100644
--- a/src/brasero-data-disc.c
+++ b/src/brasero-data-disc.c
@@ -523,7 +523,7 @@ brasero_data_disc_name_edited_cb (GtkCellRendererText *cellrenderertext,
*/
static void
-brasero_data_disc_use_overburn_response_cb (GtkButton *button,
+brasero_data_disc_use_overburn_response_cb (BraseroDiscMessage *message,
GtkResponseType response,
BraseroDataDisc *self)
{
@@ -818,6 +818,61 @@ brasero_data_disc_unknown_uri_cb (BraseroTrackDataCfg *vfs,
g_free (name);
}
+static void
+brasero_data_disc_use_joliet_response_cb (BraseroDiscMessage *message,
+ GtkResponseType response,
+ BraseroDataDisc *self)
+{
+ BraseroDataDiscPrivate *priv;
+
+ priv = BRASERO_DATA_DISC_PRIVATE (self);
+ if (response == GTK_RESPONSE_YES)
+ brasero_track_data_add_fs (BRASERO_TRACK_DATA (priv->project),
+ BRASERO_IMAGE_FS_JOLIET);
+ else
+ brasero_track_data_rm_fs (BRASERO_TRACK_DATA (priv->project),
+ BRASERO_IMAGE_FS_JOLIET);
+}
+
+static void
+brasero_data_disc_joliet_rename_cb (BraseroTrackDataCfg *project,
+ BraseroDataDisc *self)
+{
+ BraseroDataDiscPrivate *priv;
+ GtkWidget *message;
+ gchar *secondary;
+
+ priv = BRASERO_DATA_DISC_PRIVATE (self);
+ secondary = g_strdup_printf ("%s\n%s",
+ _("Some files don't have a suitable name for a fully Windows-compatible CD."),
+ _("Those names should be changed and truncated to 64 characters."));
+ message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message),
+ _("Should files be renamed to be fully Windows-compatible?"),
+ secondary,
+ -1,
+ BRASERO_NOTIFY_CONTEXT_SIZE);
+ g_free (secondary);
+
+ brasero_disc_message_set_image (BRASERO_DISC_MESSAGE (message),
+ GTK_STOCK_DIALOG_WARNING);
+
+ brasero_notify_button_add (BRASERO_NOTIFY (priv->message),
+ BRASERO_DISC_MESSAGE (message),
+ _("_Rename for Full Windows Compatibility"),
+ NULL,
+ GTK_RESPONSE_YES);
+ brasero_notify_button_add (BRASERO_NOTIFY (priv->message),
+ BRASERO_DISC_MESSAGE (message),
+ _("_Disable Full Windows Compatibility"),
+ NULL,
+ GTK_RESPONSE_CANCEL);
+
+ g_signal_connect (BRASERO_DISC_MESSAGE (message),
+ "response",
+ G_CALLBACK (brasero_data_disc_use_joliet_response_cb),
+ self);
+}
+
static gboolean
brasero_data_disc_name_collision_cb (BraseroTrackDataCfg *project,
const gchar *name,
@@ -2195,6 +2250,10 @@ brasero_data_disc_init (BraseroDataDisc *object)
G_CALLBACK (brasero_data_disc_name_collision_cb),
object);
g_signal_connect (priv->project,
+ "joliet-rename",
+ G_CALLBACK (brasero_data_disc_joliet_rename_cb),
+ object);
+ g_signal_connect (priv->project,
"row-inserted",
G_CALLBACK (brasero_data_disc_contents_added_cb),
object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]