Mailinglist Archive: yast-commit (2113 mails)

< Previous Next >
[yast-commit] r58820 - in /trunk/storage: package/yast2-storage.changes storage/src/include/ep-lib.ycp storage/src/include/ep-lvm.ycp storage/src/include/ep-main.ycp
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Tue, 29 Sep 2009 15:16:28 -0000
  • Message-id: <E1MseRI-0001Nq-86@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Tue Sep 29 17:16:27 2009
New Revision: 58820

URL: http://svn.opensuse.org/viewcvs/yast?rev=58820&view=rev
Log:
- fixed buttons in lvm view

Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/include/ep-lib.ycp
trunk/storage/storage/src/include/ep-lvm.ycp
trunk/storage/storage/src/include/ep-main.ycp

Modified: trunk/storage/package/yast2-storage.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=58820&r1=58819&r2=58820&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Tue Sep 29 17:16:27 2009
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Tue Sep 29 17:15:34 CEST 2009 - aschnell@xxxxxxx
+
+- fixed buttons in lvm view
+
+-------------------------------------------------------------------
Tue Sep 22 15:17:10 CEST 2009 - jsrain@xxxxxxx

- don't limit partition table to GPT on x86_64 uEFI systems

Modified: trunk/storage/storage/src/include/ep-lib.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-lib.ycp?rev=58820&r1=58819&r2=58820&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-lib.ycp Tue Sep 29 17:16:27 2009
@@ -41,6 +41,27 @@
}


+ void SplitDevice(map<string, map> target_map, string device, map& disk,
map& part)
+ {
+ map disk_tmp = target_map[device]:nil;
+ map part_tmp = nil;
+
+ if (disk_tmp == nil)
+ {
+ foreach(string s, map d, target_map, {
+ part_tmp = find(map p, d["partitions"]:[], { return
p["device"]:"" == device; });
+ if (part_tmp != nil) {
+ disk_tmp = d;
+ break;
+ }
+ });
+ }
+
+ disk = disk_tmp;
+ part = part_tmp;
+ }
+
+
/**
* Must be called before removing device.
*/
@@ -48,23 +69,15 @@
{
map<string, map> target_map = Storage::GetTargetMap();

- map disk = target_map[device]:nil;
+ map disk = nil;
map part = nil;

- if (disk == nil)
- {
- foreach(string s, map d, target_map, {
- part = find(map p, d["partitions"]:[], { return p["device"]:""
== device; });
- if (part != nil) {
- disk = d;
- break;
- }
- });
- }
+ SplitDevice(target_map, device, disk, part);

return disk["device"]:"";
}

+
boolean ConfirmDeletingUsedDevice( map tg, map <string, any> part, symbol
used_by )
{
string device = part["device"]:"";

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=58820&r1=58819&r2=58820&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-lvm.ycp (original)
+++ trunk/storage/storage/src/include/ep-lvm.ycp Tue Sep 29 17:16:27 2009
@@ -71,6 +71,7 @@
);
}

+
void HandleLvmButtons( any user_data, string device, map event )
{
string vg = "";
@@ -78,10 +79,15 @@

if (user_data == nil)
{
- map dev = Storage::GetDiskPartition( device );
- vg = (string) dev["disk"]:nil;
- // FIXME: is this necessary & sufficient condition?
- is_vg = (dev["nr"]:"" == "");
+ map<string, map> target_map = Storage::GetTargetMap();
+
+ map disk = nil;
+ map part = nil;
+
+ SplitDevice(target_map, device, disk, part);
+
+ vg = disk["device"]:"";
+ is_vg = part == nil;
}
else
{
@@ -95,21 +101,21 @@
break;

case `edit:
- if ( is_vg )
+ if (is_vg)
TreePanel::SwitchToNew( vg );
else
EpEditLogicalVolume( device );
break;

case `resize:
- if ( is_vg )
+ if (is_vg)
EpResizeVolumeGroup( device);
else
EpResizeLogicalVolume ( device );
break;

case `delete:
- if ( is_vg )
+ if (is_vg)
EpDeleteVolumeGroup( device );
else
EpDeleteLogicalVolume ( device,
UI::WidgetExists(`id(`table)) ? `table : `overview );

Modified: trunk/storage/storage/src/include/ep-main.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-main.ycp?rev=58820&r1=58819&r2=58820&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-main.ycp (original)
+++ trunk/storage/storage/src/include/ep-main.ycp Tue Sep 29 17:16:27 2009
@@ -232,19 +232,10 @@
{
map<string, map> target_map = Storage::GetTargetMap();

- map disk = target_map[device]:nil;
+ map disk = nil;
map part = nil;

- if (disk == nil)
- {
- foreach(string s, map d, target_map, {
- part = find(map p, d["partitions"]:[], { return p["device"]:""
== device; });
- if (part != nil) {
- disk = d;
- break;
- }
- });
- }
+ SplitDevice(target_map, device, disk, part);

switch (disk["type"]:`unknown)
{

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages