Commit b9a6d456 authored by Philippe Rouquier's avatar Philippe Rouquier

Fix #573805 – "Increase compatibility with Windows systems"?

Remove the checkbox from burn options dialog that dealt with Windows compatibility and replace it with a dialog that pops up when a non compliant name is detected
parent 754059a0
......@@ -186,8 +186,6 @@ libbrasero_burn_la_SOURCES = \
brasero-track-stream-cfg.c \
brasero-track-stream-cfg.h \
brasero-tool-dialog-private.h \
brasero-data-options.c \
brasero-data-options.h \
brasero-video-options.h \
brasero-video-options.c \
brasero-session-span.h \
......
......@@ -47,7 +47,6 @@
#include "brasero-session.h"
#include "brasero-session-helper.h"
#include "brasero-burn-options.h"
#include "brasero-data-options.h"
#include "brasero-video-options.h"
#include "brasero-src-image.h"
#include "brasero-src-selection.h"
......@@ -256,7 +255,6 @@ brasero_burn_options_not_ready_dialog_show_cb (gpointer data)
priv = BRASERO_BURN_OPTIONS_PRIVATE (data);
priv->not_ready_id = 0;
gtk_widget_show (priv->status_dialog);
return FALSE;
}
......@@ -292,6 +290,7 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
"response",
G_CALLBACK (brasero_burn_options_not_ready_dialog_cancel_cb),
self);
gtk_widget_show (priv->status_dialog);
priv->not_ready_id = g_timeout_add_seconds (1,
brasero_burn_options_not_ready_dialog_show_cb,
self);
......
This diff is collapsed.
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Libbrasero-burn
* Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr>
*
* Libbrasero-burn is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The Libbrasero-burn authors hereby grant permission for non-GPL compatible
* GStreamer plugins to be used and distributed together with GStreamer
* and Libbrasero-burn. This permission is above and beyond the permissions granted
* by the GPL license by which Libbrasero-burn is covered. If you modify this code
* you may extend this exception to your version of the code, but you are not
* obligated to do so. If you do not wish to do so, delete this exception
* statement from your version.
*
* Libbrasero-burn is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to:
* The Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301, USA.
*/
#ifndef _BRASERO_DATA_OPTIONS_H_
#define _BRASERO_DATA_OPTIONS_H_
#include <glib-object.h>
#include <gtk/gtk.h>
#include "brasero-session.h"
G_BEGIN_DECLS
#define BRASERO_TYPE_DATA_OPTIONS (brasero_data_options_get_type ())
#define BRASERO_DATA_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BRASERO_TYPE_DATA_OPTIONS, BraseroDataOptions))
#define BRASERO_DATA_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BRASERO_TYPE_DATA_OPTIONS, BraseroDataOptionsClass))
#define BRASERO_IS_DATA_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BRASERO_TYPE_DATA_OPTIONS))
#define BRASERO_IS_DATA_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BRASERO_TYPE_DATA_OPTIONS))
#define BRASERO_DATA_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_DATA_OPTIONS, BraseroDataOptionsClass))
typedef struct _BraseroDataOptionsClass BraseroDataOptionsClass;
typedef struct _BraseroDataOptions BraseroDataOptions;
struct _BraseroDataOptionsClass
{
GtkAlignmentClass parent_class;
};
struct _BraseroDataOptions
{
GtkAlignment parent_instance;
};
GType brasero_data_options_get_type (void) G_GNUC_CONST;
GtkWidget *
brasero_data_options_new (BraseroBurnSession *session);
G_END_DECLS
#endif /* _BRASERO_DATA_OPTIONS_H_ */
......@@ -42,6 +42,8 @@
#include "brasero-units.h"
#include "brasero-track-data-cfg.h"
#include "brasero-enums.h"
#include "brasero-session.h"
#include "brasero-status-dialog.h"
......@@ -150,11 +152,125 @@ brasero_status_dialog_wait_for_ready_state (BraseroStatusDialog *dialog)
return TRUE;
}
static gboolean
brasero_status_dialog_deep_directory_cb (BraseroTrackDataCfg *project,
const gchar *name,
BraseroStatusDialog *dialog)
{
gint answer;
gchar *string;
GtkWidget *message;
gtk_widget_hide (GTK_WIDGET (dialog));
string = g_strdup_printf (_("Do you really want to add \"%s\" to the selection?"), name);
message = gtk_message_dialog_new (GTK_WINDOW (dialog),
GTK_DIALOG_DESTROY_WITH_PARENT|
GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_NONE,
string);
g_free (string);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
_("The children of this directory will have 7 parent directories."
"\nBrasero can create an image of such a file hierarchy and burn it; but the disc may not be readable on all operating systems."
"\nNOTE: Such a file hierarchy is known to work on linux."));
gtk_dialog_add_button (GTK_DIALOG (message), GTK_STOCK_CANCEL, GTK_RESPONSE_NO);
gtk_dialog_add_button (GTK_DIALOG (message), _("_Add File"), GTK_RESPONSE_YES);
answer = gtk_dialog_run (GTK_DIALOG (message));
gtk_widget_destroy (message);
gtk_widget_show (GTK_WIDGET (dialog));
return (answer != GTK_RESPONSE_YES);
}
static gboolean
brasero_status_dialog_2G_file_cb (BraseroTrackDataCfg *track,
const gchar *name,
BraseroStatusDialog *dialog)
{
gint answer;
gchar *string;
GtkWidget *message;
gtk_widget_hide (GTK_WIDGET (dialog));
string = g_strdup_printf (_("Do you really want to add \"%s\" to the selection and use the third version of ISO9660 standard to support it?"), name);
message = gtk_message_dialog_new (GTK_WINDOW (dialog),
GTK_DIALOG_DESTROY_WITH_PARENT|
GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_NONE,
string);
g_free (string);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
_("The size of the file is over 2 GiB. Files larger than 2 GiB are not supported by ISO9660 standard in its first and second versions (the most widespread ones)."
"\nIt is recommended to use the third version of ISO9660 standard which is supported by most of the operating systems including Linux and all versions of Windows ©."
"\nHowever MacOS X cannot read images created with version 3 of ISO9660 standard."));
gtk_dialog_add_button (GTK_DIALOG (message), GTK_STOCK_CANCEL, GTK_RESPONSE_NO);
gtk_dialog_add_button (GTK_DIALOG (message), _("_Add File"), GTK_RESPONSE_YES);
answer = gtk_dialog_run (GTK_DIALOG (message));
gtk_widget_destroy (message);
gtk_widget_show (GTK_WIDGET (dialog));
return (answer != GTK_RESPONSE_YES);
}
static void
brasero_status_dialog_joliet_rename_cb (BraseroTrackData *track,
BraseroStatusDialog *dialog)
{
GtkResponseType answer;
GtkWidget *message;
gchar *secondary;
gtk_widget_hide (GTK_WIDGET (dialog));
message = gtk_message_dialog_new (GTK_WINDOW (dialog),
GTK_DIALOG_DESTROY_WITH_PARENT|
GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_NONE,
_("Should files be renamed to be fully Windows-compatible?"));
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."));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message), "%s", secondary);
g_free (secondary);
gtk_dialog_add_button (GTK_DIALOG (message),
_("_Disable Full Windows Compatibility"),
GTK_RESPONSE_CANCEL);
gtk_dialog_add_button (GTK_DIALOG (message),
_("_Rename for Full Windows Compatibility"),
GTK_RESPONSE_YES);
answer = gtk_dialog_run (GTK_DIALOG (message));
gtk_widget_destroy (message);
if (answer != GTK_RESPONSE_YES)
brasero_track_data_rm_fs (track, BRASERO_IMAGE_FS_JOLIET);
else
brasero_track_data_add_fs (track, BRASERO_IMAGE_FS_JOLIET);
gtk_widget_show (GTK_WIDGET (dialog));
}
static void
brasero_status_dialog_wait_for_session (BraseroStatusDialog *dialog)
{
BraseroStatus *status;
BraseroBurnResult result;
BraseroTrackType *track_type;
BraseroStatusDialogPrivate *priv;
priv = BRASERO_STATUS_DIALOG_PRIVATE (dialog);
......@@ -169,6 +285,32 @@ brasero_status_dialog_wait_for_session (BraseroStatusDialog *dialog)
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT);
track_type = brasero_track_type_new ();
brasero_burn_session_get_input_type (priv->session, track_type);
if (brasero_track_type_get_has_data (track_type)) {
GSList *tracks;
BraseroTrack *track;
tracks = brasero_burn_session_get_tracks (priv->session);
track = tracks->data;
if (BRASERO_IS_TRACK_DATA_CFG (track)) {
g_signal_connect (track,
"joliet-rename",
G_CALLBACK (brasero_status_dialog_joliet_rename_cb),
dialog);
g_signal_connect (track,
"2G-file",
G_CALLBACK (brasero_status_dialog_2G_file_cb),
dialog);
g_signal_connect (track,
"deep-directory",
G_CALLBACK (brasero_status_dialog_deep_directory_cb),
dialog);
}
}
brasero_track_type_free (track_type);
brasero_status_dialog_update (dialog, status);
brasero_status_free (status);
priv->id = g_timeout_add (200,
......
......@@ -202,7 +202,6 @@ write_activate (GtkWindow *toplevel)
BraseroSessionCfg *session;
GtkWidget *name_options;
GtkWidget *options;
GtkWidget *box;
gchar *string;
if (nautilus_disc_burn_is_empty (toplevel))
......@@ -217,10 +216,6 @@ write_activate (GtkWindow *toplevel)
NULL);
g_object_unref (track);
/* Add option widget */
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 (NULL);
brasero_project_name_set_session (BRASERO_PROJECT_NAME (name_options),
......@@ -233,15 +228,8 @@ write_activate (GtkWindow *toplevel)
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 (session));
gtk_widget_show (options);
gtk_box_pack_start (GTK_BOX (box), options, FALSE, TRUE, 0);
/* NOTE: set the disc we're handling */
launch_brasero_on_window_session (session, box, toplevel);
launch_brasero_on_window_session (session, options, toplevel);
/* cleanup */
g_object_unref (session);
......
# List of source files containing translatable strings.
[encoding: UTF-8]
libbrasero-burn/brasero-data-options.c
libbrasero-burn/brasero-video-options.c
libbrasero-burn/burn-debug.c
libbrasero-burn/brasero-track-stream-cfg.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment