[Bug 231841] Multiple encrypted partitions: password prompt needs additional info

bugzilla at redhat.com bugzilla at redhat.com
Mon Apr 14 14:46:35 UTC 2008


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: Multiple encrypted partitions: password prompt needs additional info


https://bugzilla.redhat.com/show_bug.cgi?id=231841





------- Additional Comments From selinux at gmail.com  2008-04-14 10:46 EST -------
I think this cleans up the code flow a bit:

--- gnome-mount.c-old	2008-04-13 11:14:25.000000000 -0700
+++ gnome-mount.c	2008-04-14 07:42:26.000000000 -0700
@@ -2152,6 +2152,8 @@
 	char            *drive_name;
 	char            *result;
 	char            *prompt;
+	char            *partition_string;
+	char            *title;
 	GtkWidget	*dialog;
 	GnomePasswordDialogRemember remember;
 	char            *keyring_password;
@@ -2229,10 +2231,22 @@
 	 */
 	notify_parent (TRUE);
 
+	if (libhal_volume_is_partition(volume)==FALSE) {
+		partition_string = g_strdup ("");
+	} else {
+		partition_string = g_strdup_printf (
+			_(" (partition %d)"), libhal_volume_get_partition_number(volume));
+	}
+
 	prompt = g_strdup_printf (
-		_("The storage device %s contains encrypted data. Enter a password to
unlock."), drive_name);
+		_("The storage device %s%s contains encrypted data. Enter a password to
unlock."), drive_name, partition_string);
 	
-	dialog = gnome_password_dialog_new (_("Unlock Encrypted Data"), prompt, NULL,
NULL, FALSE);
+	title = g_strdup_printf (
+		_("Unlock Encrypted Data%s"), partition_string);
+
+	dialog = gnome_password_dialog_new (title, prompt, NULL, NULL, FALSE);
+	g_free (partition_string);
+	g_free (title);
 	g_free (prompt);
 
 	gnome_password_dialog_set_show_username (GNOME_PASSWORD_DIALOG (dialog), FALSE);


-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the fedora-triage-list mailing list