[brasero] Fix #598477 - Don't say Brasero in the title bar when running as nautilus
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Fix #598477 - Don't say Brasero in the title bar when running as nautilus
- Date: Fri, 16 Oct 2009 16:00:13 +0000 (UTC)
commit ec2b93913a87c12a04c2576d6be792c7cb070df7
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Fri Oct 16 17:59:24 2009 +0200
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
libbrasero-burn/brasero-blank-dialog.c | 6 +
libbrasero-burn/brasero-burn-dialog.c | 493 ++++++++++++++-------------
libbrasero-burn/brasero-burn-options.c | 4 +-
libbrasero-burn/brasero-burn.c | 4 +-
libbrasero-burn/brasero-drive-properties.c | 9 +
libbrasero-burn/brasero-medium-properties.c | 7 +
libbrasero-burn/brasero-status-dialog.c | 9 +
libbrasero-burn/brasero-sum-dialog.c | 6 +
libbrasero-burn/brasero-tool-dialog.c | 5 +-
libbrasero-utils/brasero-misc.c | 3 +
nautilus/nautilus-burn-extension.c | 50 +++-
src/brasero-app.c | 8 +
12 files changed, 350 insertions(+), 254 deletions(-)
---
diff --git a/libbrasero-burn/brasero-blank-dialog.c b/libbrasero-burn/brasero-blank-dialog.c
index c885a7a..30d2c07 100644
--- a/libbrasero-burn/brasero-blank-dialog.c
+++ b/libbrasero-burn/brasero-blank-dialog.c
@@ -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."));
diff --git a/libbrasero-burn/brasero-burn-dialog.c b/libbrasero-burn/brasero-burn-dialog.c
index 604d1b4..3170419 100644
--- a/libbrasero-burn/brasero-burn-dialog.c
+++ b/libbrasero-burn/brasero-burn-dialog.c
@@ -101,6 +101,9 @@ struct BraseroBurnDialogPrivate {
gint64 total_size;
GSList *rates;
+ gchar *initial_title;
+ gchar *initial_icon;
+
guint is_writing:1;
guint is_creating_image:1;
};
@@ -109,6 +112,52 @@ struct BraseroBurnDialogPrivate {
#define TIMEOUT 10000
+static GtkWidget *
+brasero_burn_dialog_create_message (BraseroBurnDialog *dialog,
+ GtkMessageType type,
+ GtkButtonsType buttons,
+ const gchar *main_message)
+{
+ const gchar *icon_name;
+ GtkWidget *message;
+
+ icon_name = gtk_window_get_icon_name (GTK_WINDOW (dialog));
+ message = gtk_message_dialog_new (GTK_WINDOW (dialog),
+ GTK_DIALOG_DESTROY_WITH_PARENT|
+ GTK_DIALOG_MODAL,
+ type,
+ buttons,
+ "%s", main_message);
+ gtk_window_set_icon_name (GTK_WINDOW (message), icon_name);
+ return message;
+}
+
+static gchar *
+brasero_burn_dialog_create_dialog_title_for_action (BraseroBurnDialog *dialog,
+ const gchar *action,
+ gint percent)
+{
+ gchar *tmp;
+ BraseroBurnDialogPrivate *priv;
+
+ priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
+
+ if (priv->initial_title)
+ action = priv->initial_title;
+
+ if (percent >= 0 && percent <= 100) {
+ /* Translators: This string is used in the title bar %s is the action currently performed */
+ tmp = g_strdup_printf (_("%s (%i%% Done)"),
+ action,
+ percent);
+ }
+ else
+ /* Translators: This string is used in the title bar %s is the action currently performed */
+ tmp = g_strdup (action);
+
+ return tmp;
+}
+
/**
* NOTE: if input is DISC then media is the media input
*/
@@ -118,8 +167,8 @@ brasero_burn_dialog_update_info (BraseroBurnDialog *dialog,
BraseroTrackType *input,
gboolean dummy)
{
- BraseroMedia media;
gchar *title = NULL;
+ BraseroMedia media;
gchar *header = NULL;
BraseroBurnDialogPrivate *priv;
@@ -140,67 +189,63 @@ brasero_burn_dialog_update_info (BraseroBurnDialog *dialog,
}
if (media == BRASERO_MEDIUM_FILE) {
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Creating Image"),
+ -1);
+
/* we are creating an image to the hard drive */
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"iso-image-new",
GTK_ICON_SIZE_DIALOG);
header = g_strdup_printf ("<big><b>%s</b></big>", _("Creating image"));
- title = g_strdup (_("Brasero â?? Creating Image"));
}
else if (media & BRASERO_MEDIUM_DVD) {
- if (input->type == BRASERO_TRACK_TYPE_STREAM
+ if (!brasero_track_type_get_has_medium (input))
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Burning DVD"),
+ -1);
+ else
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Copying DVD"),
+ -1);
+
+ if (brasero_track_type_get_has_stream (input)
&& BRASERO_STREAM_FORMAT_HAS_VIDEO (input->subtype.stream_format)) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning DVD (Simulation)"));
+ if (dummy)
header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of video DVD burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning DVD"));
+ else
header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning video DVD"));
- }
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"media-optical-video-new",
GTK_ICON_SIZE_DIALOG);
}
- else if (input->type == BRASERO_TRACK_TYPE_DATA) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning DVD (Simulation)"));
+ else if (brasero_track_type_get_has_data (input)) {
+ if (dummy)
header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of data DVD burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning DVD"));
+ else
header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning data DVD"));
- }
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"media-optical-data-new",
GTK_ICON_SIZE_DIALOG);
}
- else if (input->type == BRASERO_TRACK_TYPE_IMAGE) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning DVD (Simulation)"));
+ else if (brasero_track_type_get_has_image (input)) {
+ if (dummy)
header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of image to DVD burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning DVD"));
+ else
header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning image to DVD"));
- }
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"media-optical",
GTK_ICON_SIZE_DIALOG);
}
- else if (input->type == BRASERO_TRACK_TYPE_DISC) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Copying DVD (Simulation)"));
+ else if (brasero_track_type_get_has_medium (input)) {
+ if (dummy)
header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of data DVD copying"));
- }
- else {
- title = g_strdup (_("Brasero â?? Copying DVD"));
+ else
header = g_strdup_printf ("<big><b>%s</b></big>", _("Copying data DVD"));
- }
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"media-optical-copy",
@@ -208,147 +253,128 @@ brasero_burn_dialog_update_info (BraseroBurnDialog *dialog,
}
}
else if (media & BRASERO_MEDIUM_CD) {
- if (input->type == BRASERO_TRACK_TYPE_STREAM
+ if (!brasero_track_type_get_has_medium (input))
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Burning CD"),
+ -1);
+ else
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Copying CD"),
+ -1);
+
+ if (brasero_track_type_get_has_stream (input)
&& BRASERO_STREAM_FORMAT_HAS_VIDEO (input->subtype.stream_format)) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning CD (Simulation)"));
+ if (dummy)
header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of (S)VCD burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning CD"));
+ else
header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning (S)VCD"));
- }
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"drive-removable-media",
GTK_ICON_SIZE_DIALOG);
}
- else if (input->type == BRASERO_TRACK_TYPE_STREAM) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning CD (Simulation)"));
+ else if (brasero_track_type_get_has_stream (input)) {
+ if (dummy)
header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of audio CD burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning CD"));
+ else
header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning audio CD"));
- }
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"media-optical-audio-new",
GTK_ICON_SIZE_DIALOG);
}
- else if (input->type == BRASERO_TRACK_TYPE_DATA) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning CD (Simulation)"));
+ else if (brasero_track_type_get_has_data (input)) {
+ if (dummy)
header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of data CD burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning CD"));
+ else
header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning data CD"));
- }
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"media-optical-data-new",
GTK_ICON_SIZE_DIALOG);
}
- else if (input->type == BRASERO_TRACK_TYPE_DISC) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Copying CD (Simulation)"));
+ else if (brasero_track_type_get_has_medium (input)) {
+ if (dummy)
header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of CD copying"));
- }
- else {
- title = g_strdup (_("Brasero â?? Copying CD"));
+ else
header = g_strdup_printf ("<big><b>%s</b></big>", _("Copying CD"));
- }
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"media-optical-copy",
GTK_ICON_SIZE_DIALOG);
}
- else if (input->type == BRASERO_TRACK_TYPE_IMAGE) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning CD (Simulation)"));
+ else if (brasero_track_type_get_has_image (input)) {
+ if (dummy)
header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of image to CD burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning CD"));
+ else
header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning image to CD"));
- }
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
"media-optical",
GTK_ICON_SIZE_DIALOG);
}
}
- else if (input->type == BRASERO_TRACK_TYPE_STREAM
- && BRASERO_STREAM_FORMAT_HAS_VIDEO (input->subtype.stream_format)) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning disc (Simulation)"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of video disc burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning disc"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning video disc"));
- }
+ else {
+ if (!brasero_track_type_get_has_medium (input))
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Burning Disc"),
+ -1);
+ else
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Copying Disc"),
+ -1);
- gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
- "drive-removable-media",
- GTK_ICON_SIZE_DIALOG);
- }
- else if (input->type == BRASERO_TRACK_TYPE_STREAM) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning CD (Simulation)"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of audio CD burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning CD"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning audio CD"));
- }
+ if (brasero_track_type_get_has_stream (input)
+ && BRASERO_STREAM_FORMAT_HAS_VIDEO (input->subtype.stream_format)) {
+ if (dummy)
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of video disc burning"));
+ else
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning video disc"));
- gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
- "drive-removable-media",
- GTK_ICON_SIZE_DIALOG);
- }
- else if (input->type == BRASERO_TRACK_TYPE_DATA) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning Disc (Simulation)"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of data disc burning"));
- }
- else {
- title = g_strdup (_("Brasero â?? Burning Disc"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning data disc"));
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
+ "drive-removable-media",
+ GTK_ICON_SIZE_DIALOG);
}
+ else if (brasero_track_type_get_has_stream (input)) {
+ if (dummy)
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of audio CD burning"));
+ else
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning audio CD"));
- gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
- "drive-removable-media",
- GTK_ICON_SIZE_DIALOG);
- }
- else if (input->type == BRASERO_TRACK_TYPE_DISC) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Copying Disc (Simulation)"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of disc copying"));
- }
- else {
- title = g_strdup (_("Brasero â?? Copying Disc"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Copying disc"));
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
+ "drive-removable-media",
+ GTK_ICON_SIZE_DIALOG);
}
- gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
- "drive-removable-media",
- GTK_ICON_SIZE_DIALOG);
- }
- else if (input->type == BRASERO_TRACK_TYPE_IMAGE) {
- if (dummy) {
- title = g_strdup (_("Brasero â?? Burning Disc (Simulation)"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of image to disc burning"));
+ else if (brasero_track_type_get_has_data (input)) {
+ if (dummy)
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of data disc burning"));
+ else
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning data disc"));
+
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
+ "drive-removable-media",
+ GTK_ICON_SIZE_DIALOG);
}
- else {
- title = g_strdup (_("Brasero â?? Burning Disc"));
- header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning image to disc"));
+ else if (brasero_track_type_get_has_medium (input)) {
+ if (dummy)
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of disc copying"));
+ else
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Copying disc"));
+
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
+ "drive-removable-media",
+ GTK_ICON_SIZE_DIALOG);
}
+ else if (brasero_track_type_get_has_image (input)) {
+ if (dummy)
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Simulation of image to disc burning"));
+ else
+ header = g_strdup_printf ("<big><b>%s</b></big>", _("Burning image to disc"));
- gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
- "drive-removable-media",
- GTK_ICON_SIZE_DIALOG);
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
+ "drive-removable-media",
+ GTK_ICON_SIZE_DIALOG);
+ }
}
@@ -360,9 +386,6 @@ brasero_burn_dialog_update_info (BraseroBurnDialog *dialog,
gtk_label_set_text (GTK_LABEL (priv->header), header);
gtk_label_set_use_markup (GTK_LABEL (priv->header), TRUE);
g_free (header);
-
- /* it may have changed */
- gtk_window_set_icon_name (GTK_WINDOW (dialog), "brasero");
}
static void
@@ -384,13 +407,11 @@ brasero_burn_dialog_wait_for_insertion (BraseroBurnDialog *dialog,
{
gint result;
gint added_id;
- GtkWindow *window;
GtkWidget *message;
gboolean hide = FALSE;
BraseroBurnDialogPrivate *priv;
priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
- window = GTK_WINDOW (dialog);
if (!GTK_WIDGET_VISIBLE (dialog)) {
gtk_widget_show (GTK_WIDGET (dialog));
@@ -400,12 +421,10 @@ brasero_burn_dialog_wait_for_insertion (BraseroBurnDialog *dialog,
g_timer_stop (priv->total_time);
if (secondary_message) {
- message = gtk_message_dialog_new (window,
- GTK_DIALOG_DESTROY_WITH_PARENT|
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_CANCEL,
- "%s", main_message);
+ message = brasero_burn_dialog_create_message (dialog,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_CANCEL,
+ main_message);
if (secondary_message)
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
@@ -414,9 +433,7 @@ brasero_burn_dialog_wait_for_insertion (BraseroBurnDialog *dialog,
else {
gchar *string;
- message = gtk_message_dialog_new_with_markup (window,
- GTK_DIALOG_DESTROY_WITH_PARENT|
- GTK_DIALOG_MODAL,
+ message = brasero_burn_dialog_create_message (dialog,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_CANCEL,
NULL);
@@ -621,7 +638,6 @@ brasero_burn_dialog_image_error (BraseroBurn *burn,
gint result;
gchar *path;
gchar *string;
- GtkWindow *window;
GtkWidget *message;
gboolean hide = FALSE;
BraseroBurnDialogPrivate *priv;
@@ -635,21 +651,16 @@ brasero_burn_dialog_image_error (BraseroBurn *burn,
g_timer_stop (priv->total_time);
- window = GTK_WINDOW (dialog);
-
string = g_strdup_printf ("%s. %s",
is_temporary?
_("A file could not be created at the location specified for temporary files"):
_("The image could not be created at the specified location"),
_("Do you want to specify another location for this session or retry with the current location?"));
- message = gtk_message_dialog_new (window,
- GTK_DIALOG_DESTROY_WITH_PARENT|
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_NONE,
- "%s",
- string);
+ message = brasero_burn_dialog_create_message (dialog,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_NONE,
+ string);
g_free (string);
if (error && error->code == BRASERO_BURN_ERROR_DISK_SPACE)
@@ -760,14 +771,13 @@ brasero_burn_dialog_image_error (BraseroBurn *burn,
}
static BraseroBurnResult
-brasero_burn_dialog_loss_warnings_cb (GtkDialog *dialog,
+brasero_burn_dialog_loss_warnings_cb (BraseroBurnDialog *dialog,
const gchar *main_message,
const gchar *secondary_message,
const gchar *button_text,
const gchar *button_icon)
{
gint result;
- GtkWindow *window;
GtkWidget *button;
GtkWidget *message;
gboolean hide = FALSE;
@@ -782,13 +792,10 @@ brasero_burn_dialog_loss_warnings_cb (GtkDialog *dialog,
g_timer_stop (priv->total_time);
- window = GTK_WINDOW (dialog);
- message = gtk_message_dialog_new (window,
- GTK_DIALOG_DESTROY_WITH_PARENT|
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_NONE,
- "%s", main_message);
+ message = brasero_burn_dialog_create_message (dialog,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_NONE,
+ main_message);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
"%s", secondary_message);
@@ -829,7 +836,7 @@ brasero_burn_dialog_loss_warnings_cb (GtkDialog *dialog,
static BraseroBurnResult
brasero_burn_dialog_data_loss_cb (BraseroBurn *burn,
- GtkDialog *dialog)
+ BraseroBurnDialog *dialog)
{
return brasero_burn_dialog_loss_warnings_cb (dialog,
_("Do you really want to blank the current disc?"),
@@ -841,7 +848,7 @@ brasero_burn_dialog_data_loss_cb (BraseroBurn *burn,
static BraseroBurnResult
brasero_burn_dialog_previous_session_loss_cb (BraseroBurn *burn,
- GtkDialog *dialog)
+ BraseroBurnDialog *dialog)
{
gchar *secondary;
BraseroBurnResult result;
@@ -861,7 +868,7 @@ brasero_burn_dialog_previous_session_loss_cb (BraseroBurn *burn,
static BraseroBurnResult
brasero_burn_dialog_audio_to_appendable_cb (BraseroBurn *burn,
- GtkDialog *dialog)
+ BraseroBurnDialog *dialog)
{
gchar *secondary;
BraseroBurnResult result;
@@ -881,7 +888,7 @@ brasero_burn_dialog_audio_to_appendable_cb (BraseroBurn *burn,
static BraseroBurnResult
brasero_burn_dialog_rewritable_cb (BraseroBurn *burn,
- GtkDialog *dialog)
+ BraseroBurnDialog *dialog)
{
gchar *secondary;
BraseroBurnResult result;
@@ -912,10 +919,11 @@ brasero_burn_dialog_wait_for_ejection_cb (BraseroDrive *drive,
static BraseroBurnResult
brasero_burn_dialog_eject_failure_cb (BraseroBurn *burn,
BraseroDrive *drive,
- GtkDialog *dialog)
+ BraseroBurnDialog *dialog)
{
gint result;
gchar *name;
+ gchar *string;
gint removal_id;
GtkWindow *window;
GtkWidget *message;
@@ -934,15 +942,14 @@ brasero_burn_dialog_eject_failure_cb (BraseroBurn *burn,
window = GTK_WINDOW (dialog);
name = brasero_drive_get_display_name (drive);
- message = gtk_message_dialog_new (window,
- GTK_DIALOG_DESTROY_WITH_PARENT|
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_NONE,
- /* Translators: %s is the name of a drive */
- _("Please eject the disc from \"%s\" manually."),
- name);
+ /* Translators: %s is the name of a drive */
+ string = g_strdup_printf (_("Please eject the disc from \"%s\" manually."), name);
g_free (name);
+ message = brasero_burn_dialog_create_message (dialog,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_NONE,
+ string);
+ g_free (string);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
_("The disc could not be ejected though it needs to be removed for the current operation to continue."));
@@ -974,10 +981,9 @@ brasero_burn_dialog_eject_failure_cb (BraseroBurn *burn,
static BraseroBurnResult
brasero_burn_dialog_disable_joliet_cb (BraseroBurn *burn,
- GtkDialog *dialog)
+ BraseroBurnDialog *dialog)
{
gint result;
- GtkWindow *window;
GtkWidget *button;
GtkWidget *message;
gboolean hide = FALSE;
@@ -992,13 +998,10 @@ brasero_burn_dialog_disable_joliet_cb (BraseroBurn *burn,
g_timer_stop (priv->total_time);
- window = GTK_WINDOW (dialog);
- message = gtk_message_dialog_new (window,
- GTK_DIALOG_DESTROY_WITH_PARENT|
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_NONE,
- _("Do you want to continue with full Windows compatibility disabled?"));
+ message = brasero_burn_dialog_create_message (dialog,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_NONE,
+ _("Do you want to continue with full Windows compatibility disabled?"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
_("Some files don't have a suitable name for a fully Windows-compatible CD."));
@@ -1045,46 +1048,38 @@ brasero_burn_dialog_update_title_writing_progress (BraseroBurnDialog *dialog,
/* This is used only when actually writing to a disc */
if (media == BRASERO_MEDIUM_FILE)
- title = g_strdup_printf (_("Brasero â?? Creating Image (%i%% Done)"), percent);
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Creating Image"),
+ percent);
else if (media & BRASERO_MEDIUM_DVD) {
- if (input->type == BRASERO_TRACK_TYPE_DISC) {
- if (flags & BRASERO_BURN_FLAG_DUMMY)
- title = g_strdup (_("Brasero â?? Copying DVD (Simulation)"));
- else
- title = g_strdup_printf (_("Brasero â?? Copying DVD (%i%% Done)"), percent);
- }
- else {
- if (flags & BRASERO_BURN_FLAG_DUMMY)
- title = g_strdup (_("Brasero â?? Burning DVD (Simulation)"));
- else
- title = g_strdup_printf (_("Brasero â?? Burning DVD (%i%% Done)"), percent);
- }
+ if (brasero_track_type_get_has_medium (input))
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Copying DVD"),
+ percent);
+ else
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Burning DVD"),
+ percent);
}
else if (media & BRASERO_MEDIUM_CD) {
- if (input->type == BRASERO_TRACK_TYPE_DISC) {
- if (flags & BRASERO_BURN_FLAG_DUMMY)
- title = g_strdup (_("Brasero â?? Copying CD (Simulation)"));
- else
- title = g_strdup_printf (_("Brasero â?? Copying CD (%i%% Done)"), percent);
- }
- else {
- if (flags & BRASERO_BURN_FLAG_DUMMY)
- title = g_strdup (_("Brasero â?? Burning CD (simulation)"));
- else
- title = g_strdup_printf (_("Brasero â?? Burning CD (%i%% Done)"), percent);
- }
- }
- else if (input->type == BRASERO_TRACK_TYPE_DISC) {
- if (flags & BRASERO_BURN_FLAG_DUMMY)
- title = g_strdup (_("Brasero â?? Copying Disc (Simulation)"));
+ if (brasero_track_type_get_has_medium (input))
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Copying CD"),
+ percent);
else
- title = g_strdup_printf (_("Brasero â?? Copying Disc (%i%% Done)"), percent);
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Burning CD"),
+ percent);
}
else {
- if (flags & BRASERO_BURN_FLAG_DUMMY)
- title = g_strdup (_("Brasero â?? Burning Disc (Simulation)"));
+ if (brasero_track_type_get_has_medium (input))
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Copying Disc"),
+ percent);
else
- title = g_strdup_printf (_("Brasero â?? Burning Disc (%i%% Done)"), percent);
+ title = brasero_burn_dialog_create_dialog_title_for_action (dialog,
+ _("Burning Disc"),
+ percent);
}
gtk_window_set_title (GTK_WINDOW (dialog), title);
@@ -1248,7 +1243,6 @@ brasero_burn_dialog_dummy_success_cb (BraseroBurn *burn,
BraseroBurnDialogPrivate *priv;
GtkResponseType answer;
GtkWidget *message;
- GtkWindow *window;
GtkWidget *button;
gboolean hide;
gint id;
@@ -1264,13 +1258,10 @@ brasero_burn_dialog_dummy_success_cb (BraseroBurn *burn,
g_timer_stop (priv->total_time);
- window = GTK_WINDOW (dialog);
- message = gtk_message_dialog_new (window,
- GTK_DIALOG_DESTROY_WITH_PARENT|
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_INFO,
- GTK_BUTTONS_CANCEL,
- _("The simulation was successful."));
+ message = brasero_burn_dialog_create_message (dialog,
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_CANCEL,
+ _("The simulation was successful."));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
_("Real disc burning will take place in 10 seconds."));
@@ -1499,6 +1490,7 @@ brasero_burn_dialog_save_log (BraseroBurnDialog *dialog)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_OK,
NULL);
+ gtk_window_set_icon_name (GTK_WINDOW (chooser), gtk_window_get_icon_name (GTK_WINDOW (dialog)));
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (chooser), TRUE);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser),
@@ -1554,12 +1546,10 @@ brasero_burn_dialog_notify_error (BraseroBurnDialog *dialog,
if (!GTK_WIDGET_VISIBLE (dialog))
gtk_widget_show (GTK_WIDGET (dialog));
- message = gtk_message_dialog_new (GTK_WINDOW (dialog),
- GTK_DIALOG_DESTROY_WITH_PARENT |
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_NONE,
- _("Error while burning."));
+ message = brasero_burn_dialog_create_message (dialog,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_NONE,
+ _("Error while burning."));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
"%s",
@@ -1812,8 +1802,6 @@ brasero_burn_dialog_end_session (BraseroBurnDialog *dialog,
if (priv->total_time)
g_timer_stop (priv->total_time);
- brasero_burn_session_stop (priv->session);
-
if (result == BRASERO_BURN_CANCEL) {
/* nothing to do */
}
@@ -1954,12 +1942,15 @@ brasero_burn_dialog_record_session (BraseroBurnDialog *dialog)
priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
+ priv->initial_title = g_strdup (gtk_window_get_title (GTK_WINDOW (dialog)));
+ priv->initial_icon = g_strdup (gtk_window_get_icon_name (GTK_WINDOW (dialog)));
+
/* Update info */
brasero_burn_dialog_update_info (dialog,
&priv->input,
(brasero_burn_session_get_flags (BRASERO_BURN_SESSION (priv->session)) & BRASERO_BURN_FLAG_DUMMY) != 0);
- /* start the recording session */
+ /* Start the recording session */
brasero_burn_dialog_activity_start (dialog);
result = brasero_burn_dialog_setup_session (dialog, &error);
if (result != BRASERO_BURN_OK)
@@ -1972,6 +1963,20 @@ brasero_burn_dialog_record_session (BraseroBurnDialog *dialog)
priv->session,
&error);
+ /* Restore title */
+ if (priv->initial_title) {
+ gtk_window_set_title (GTK_WINDOW (dialog), priv->initial_title);
+ g_free (priv->initial_title);
+ priv->initial_title = NULL;
+ }
+
+ /* Restore icon */
+ if (priv->initial_icon) {
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), priv->initial_icon);
+ g_free (priv->initial_icon);
+ priv->initial_icon = NULL;
+ }
+
retry = brasero_burn_dialog_end_session (dialog,
result,
error);
@@ -2056,7 +2061,7 @@ brasero_burn_dialog_run (BraseroBurnDialog *dialog,
brasero_burn_session_get_input_type (session, &priv->input);
if (brasero_burn_session_is_dest_file (session))
media = BRASERO_MEDIUM_FILE;
- else if (priv->input.type != BRASERO_TRACK_TYPE_DISC)
+ else if (!brasero_track_type_get_has_medium (&priv->input))
media = brasero_burn_session_get_dest_media (session);
else {
BraseroMedium *medium;
@@ -2083,18 +2088,16 @@ brasero_burn_dialog_run (BraseroBurnDialog *dialog,
}
static gboolean
-brasero_burn_dialog_cancel_dialog (GtkWidget *toplevel)
+brasero_burn_dialog_cancel_dialog (BraseroBurnDialog *toplevel)
{
gint result;
GtkWidget *button;
GtkWidget *message;
- message = gtk_message_dialog_new (GTK_WINDOW (toplevel),
- GTK_DIALOG_DESTROY_WITH_PARENT |
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_NONE,
- _("Do you really want to quit?"));
+ message = brasero_burn_dialog_create_message (toplevel,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_NONE,
+ _("Do you really want to quit?"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG
(message),
@@ -2142,7 +2145,7 @@ brasero_burn_dialog_cancel (BraseroBurnDialog *dialog,
return TRUE;
if (brasero_burn_cancel (priv->burn, (force_cancellation == TRUE)) == BRASERO_BURN_DANGEROUS) {
- if (!brasero_burn_dialog_cancel_dialog (GTK_WIDGET (dialog)))
+ if (!brasero_burn_dialog_cancel_dialog (dialog))
return FALSE;
brasero_burn_cancel (priv->burn, FALSE);
@@ -2293,6 +2296,16 @@ brasero_burn_dialog_finalize (GObject * object)
priv = BRASERO_BURN_DIALOG_PRIVATE (object);
+ if (priv->initial_title) {
+ g_free (priv->initial_title);
+ priv->initial_title = NULL;
+ }
+
+ if (priv->initial_icon) {
+ g_free (priv->initial_icon);
+ priv->initial_icon = NULL;
+ }
+
if (priv->burn) {
brasero_burn_cancel (priv->burn, TRUE);
g_object_unref (priv->burn);
diff --git a/libbrasero-burn/brasero-burn-options.c b/libbrasero-burn/brasero-burn-options.c
index 6416993..6a86891 100644
--- a/libbrasero-burn/brasero-burn-options.c
+++ b/libbrasero-burn/brasero-burn-options.c
@@ -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 */
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index 7981c6e..155286e 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -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
diff --git a/libbrasero-burn/brasero-drive-properties.c b/libbrasero-burn/brasero-drive-properties.c
index 7a138fa..544abe9 100644
--- a/libbrasero-burn/brasero-drive-properties.c
+++ b/libbrasero-burn/brasero-drive-properties.c
@@ -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."));
diff --git a/libbrasero-burn/brasero-medium-properties.c b/libbrasero-burn/brasero-medium-properties.c
index 0d7c4a2..525d538 100644
--- a/libbrasero-burn/brasero-medium-properties.c
+++ b/libbrasero-burn/brasero-medium-properties.c
@@ -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));
diff --git a/libbrasero-burn/brasero-status-dialog.c b/libbrasero-burn/brasero-status-dialog.c
index 93d7098..da669cd 100644
--- a/libbrasero-burn/brasero-status-dialog.c
+++ b/libbrasero-burn/brasero-status-dialog.c
@@ -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."));
diff --git a/libbrasero-burn/brasero-sum-dialog.c b/libbrasero-burn/brasero-sum-dialog.c
index 9fbf4a7..2c1cbd6 100644
--- a/libbrasero-burn/brasero-sum-dialog.c
+++ b/libbrasero-burn/brasero-sum-dialog.c
@@ -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);
diff --git a/libbrasero-burn/brasero-tool-dialog.c b/libbrasero-burn/brasero-tool-dialog.c
index cdf0239..8f5fe6d 100644
--- a/libbrasero-burn/brasero-tool-dialog.c
+++ b/libbrasero-burn/brasero-tool-dialog.c
@@ -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 */
diff --git a/libbrasero-utils/brasero-misc.c b/libbrasero-utils/brasero-misc.c
index b0be9c7..0dbed00 100644
--- a/libbrasero-utils/brasero-misc.c
+++ b/libbrasero-utils/brasero-misc.c
@@ -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)
diff --git a/nautilus/nautilus-burn-extension.c b/nautilus/nautilus-burn-extension.c
index 74c0561..bd8e491 100644
--- a/nautilus/nautilus-burn-extension.c
+++ b/nautilus/nautilus-burn-extension.c
@@ -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));
}
diff --git a/src/brasero-app.c b/src/brasero-app.c
index a1ed6a5..be55d40 100644
--- a/src/brasero-app.c
+++ b/src/brasero-app.c
@@ -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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]