[brasero] Use the original drive name not the one from GDrive object
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Use the original drive name not the one from GDrive object
- Date: Tue, 17 Nov 2009 21:26:59 +0000 (UTC)
commit 78a319e9587e5b8888373d8dc084e553cd4ac54f
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Tue Nov 17 20:49:27 2009 +0100
Use the original drive name not the one from GDrive object
Fix a small leak on error
libbrasero-burn/brasero-medium-properties.c | 1 +
libbrasero-media/brasero-drive-selection.c | 4 ++--
libbrasero-media/brasero-drive.c | 3 ---
src/brasero-eject-dialog.c | 6 ++++--
src/brasero-project.c | 3 +++
5 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/libbrasero-burn/brasero-medium-properties.c b/libbrasero-burn/brasero-medium-properties.c
index 4ead6dc..4c64c55 100644
--- a/libbrasero-burn/brasero-medium-properties.c
+++ b/libbrasero-burn/brasero-medium-properties.c
@@ -89,6 +89,7 @@ brasero_medium_properties_drive_properties (BraseroMediumProperties *self)
drive = brasero_burn_session_get_burner (priv->session);
display_name = brasero_drive_get_display_name (drive);
+
header = g_strdup_printf (_("Properties of %s"), display_name);
g_free (display_name);
diff --git a/libbrasero-media/brasero-drive-selection.c b/libbrasero-media/brasero-drive-selection.c
index 5758c18..f094759 100644
--- a/libbrasero-media/brasero-drive-selection.c
+++ b/libbrasero-media/brasero-drive-selection.c
@@ -324,7 +324,7 @@ brasero_drive_selection_show_type (BraseroDriveSelection *selector,
drive = item->data;
- drive_name = brasero_drive_get_display_name (drive);
+ drive_name = brasero_drive_get_display_name (drive);
if (!brasero_drive_is_fake (drive)) {
GDrive *gdrive;
@@ -371,9 +371,9 @@ brasero_drive_selection_drive_added_cb (BraseroMediumMonitor *monitor,
BraseroDriveSelection *self)
{
BraseroDriveSelectionPrivate *priv;
+ gchar *drive_name = NULL;
gboolean add = FALSE;
GtkTreeModel *model;
- gchar *drive_name;
GIcon *drive_icon;
GtkTreeIter iter;
diff --git a/libbrasero-media/brasero-drive.c b/libbrasero-media/brasero-drive.c
index 8e494c9..2a02042 100644
--- a/libbrasero-media/brasero-drive.c
+++ b/libbrasero-media/brasero-drive.c
@@ -610,9 +610,6 @@ brasero_drive_get_display_name (BraseroDrive *drive)
return g_strdup (_("Image File"));
}
- if (priv->gdrive)
- return g_drive_get_name (priv->gdrive);
-
return g_strdup (priv->name);
}
diff --git a/src/brasero-eject-dialog.c b/src/brasero-eject-dialog.c
index f099ef8..015f1e1 100644
--- a/src/brasero-eject-dialog.c
+++ b/src/brasero-eject-dialog.c
@@ -89,9 +89,11 @@ brasero_eject_dialog_activate (GtkDialog *dialog,
}*/
if (!brasero_drive_eject (drive, TRUE, &error)) {
gchar *string;
+ gchar *display_name;
- string = g_strdup_printf (_("The disc in \"%s\" cannot be ejected"),
- brasero_drive_get_display_name (drive));
+ display_name = brasero_drive_get_display_name (drive);
+ string = g_strdup_printf (_("The disc in \"%s\" cannot be ejected"), display_name);
+ g_free (display_name);
brasero_app_alert (brasero_app_get_default (),
string,
diff --git a/src/brasero-project.c b/src/brasero-project.c
index a2cdd32..df45eb6 100644
--- a/src/brasero-project.c
+++ b/src/brasero-project.c
@@ -1,3 +1,5 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
/***************************************************************************
* project.c
*
@@ -1452,6 +1454,7 @@ brasero_project_drive_properties (BraseroProject *project)
/* Build dialog */
drive = brasero_burn_session_get_burner (BRASERO_BURN_SESSION (project->priv->session));
+
display_name = brasero_drive_get_display_name (drive);
header = g_strdup_printf (_("Properties of %s"), display_name);
g_free (display_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]