Commit ec2b9391 authored by Philippe Rouquier's avatar Philippe Rouquier

Fix #598477 - Don't say Brasero in the title bar when running as nautilus

Don't hardcode the title of dialogs with Brasero or with its icon so the nautilus extension or any program using the lib can't set a proper name and icon
parent af51f12b
......@@ -222,6 +222,9 @@ brasero_blank_dialog_activate (BraseroToolDialog *dialog,
* blanking. */
_("Error while blanking."));
gtk_window_set_icon_name (GTK_WINDOW (message),
gtk_window_get_icon_name (GTK_WINDOW (self)));
button = brasero_utils_make_button (_("Blank _Again"),
NULL,
"media-optical-blank",
......@@ -261,6 +264,9 @@ brasero_blank_dialog_activate (BraseroToolDialog *dialog,
GTK_BUTTONS_NONE,
_("The disc was successfully blanked."));
gtk_window_set_icon_name (GTK_WINDOW (message),
gtk_window_get_icon_name (GTK_WINDOW (self)));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
_("The disc is ready for use."));
......
This diff is collapsed.
......@@ -500,7 +500,6 @@ static void
brasero_burn_options_init (BraseroBurnOptions *object)
{
gtk_dialog_set_has_separator (GTK_DIALOG (object), FALSE);
gtk_window_set_icon_name (GTK_WINDOW (object), "brasero");
}
/**
......@@ -718,7 +717,10 @@ brasero_status_dialog_uri_has_image (BraseroTrackDataCfg *track,
GTK_BUTTONS_NONE,
"%s",
_("Do you want to create a disc from the contents of the image or with the image file inside?"));
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_window_set_icon_name (GTK_WINDOW (dialog),
gtk_window_get_icon_name (GTK_WINDOW (self)));
name = brasero_utils_get_uri_name (uri);
/* Translators: %s is the name of the image */
......
......@@ -229,14 +229,14 @@ brasero_burn_action_changed_real (BraseroBurn *burn,
0,
1.0,
1.0,
-1);
0);
else if (action == BRASERO_BURN_ACTION_EJECTING)
g_signal_emit (burn,
brasero_burn_signals [PROGRESS_CHANGED_SIGNAL],
0,
-1.0,
-1.0,
-1);
0);
}
static gboolean
......
......@@ -254,6 +254,9 @@ brasero_drive_properties_check_tmpdir (BraseroDriveProperties *self,
GTK_BUTTONS_NONE,
_("Do you really want to choose this location?"));
gtk_window_set_icon_name (GTK_WINDOW (dialog),
gtk_window_get_icon_name (GTK_WINDOW (toplevel)));
string = g_strdup_printf ("%s.", error->message);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", string);
g_error_free (error);
......@@ -290,6 +293,9 @@ brasero_drive_properties_check_tmpdir (BraseroDriveProperties *self,
GTK_BUTTONS_NONE,
_("Do you really want to choose this location?"));
gtk_window_set_icon_name (GTK_WINDOW (dialog),
gtk_window_get_icon_name (GTK_WINDOW (toplevel)));
string = g_strdup_printf ("%s.", _("You do not have the required permission to write at this location"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", string);
g_free (string);
......@@ -339,6 +345,9 @@ brasero_drive_properties_check_tmpdir (BraseroDriveProperties *self,
GTK_BUTTONS_NONE,
_("Do you really want to choose this location?"));
gtk_window_set_icon_name (GTK_WINDOW (dialog),
gtk_window_get_icon_name (GTK_WINDOW (toplevel)));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
_("The filesystem on this volume does not support large files (size over 2 GiB)."
"\nThis can be a problem when writing DVDs or large images."));
......
......@@ -88,6 +88,8 @@ brasero_medium_properties_drive_properties (BraseroMediumProperties *self)
gtk_widget_show (medium_prop);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (self));
gtk_window_set_icon_name (GTK_WINDOW (medium_prop),
gtk_window_get_icon_name (GTK_WINDOW (toplevel)));
drive = brasero_burn_session_get_burner (priv->session);
display_name = brasero_drive_get_display_name (drive);
......@@ -133,6 +135,8 @@ brasero_medium_properties_wrong_extension (BraseroSessionCfg *session,
GTK_BUTTONS_NONE,
_("Do you really want to keep the current extension for the disc image name?"));
gtk_window_set_icon_name (GTK_WINDOW (dialog),
gtk_window_get_icon_name (GTK_WINDOW (toplevel)));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
_("If you choose to keep it, programs may not be able to recognize the file type properly."));
......@@ -174,6 +178,9 @@ brasero_medium_properties_image_properties (BraseroMediumProperties *self)
gtk_window_set_destroy_with_parent (GTK_WINDOW (priv->medium_prop), TRUE);
gtk_window_set_position (GTK_WINDOW (toplevel), GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_set_icon_name (GTK_WINDOW (priv->medium_prop),
gtk_window_get_icon_name (GTK_WINDOW (toplevel)));
/* and here we go ... run the thing */
gtk_widget_show (priv->medium_prop);
gtk_dialog_run (GTK_DIALOG (priv->medium_prop));
......
......@@ -184,6 +184,9 @@ brasero_status_dialog_deep_directory_cb (BraseroTrackDataCfg *project,
string);
g_free (string);
gtk_window_set_icon_name (GTK_WINDOW (message),
gtk_window_get_icon_name (GTK_WINDOW (dialog)));
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."
......@@ -220,6 +223,9 @@ brasero_status_dialog_2G_file_cb (BraseroTrackDataCfg *track,
string);
g_free (string);
gtk_window_set_icon_name (GTK_WINDOW (message),
gtk_window_get_icon_name (GTK_WINDOW (dialog)));
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 the ISO9660 standard in its first and second versions (the most widespread ones)."
"\nIt is recommended to use the third version of the ISO9660 standard, which is supported by most operating systems, including Linux and all versions of Windows ©."
......@@ -253,6 +259,9 @@ brasero_status_dialog_joliet_rename_cb (BraseroTrackData *track,
GTK_BUTTONS_NONE,
_("Should files be renamed to be fully Windows-compatible?"));
gtk_window_set_icon_name (GTK_WINDOW (message),
gtk_window_get_icon_name (GTK_WINDOW (dialog)));
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."));
......
......@@ -122,6 +122,9 @@ brasero_sum_dialog_message (BraseroSumDialog *self,
GTK_BUTTONS_NONE,
"%s", primary_message);
gtk_window_set_icon_name (GTK_WINDOW (message),
gtk_window_get_icon_name (GTK_WINDOW (self)));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
"%s.",
secondary_message);
......@@ -201,6 +204,9 @@ brasero_sum_dialog_corruption_warning (BraseroSumDialog *self,
"<b><big>%s</big></b>",
_("The following files appear to be corrupted:"));
gtk_window_set_icon_name (GTK_WINDOW (message),
gtk_window_get_icon_name (GTK_WINDOW (self)));
gtk_window_set_resizable (GTK_WINDOW (message), TRUE);
gtk_widget_set_size_request (GTK_WIDGET (message), 440, 300);
......
......@@ -409,6 +409,9 @@ brasero_tool_dialog_cancel_dialog (GtkWidget *toplevel)
GTK_BUTTONS_NONE,
_("Do you really want to quit?"));
gtk_window_set_icon_name (GTK_WINDOW (message),
gtk_window_get_icon_name (GTK_WINDOW (toplevel)));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
_("Interrupting the process may make disc unusable."));
gtk_dialog_add_buttons (GTK_DIALOG (message),
......@@ -524,8 +527,6 @@ brasero_tool_dialog_init (BraseroToolDialog *obj)
priv = BRASERO_TOOL_DIALOG_PRIVATE (obj);
gtk_window_set_icon_name (GTK_WINDOW (obj), "brasero");
gtk_dialog_set_has_separator (GTK_DIALOG (obj), FALSE);
/* upper part */
......
......@@ -388,6 +388,9 @@ brasero_utils_create_message_dialog (GtkWidget *parent,
"%s",
primary_message);
gtk_window_set_icon_name (GTK_WINDOW (message),
gtk_window_get_icon_name (GTK_WINDOW (parent)));
gtk_window_set_title (GTK_WINDOW (message), "");
if (secondary_message)
......
......@@ -101,16 +101,27 @@ static GObjectClass *parent_class;
static void
launch_brasero_on_window_session (BraseroSessionCfg *session,
const gchar *dialog_title,
GtkWidget *options,
GtkWindow *window)
{
const gchar *icon_name;
GtkWidget *dialog;
GtkResponseType result;
/* Get the icon for the window */
if (window)
icon_name = gtk_window_get_icon_name (window);
else
icon_name = "brasero";
/* run option dialog */
dialog = brasero_burn_options_new (session);
if (window)
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), FALSE);
gtk_window_set_icon_name (GTK_WINDOW (dialog), icon_name);
if (dialog_title)
gtk_window_set_title (GTK_WINDOW (dialog), dialog_title);
if (options)
brasero_burn_options_add_options (BRASERO_BURN_OPTIONS (dialog), options);
......@@ -124,8 +135,11 @@ launch_brasero_on_window_session (BraseroSessionCfg *session,
/* now run burn dialog */
dialog = brasero_burn_dialog_new ();
if (window)
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), FALSE);
gtk_window_set_icon_name (GTK_WINDOW (dialog), icon_name);
if (dialog_title)
gtk_window_set_title (GTK_WINDOW (dialog), dialog_title);
brasero_session_cfg_disable (session);
......@@ -228,7 +242,10 @@ write_activate (GtkWindow *toplevel)
gtk_widget_show_all (options);
/* NOTE: set the disc we're handling */
launch_brasero_on_window_session (session, options, toplevel);
launch_brasero_on_window_session (session,
_("CD/DVD Creator"),
options,
toplevel);
/* cleanup */
g_object_unref (session);
......@@ -243,6 +260,7 @@ write_activate_cb (NautilusMenuItem *item,
static void
launch_brasero_on_window_track (BraseroTrack *track,
const gchar *dialog_title,
GtkWidget *options,
GtkWindow *window)
{
......@@ -254,7 +272,10 @@ launch_brasero_on_window_track (BraseroTrack *track,
BRASERO_TRACK (track),
NULL);
launch_brasero_on_window_session (session, options, window);
launch_brasero_on_window_session (session,
dialog_title,
options,
window);
g_object_unref (session);
}
......@@ -272,7 +293,10 @@ write_iso_activate_cb (NautilusMenuItem *item,
track = brasero_track_image_cfg_new ();
brasero_track_image_cfg_set_source (track, uri);
launch_brasero_on_window_track (BRASERO_TRACK (track), NULL, GTK_WINDOW (user_data));
launch_brasero_on_window_track (BRASERO_TRACK (track),
_("Write to Disc"),
NULL,
GTK_WINDOW (user_data));
g_object_unref (track);
}
......@@ -294,7 +318,10 @@ copy_disc_activate_cb (NautilusMenuItem *item,
brasero_track_disc_set_drive (track, drive);
g_object_unref (drive);
launch_brasero_on_window_track (BRASERO_TRACK (track), NULL, GTK_WINDOW (user_data));
launch_brasero_on_window_track (BRASERO_TRACK (track),
_("Copy Disc"),
NULL,
GTK_WINDOW (user_data));
g_object_unref (track);
}
......@@ -323,7 +350,12 @@ tool_dialog_run (BraseroToolDialog *dialog,
g_object_unref (drive);
}
gtk_widget_show (GTK_WIDGET (dialog));
/* Get the icon for the window */
if (toplevel)
gtk_window_set_icon_name (GTK_WINDOW (dialog), gtk_window_get_icon_name (toplevel));
else
gtk_window_set_icon_name (GTK_WINDOW (dialog), "brasero");
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
}
......
......@@ -692,6 +692,8 @@ brasero_app_burn (BraseroApp *app,
/* now setup the burn dialog */
dialog = brasero_burn_dialog_new ();
gtk_window_set_icon_name (GTK_WINDOW (dialog), "brasero");
priv->burn_dialog = dialog;
brasero_app_set_toplevel (app, GTK_WINDOW (dialog));
......@@ -713,6 +715,8 @@ brasero_app_burn_options (BraseroApp *app,
dialog = brasero_burn_options_new (session);
brasero_app_set_toplevel (app, GTK_WINDOW (dialog));
gtk_window_set_icon_name (GTK_WINDOW (dialog), "brasero");
result = gtk_dialog_run (GTK_DIALOG (dialog));
/* The destruction of the dialog will bring the main window forward */
......@@ -798,6 +802,7 @@ brasero_app_blank (BraseroApp *app,
priv = BRASERO_APP_PRIVATE (app);
dialog = brasero_blank_dialog_new ();
gtk_window_set_icon_name (GTK_WINDOW (dialog), "brasero");
if (device) {
BraseroDrive *drive;
......@@ -855,6 +860,7 @@ on_eject_cb (GtkAction *action, BraseroApp *app)
priv = BRASERO_APP_PRIVATE (app);
dialog = brasero_eject_dialog_new ();
gtk_window_set_icon_name (GTK_WINDOW (dialog), "brasero");
/* FIXME! This is a bad idea and needs fixing */
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (priv->mainwin));
......@@ -880,6 +886,8 @@ brasero_app_check (BraseroApp *app,
priv = BRASERO_APP_PRIVATE (app);
dialog = brasero_sum_dialog_new ();
gtk_window_set_icon_name (GTK_WINDOW (dialog), "brasero");
priv->tool_dialog = GTK_WIDGET (dialog);
if (device) {
......
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