Author: aschnell
Date: Tue Jun 9 15:02:23 2009
New Revision: 57512
URL: http://svn.opensuse.org/viewcvs/yast?rev=57512&view=rev
Log:
- visualise encrypted devices by icon in tables
Modified:
trunk/storage/data/sysconfig.storage-yast2-storage
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/include/ep-all.ycp
trunk/storage/storage/src/include/ep-dm.ycp
trunk/storage/storage/src/include/ep-hd.ycp
trunk/storage/storage/src/include/ep-lvm.ycp
trunk/storage/storage/src/include/ep-raid.ycp
trunk/storage/storage/src/include/ep-settings.ycp
trunk/storage/storage/src/modules/StorageFields.ycp
trunk/storage/storage/src/modules/StorageIcons.ycp
Modified: trunk/storage/data/sysconfig.storage-yast2-storage
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/data/sysconfig.storage-yast2-storage?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/data/sysconfig.storage-yast2-storage (original)
+++ trunk/storage/data/sysconfig.storage-yast2-storage Tue Jun 9 15:02:23 2009
@@ -15,7 +15,7 @@
## Type: string
# List of hidden fields in expert-partitioner.
# Allowed values are: label uuid mount_by used_by bios_id start_cyl
-# end_cyl num_cyl cyl_size fc_wwpn fc_fcp_lun fc_port_id
+# end_cyl num_cyl cyl_size fc_wwpn fc_fcp_lun fc_port_id encrypted
#
# Separate individual values by single space
HIDDEN_FIELDS="uuid mount_by used_by bios_id fc_wwpn fc_fcp_lun fc_port_id"
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Tue Jun 9 15:02:23 2009
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Tue Jun 09 14:48:30 CEST 2009 - aschnell@suse.de
+
+- visualise encrypted devices by icon in tables
+
+-------------------------------------------------------------------
Tue Jun 02 15:05:23 CEST 2009 - aschnell@suse.de
- split off libstorage
Modified: trunk/storage/storage/src/include/ep-all.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-all.ycp?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-all.ycp (original)
+++ trunk/storage/storage/src/include/ep-all.ycp Tue Jun 9 15:02:23 2009
@@ -29,8 +29,8 @@
string short_hostname = Hostname::CurrentHostname();
- list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size,
- `format, `type, `fs_type, `label,
+ list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size, `format,
+ `encrypted, `type, `fs_type, `label,
`mount_point, `mount_by, `used_by ]);
map target_map = Storage::GetTargetMap();
Modified: trunk/storage/storage/src/include/ep-dm.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-dm.ycp?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-dm.ycp (original)
+++ trunk/storage/storage/src/include/ep-dm.ycp Tue Jun 9 15:02:23 2009
@@ -20,8 +20,9 @@
return StorageFields::PredicateDiskType(disk, partition, [`CT_DM]);
}
- list<symbol> fields = StorageSettings::FilterTable([ `device, `size, `format, `type, `fs_type,
- `label, `mount_point, `mount_by, `used_by ]);
+ list<symbol> fields = StorageSettings::FilterTable([ `device, `size, `format, `encrypted, `type,
+ `fs_type, `label, `mount_point, `mount_by,
+ `used_by ]);
map target_map = Storage::GetTargetMap();
@@ -103,7 +104,7 @@
}
list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size,
- `format, `type, `used_by ]);
+ `format, `encrypted, `type, `used_by ]);
map target_map = Storage::GetTargetMap();
Modified: trunk/storage/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-hd.ycp?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-hd.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd.ycp Tue Jun 9 15:02:23 2009
@@ -121,8 +121,8 @@
list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size, `format,
- `type, `fs_type, `label, `mount_point, `mount_by,
- `start_cyl, `end_cyl, `used_by ]);
+ `encrypted, `type, `fs_type, `label, `mount_point,
+ `mount_by, `start_cyl, `end_cyl, `used_by ]);
map target_map = Storage::GetTargetMap();
@@ -248,8 +248,8 @@
}
list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size, `format,
- `type, `fs_type, `label, `mount_point, `mount_by,
- `start_cyl, `end_cyl, `used_by ]);
+ `encrypted, `type, `fs_type, `label, `mount_point,
+ `mount_by, `start_cyl, `end_cyl, `used_by ]);
map target_map = Storage::GetTargetMap();
@@ -417,7 +417,7 @@
}
list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size,
- `format, `type, `used_by ]);
+ `format, `encrypted, `type, `used_by ]);
map target_map = Storage::GetTargetMap();
Modified: trunk/storage/storage/src/include/ep-lvm.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-lvm.ycp?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-lvm.ycp (original)
+++ trunk/storage/storage/src/include/ep-lvm.ycp Tue Jun 9 15:02:23 2009
@@ -135,9 +135,9 @@
return StorageFields::PredicateDiskType(disk, partition, [`CT_LVM]);
}
- list<symbol> fields = StorageSettings::FilterTable([ `device, `size, `format, `type, `fs_type,
- `label, `mount_point, `mount_by, `used_by,
- `lvm_metadata, `pe_size, `stripes ]);
+ list<symbol> fields = StorageSettings::FilterTable([ `device, `size, `format, `encrypted, `type,
+ `fs_type, `label, `mount_point, `mount_by,
+ `used_by, `lvm_metadata, `pe_size, `stripes ]);
map target_map = Storage::GetTargetMap();
@@ -232,9 +232,9 @@
return StorageFields::PredicateDiskDevice(disk, partition, [ device ]);
}
- list<symbol> fields = StorageSettings::FilterTable([ `device, `size, `format, `type, `fs_type,
- `label, `mount_point, `mount_by, `used_by,
- `stripes ]);
+ list<symbol> fields = StorageSettings::FilterTable([ `device, `size, `format, `encrypted, `type,
+ `fs_type, `label, `mount_point, `mount_by,
+ `used_by, `stripes ]);
map target_map = Storage::GetTargetMap();
@@ -290,7 +290,7 @@
}
list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size,
- `format, `type, `used_by ]);
+ `format, `encrypted, `type, `used_by ]);
map target_map = Storage::GetTargetMap();
Modified: trunk/storage/storage/src/include/ep-raid.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-raid.ycp?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-raid.ycp (original)
+++ trunk/storage/storage/src/include/ep-raid.ycp Tue Jun 9 15:02:23 2009
@@ -77,9 +77,9 @@
return StorageFields::PredicateDiskType(disk, partition, [`CT_MD]);
}
- list<symbol> fields = StorageSettings::FilterTable([ `device, `size, `format, `type, `fs_type, `label,
- `mount_point, `mount_by, `used_by, `raid_type,
- `chunk_size ]);
+ list<symbol> fields = StorageSettings::FilterTable([ `device, `size, `format, `encrypted, `type,
+ `fs_type, `label, `mount_point, `mount_by,
+ `used_by, `raid_type, `chunk_size ]);
map target_map = Storage::GetTargetMap();
@@ -175,7 +175,7 @@
}
list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size,
- `format, `type, `used_by ]);
+ `format, `encrypted, `type, `used_by ]);
map target_map = Storage::GetTargetMap();
Modified: trunk/storage/storage/src/include/ep-settings.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-settings.ycp?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-settings.ycp (original)
+++ trunk/storage/storage/src/include/ep-settings.ycp Tue Jun 9 15:02:23 2009
@@ -27,7 +27,9 @@
// list entry
$[ `label : _("Cylinder information"), `fields : toset([ `start_cyl, `end_cyl, `num_cyl, `cyl_size ]) ],
// list entry
- $[ `label : _("Fibre Channel information"), `fields : toset([ `fc_wwpn, `fc_fcp_lun, `fc_port_id ]) ]
+ $[ `label : _("Fibre Channel information"), `fields : toset([ `fc_wwpn, `fc_fcp_lun, `fc_port_id ]) ],
+ // list entry
+ $[ `label : _("Encryption"), `fields : [ `encrypted ] ]
];
map mount_bys = $[
Modified: trunk/storage/storage/src/modules/StorageFields.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/StorageFields.ycp?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/StorageFields.ycp (original)
+++ trunk/storage/storage/src/modules/StorageFields.ycp Tue Jun 9 15:02:23 2009
@@ -101,7 +101,12 @@
case `format:
// Column header, abbreviation for "format" (to format a partition)
- header = add(header, `Right(_("F")));
+ header = add(header, `Center(_("F")));
+ break;
+
+ case `encrypted:
+ // Column header, , abbreviation for "encrypted" (an encrypted device)
+ header = add(header, `Center(_("Enc")));
break;
case `fs_type:
@@ -260,8 +265,8 @@
case `encrypted:
// helptext for table column and overview entry
- ret = ret + _("<b>Encrypted</b> shows whether the file system
-is encrypted.");
+ ret = ret + _("<b>Encrypted</b> shows whether the device is
+encrypted.");
break;
case `end_cyl:
@@ -296,9 +301,8 @@
case `format:
// helptext for table column and overview entry
- ret = ret + _("<b>Format</b> shows some flags: <tt>C</tt>
-means the partition is encrypted. <tt>F</tt> means the partition is selected
-to be formatted.");
+ ret = ret + _("<b>Format</b> shows some flags: <tt>F</tt>
+means the device is selected to be formatted.");
break;
case `fs_id:
@@ -525,8 +529,6 @@
if (disk["dasdfmt"]:false)
value = value + "X";
} else {
- if (part["enc_type"]:`none != `none)
- value = value + "C";
if (part["format"]:false)
value = value + "F";
}
@@ -539,12 +541,24 @@
case `encrypted:
{
- string value = BooleanToHumanString(data["enc_type"]:`none != `none);
+ boolean value = data["enc_type"]:`none != `none;
if (style == `table)
- return value;
+ {
+ if (value)
+ {
+ if (UI::GetDisplayInfo()["HasIconSupport"]:false)
+ return `cell(`icon(Directory::icondir + "22x22/apps/" + StorageIcons::encrypted_icon), "");
+ else
+ return "E";
+ }
+ else
+ return "";
+ }
else
+ {
// row label, %1 is replace by "Yes" or "No"
- return sformat(_("Encrypted: %1"), value);
+ return sformat(_("Encrypted: %1"), BooleanToHumanString(value));
+ }
}
case `fs_type:
Modified: trunk/storage/storage/src/modules/StorageIcons.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/StorageIcons.ycp?rev=57512&r1=57511&r2=57512&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/StorageIcons.ycp (original)
+++ trunk/storage/storage/src/modules/StorageIcons.ycp Tue Jun 9 15:02:23 2009
@@ -7,6 +7,7 @@
{
module "StorageIcons";
+
global const string all_icon = "yast-disk.png";
@@ -35,6 +36,9 @@
global const string log_icon = "yast-messages.png";
+ global const string encrypted_icon = "yast-encrypted.png";
+
+
global string IconMap(symbol type)
{
switch (type)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org