[Bug 231841] Multiple encrypted partitions: password prompt needs additional info
bugzilla at redhat.com
bugzilla at redhat.com
Mon Apr 14 00:05:04 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-13 20:05 EST -------
Thanks for the improvements.
Not sure this is completely good, but....:
--- gnome-mount.c-old 2008-04-13 11:14:25.000000000 -0700
+++ gnome-mount.c 2008-04-13 16:58:54.000000000 -0700
@@ -2152,6 +2152,7 @@
char *drive_name;
char *result;
char *prompt;
+ char *title;
GtkWidget *dialog;
GnomePasswordDialogRemember remember;
char *keyring_password;
@@ -2229,10 +2230,22 @@
*/
notify_parent (TRUE);
- prompt = g_strdup_printf (
- _("The storage device %s contains encrypted data. Enter a password to
unlock."), drive_name);
+ if (libhal_volume_is_partition(volume)==FALSE) {
+ prompt = g_strdup_printf (
+ _("The storage device %s contains encrypted data. Enter a password to
unlock."), drive_name);
- dialog = gnome_password_dialog_new (_("Unlock Encrypted Data"), prompt, NULL,
NULL, FALSE);
+ title = g_strdup (
+ _("Unlock Encrypted Data"));
+ } else {
+ prompt = g_strdup_printf (
+ _("The storage device %s contains encrypted data. Enter a password to unlock
partition %u."), drive_name, libhal_volume_get_partition_number(volume));
+
+ title = g_strdup_printf (
+ _("Unlock Encrypted Data for partition %d"),
libhal_volume_get_partition_number(volume));
+ }
+
+ dialog = gnome_password_dialog_new (title, prompt, NULL, NULL, FALSE);
+ g_free (title);
g_free (prompt);
gnome_password_dialog_set_show_username (GNOME_PASSWORD_DIALOG (dialog), FALSE);
I'm sure this could be improved by someone more facile with the g_ and libhal_
functions.
The 'if ()' could be replaced by more complicated expressions in the calls to
g_strdup_printf(); not sure of the coding style here.
[The libhal_ functions are pretty neat.....]
--
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