Author: aschnell
Date: Wed Apr 2 16:58:00 2008
New Revision: 45988
URL: http://svn.opensuse.org/viewcvs/yast?rev=45988&view=rev
Log:
- mostly "Add Partition" UI stuff
Added:
branches/tmp/aschnell/part-redesign/storage/src/modules/MiniWorkflow.ycp
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-log.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-unused.ycp
branches/tmp/aschnell/part-redesign/storage/src/modules/DualMultiSelectionBox.ycp
branches/tmp/aschnell/part-redesign/storage/src/modules/Makefile.am
branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
branches/tmp/aschnell/part-redesign/storage/src/modules/TabPanel.ycp
branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/custom_part_dialogs.ycp Wed Apr 2 16:58:00 2008
@@ -922,9 +922,9 @@
`ComboBox(`id(`fs), `opt(`hstretch, `notify),
// label text
_("File &system"), filesystems )),
- `PushButton( `id(`fs_options ),`opt(`hstretch),
+ `PushButton( `id(`fs_options ), `opt(`hstretch),
// button text
- _("O&ptions") ),
+ _("O&ptions...") ),
CryptWidget );
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-all.ycp Wed Apr 2 16:58:00 2008
@@ -52,7 +52,7 @@
term header = StorageFields::TableHeader(fields);
map target_map = Storage::GetTargetMap();
- list table_list = StorageFields::TableContent(fields, target_map, predicate_all);
+ list table_list = StorageFields::TableContents(fields, target_map, predicate_all);
UI::ReplaceWidget(`tree_panel,
`VBox(
@@ -85,7 +85,7 @@
if (old_filter != filter_)
{
map target_map = Storage::GetTargetMap();
- list table_list = StorageFields::TableContent(fields, target_map, predicate_all);
+ list table_list = StorageFields::TableContents(fields, target_map, predicate_all);
UI::ChangeWidget(`table, `Items, table_list);
}
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-dialogs.ycp Wed Apr 2 16:58:00 2008
@@ -12,10 +12,14 @@
term FrameSize(symbol flavour)
{
return `Frame(_("Size"),
- `HBox(`InputField(`id(`size), "Size:"),
- `ComboBox(`id(`unit), "Unit:", ["MB", "GB", "TB"]),
- `HStretch(),
- `PushButton(`id(`max_size), "Max Size"))
+ `RadioButtonGroup(`id(`size),
+ `VBox(
+ `Left(`RadioButton(`id(`max_size), "Maximum Size (XX.XX GB)")),
+ `Left(`RadioButton(`id(`manual_size), "Manual Size")),
+ IndentAfterRadioButton(
+ `MinWidth(15, `InputField(`id(`size), `opt(`shrinkable), "Size"))
+ ))
+ )
);
}
@@ -23,11 +27,11 @@
term FrameFormat(symbol flavour)
{
term tmp = `VBox(
- `RadioButton(`id(`do_not_format),
- _("Do not format the partition")));
+ `Left(`RadioButton(`id(`do_not_format),
+ _("Do not format the partition"))));
if (flavour == `part)
- tmp = add(tmp, FsidComboBox($[], FileSystems::GetAllFileSystems(true, true)));
+ tmp = add(tmp, IndentAfterRadioButton(FsidComboBox($[], FileSystems::GetAllFileSystems(true, true))));
return `Frame(_("Format"),
`VBox(
@@ -35,10 +39,11 @@
`VBox(
tmp,
`VBox(
- `RadioButton(`id(`do_format),
- _("Format the partition")),
- FileSystemsComboBox($[], FileSystems::GetAllFileSystems(true, true)))
- ))
+ `Left(`RadioButton(`id(`do_format),
+ _("Format the partition"))),
+ IndentAfterRadioButton(
+ FileSystemsComboBox($[], FileSystems::GetAllFileSystems(true, true))))
+ ))
)
);
}
@@ -61,13 +66,39 @@
mountpoints = union([mount], mountpoints);
return `Frame(_("Mount"),
- `HBox(
- `ComboBox(`id(`mount_point), `opt(`editable, `hstretch, `notify),
- _("Mount the partition at"), mountpoints),
- `HStretch(),
- `PushButton(`id(`fstab_options),
- // button text
- _("Fs&tab Options..."))
+ `VBox(
+ `RadioButtonGroup(`id(`mount),
+ `VBox(
+ `Left(`RadioButton(`id(`do_mount),
+ _("Mount partition"))),
+ IndentAfterRadioButton(`VBox(
+ `ComboBox(`id(`mount_point), `opt(`editable, `hstretch, `notify),
+ _("Mount Point"), mountpoints),
+ `PushButton(`id(`fstab_options), `opt(`hstretch),
+ // button text
+ _("Fs&tab Options..."))
+ )),
+ `Left(`RadioButton(`id(`do_not_mount),
+ _("Do not mount partition")))
+ )
+ )
+ )
+ );
+ }
+
+
+ term FramePassword()
+ {
+ return `Frame(_("Password"),
+ `VBox(
+ `Password(`id("pw1"),
+ // Label: get password for user root
+ // Please use newline if label is longer than 40 characters
+ _("&Enter a password for your file system:"), ""),
+ `Password(`id("pw2"),
+ // Label: get same password again for verification
+ // Please use newline if label is longer than 40 characters
+ _("Reenter the password for &verification:"), "")
)
);
}
@@ -186,7 +217,7 @@
void RescanDisks()
- {
+ {
UI::OpenDialog(`opt(`decorated),
// popup text
`MarginBox(2, 1, `Label(_("Rescanning disks..."))));
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-dialogs.ycp Wed Apr 2 16:58:00 2008
@@ -9,6 +9,9 @@
textdomain "storage";
+ import "MiniWorkflow";
+
+
term FramePartitionType(map possibilities)
{
term tmp = `VBox();
@@ -34,42 +37,132 @@
}
- boolean DlgCreatePartition(map possibilities)
+
+
+
+ // I don't want to set the title 4 times
+ // where store globel data, e.g. possibilities
+ // where save the collected data?
+
+ any StepType(map possibilities)
{
- UI::OpenDialog(`opt(`decorated),
- // heading in a popup dialog
- `VBox(`Left(`Heading(_("Add Partition"))),
- SpaceFrames([ FramePartitionType(possibilities),
- FrameSize(`part),
- FrameFormat(`part),
- FrameMount(`part) ]),
- `HBox(
- `PushButton(`id(`cancel), Label::CancelButton()),
- `PushButton(`id(`ok), `opt(`default), Label::OKButton())
- )
- )
- );
+ MiniWorkflow::SetContents(_("Add Partition"),
+ `HVSquash(FramePartitionType(possibilities)),
+ "help");
- symbol widget = nil;
+ MiniWorkflow::SetLastStep(false);
+
+ return MiniWorkflow::UserInput();
+ }
+
+ any StepSize()
+ {
+ MiniWorkflow::SetContents(_("Add Partition"),
+ `HVSquash(FrameSize(`part)),
+ "help");
+
+ MiniWorkflow::SetLastStep(false);
+
+ return MiniWorkflow::UserInput();
+ }
+
+ any StepFormatMount()
+ {
+ MiniWorkflow::SetContents(_("Add Partition"),
+ `HVSquash(StackFrames(
+ [ FrameFormat(`part),
+ FrameMount(`part) ]
+ )),
+ "help");
+
+ MiniWorkflow::SetLastStep(true);
+
+ any widget = nil;
repeat
{
- widget = (symbol) UI::UserInput();
+ widget = MiniWorkflow::UserInput();
+
+ if (widget == `crypt_fs)
+ {
+ MiniWorkflow::SetLastStep(UI::QueryWidget(`id(`crypt_fs), `Value) != true);
+ }
+ else if (widget == `fs_options)
+ {
+ FileSystemOptions($[], $[]);
+ }
+ else if (widget == `fstab_options)
+ {
+ FstabOptions($[], $[]);
+ }
}
- until (widget == `cancel || widget == `ok);
+ until (widget == `abort || widget == `back || widget == `next);
- UI::CloseDialog();
+ if (widget == `next)
+ {
+ if (UI::QueryWidget(`id(`crypt_fs), `Value) == true)
+ return `next;
+ else
+ return `finish;
+ }
+
+ return widget;
+ }
+
+ any StepPassword()
+ {
+ MiniWorkflow::SetContents(_("Add Partition"),
+ `HVSquash(FramePassword()),
+ "help");
+
+ MiniWorkflow::SetLastStep(true);
+
+ any ret = MiniWorkflow::UserInput();
+
+ if (ret == `next)
+ return `finish;
+
+ return ret;
+ }
+
+
+ boolean DlgCreatePartition(map possibilities)
+ {
+ y2milestone("huhu");
+
+ map aliases = $[
+ "Type" : ``(StepType(possibilities)),
+ "Size" : ``(StepSize()),
+ "FormatMount" : ``(StepFormatMount()),
+ "Password" : ``(StepPassword())
+ ];
+
+ map sequence = $[
+ "Type" : $[ `next : "Size" ],
+ "Size" : $[ `next : "FormatMount",
+ `finish : `finish ],
+ "FormatMount" : $[ `next : "Password",
+ `finish : `finish ],
+ "Password" : $[ `finish : `finish ]
+ ];
+
+ symbol ret = MiniWorkflow::Run(aliases, sequence, "Type");
+
+ y2milestone("huhu %1", ret);
return false;
}
+
+
+
boolean DlgEditPartition(string device)
{
UI::OpenDialog(`opt(`decorated),
// heading in a popup dialog
`VBox(`Left(`Heading(_("Edit Partition"))),
- SpaceFrames([ FrameFormat(`part),
+ StackFrames([ FrameFormat(`part),
FrameMount(`part) ]),
`HBox(
`PushButton(`id(`cancel), Label::CancelButton()),
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp Wed Apr 2 16:58:00 2008
@@ -163,7 +163,7 @@
term header = StorageFields::TableHeader(fields);
map tg = Storage::GetTargetMap();
- list table_list = StorageFields::TableContent(fields, tg, predicate);
+ list table_list = StorageFields::TableContents(fields, tg, predicate);
UI::ReplaceWidget(`tab_panel,
`VBox(
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-log.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-log.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-log.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-log.ycp Wed Apr 2 16:58:00 2008
@@ -20,7 +20,7 @@
UI::ReplaceWidget(`tree_panel,
`VBox(
`Left(`Heading(_("Log"))),
- `LogView(`id(`log), sformat(_("Content of %1:"), file), 10, max_lines),
+ `LogView(`id(`log), sformat(_("Contents of %1:"), file), 10, max_lines),
`PushButton(`id(`update), _("Update"))
));
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm-dialogs.ycp Wed Apr 2 16:58:00 2008
@@ -143,7 +143,7 @@
UI::OpenDialog(`opt(`decorated),
// heading in a popup dialog
`VBox(`Left(`Heading(_("Add Logical Volume"))),
- SpaceFrames([ FrameVgNameNew(),
+ StackFrames([ FrameVgNameNew(),
FrameSize(`lv),
FrameStripes(),
FrameFormat(`lv),
@@ -176,7 +176,7 @@
UI::OpenDialog(`opt(`decorated),
// heading in a popup dialog
`VBox(`Left(`Heading(_("Edit Logical Volume"))),
- SpaceFrames([ FrameVgName(),
+ StackFrames([ FrameVgName(),
FrameFormat(`lv),
FrameMount(`lv) ]),
`HBox(
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp Wed Apr 2 16:58:00 2008
@@ -111,7 +111,7 @@
term header = StorageFields::TableHeader(fields);
map tg = Storage::GetTargetMap();
- list table_list = StorageFields::TableContent(fields, tg, predicate);
+ list table_list = StorageFields::TableContents(fields, tg, predicate);
UI::ReplaceWidget(`tab_panel,
`VBox(
@@ -179,7 +179,7 @@
`used_by ]);
term header = StorageFields::TableHeader(fields);
- list table_list = StorageFields::TableContent(fields, tg, predicate);
+ list table_list = StorageFields::TableContents(fields, tg, predicate);
UI::ReplaceWidget(`tab_panel,
`VBox(
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-main.ycp Wed Apr 2 16:58:00 2008
@@ -23,17 +23,23 @@
}
- term SpaceFrames(list<term> contents)
+ term StackFrames(list<term> frames)
{
term tmp = `VBox();
- foreach(term content, contents, {
+ foreach(term frame, frames, {
if (size(tmp) != 0)
tmp = add(tmp, `VSpacing(0.5));
- tmp = add(tmp, content);
+ tmp = add(tmp, frame);
});
return `MarginBox(1, 0.5, tmp);
}
+
+ term IndentAfterRadioButton(term contents)
+ {
+ return `HBox(`HSpacing(4), contents);
+ }
+
void UpdateNavigationTree(any new_focus);
@@ -202,7 +208,7 @@
string back_label = Label::BackButton();
string next_label = Label::AcceptButton();
- term content = `MarginBox(0.7, 0.5,
+ term contents = `MarginBox(0.7, 0.5,
`HBox(
`HWeight(30, systemViewTreePanel ),
`HWeight(70, `ReplacePoint(`id(`tree_panel),
@@ -211,7 +217,7 @@
);
// heading text
- Wizard::SetContentsButtons(_("Expert Partitioner"), content, "", back_label, next_label);
+ Wizard::SetContentsButtons(_("Expert Partitioner"), contents, "", back_label, next_label);
TreePanel::Init(data);
@@ -249,9 +255,9 @@
{
if (DoApply() == `back)
{
- // DoApply (inst_prepdisk) replaces the wizard content
+ // DoApply (inst_prepdisk) replaces the wizard contents
// TODO: make nicer
- Wizard::SetContentsButtons(_("Expert Partitioner"), content, "", back_label, next_label);
+ Wizard::SetContentsButtons(_("Expert Partitioner"), contents, "", back_label, next_label);
UpdateNavigationTree(nil);
widget = nil;
continue;
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid.ycp Wed Apr 2 16:58:00 2008
@@ -93,7 +93,7 @@
term header = StorageFields::TableHeader(fields);
map tg = Storage::GetTargetMap();
- list table_list = StorageFields::TableContent(fields, tg, predicate);
+ list table_list = StorageFields::TableContents(fields, tg, predicate);
UI::ReplaceWidget(`tab_panel,
`VBox(
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-unused.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-unused.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-unused.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-unused.ycp Wed Apr 2 16:58:00 2008
@@ -39,7 +39,7 @@
term header = StorageFields::TableHeader(fields);
map target_map = Storage::GetTargetMap();
- list table_list = StorageFields::TableContent(fields, target_map, predicate_unused);
+ list table_list = StorageFields::TableContents(fields, target_map, predicate_unused);
UI::ReplaceWidget(`tree_panel,
`VBox(
Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/DualMultiSelectionBox.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/DualMultiSelectionBox.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/modules/DualMultiSelectionBox.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/modules/DualMultiSelectionBox.ycp Wed Apr 2 16:58:00 2008
@@ -19,14 +19,14 @@
list<term> items = [];
- list<term> MakeUnselContent()
+ list<term> MakeUnselContents()
{
list<term> ret = filter(term item, items, { return item[2]:false == false; });
return maplist(term item, ret, { return `item(item[0]:nil, item[1]:nil, item[3]:false); });
}
- list<term> MakeSelContent()
+ list<term> MakeSelContents()
{
list<term> ret = filter(term item, items, { return item[2]:false == true; });
return maplist(term item, ret, { return `item(item[0]:nil, item[1]:nil, item[3]:false); });
@@ -38,7 +38,7 @@
items = i;
return `HBox(
- `MultiSelectionBox(`id(`unsel), "Available Physical Volumes:", MakeUnselContent()),
+ `MultiSelectionBox(`id(`unsel), "Available Physical Volumes:", MakeUnselContents()),
`VBox(
`PushButton(`id(`add), "Add" + " " + UI::Glyph(`ArrowRight)),
`PushButton(`id(`add_all), "Add All" + " " + UI::Glyph(`ArrowRight)),
@@ -46,7 +46,7 @@
`PushButton(`id(`remove), UI::Glyph(`ArrowLeft) + " " + "Remove"),
`PushButton(`id(`remove_all), UI::Glyph(`ArrowLeft) + " " + "Remove All")
),
- `MultiSelectionBox(`id(`sel), "Selected Physical Volumes:", MakeSelContent())
+ `MultiSelectionBox(`id(`sel), "Selected Physical Volumes:", MakeSelContents())
);
}
@@ -55,8 +55,8 @@
{
items = i;
- UI::ChangeWidget(`id(`unsel), `Items, MakeUnselContent());
- UI::ChangeWidget(`id(`sel), `Items, MakeSelContent());
+ UI::ChangeWidget(`id(`unsel), `Items, MakeUnselContents());
+ UI::ChangeWidget(`id(`sel), `Items, MakeSelContents());
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/Makefile.am?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/modules/Makefile.am (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/modules/Makefile.am Wed Apr 2 16:58:00 2008
@@ -22,6 +22,7 @@
StorageFields.ycp \
TreePanel.ycp \
TabPanel.ycp \
+ MiniWorkflow.ycp \
DualMultiSelectionBox.ycp
EXTRA_DIST = $(module_DATA) $(ynclude_DATA)
Added: branches/tmp/aschnell/part-redesign/storage/src/modules/MiniWorkflow.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/MiniWorkflow.ycp?rev=45988&view=auto
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/modules/MiniWorkflow.ycp (added)
+++ branches/tmp/aschnell/part-redesign/storage/src/modules/MiniWorkflow.ycp Wed Apr 2 16:58:00 2008
@@ -0,0 +1,58 @@
+/**
+ * File: MiniWorkflow.ycp
+ * Package: yast2-storage
+ * Summary: Expert Partitioner
+ * Authors: Arvin Schnell
+ *
+ * Tiny wrapper around Sequencer and Wizard.
+ */
+{
+ module "MiniWorkflow";
+
+
+ import "Label";
+ import "Wizard";
+ import "Sequencer";
+
+
+ global void SetContents(string title, term contents, string help_text)
+ {
+ Wizard::SetContentsFocus(title, contents, help_text, true, true, true);
+ }
+
+
+ global void SetLastStep(boolean last)
+ {
+ if (last)
+ Wizard::SetNextButton(`next, Label::FinishButton());
+ else
+ Wizard::SetNextButton(`next, Label::NextButton());
+ }
+
+
+ global any UserInput()
+ {
+ return Wizard::UserInput();
+ }
+
+
+ global symbol Run(map aliases, map sequence, string start)
+ {
+ Wizard::OpenNextBackDialog();
+
+ sequence = mapmap(string key, any value, sequence, {
+ if (key != "ws_start" && is(value, map))
+ if (!haskey((map) value, `abort))
+ value = add((map) value, `abort, `abort);
+ return $[ key : value ];
+ });
+
+ sequence["ws_start"] = start;
+
+ symbol ret = Sequencer::Run(aliases, sequence);
+
+ Wizard::CloseDialog();
+
+ return ret;
+ }
+}
Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp Wed Apr 2 16:58:00 2008
@@ -591,10 +591,10 @@
* Possible return values for predicate:
* `show, `follow, `showandfollow, `ignore
*/
- global list<term> TableContent(list<symbol> fields, map target_map,
- symbol(map, map) predicate)
+ global list<term> TableContents(list<symbol> fields, map target_map,
+ symbol(map, map) predicate)
{
- list<term> content = [];
+ list<term> contents = [];
void callback(map target_map, map disk)
{
@@ -604,7 +604,7 @@
contains([`show, `showandfollow], disk_predicate))
{
term row = StorageFields::TableRow(fields, disk, nil);
- content = add(content, row);
+ contents = add(contents, row);
}
if (contains([`follow, `showandfollow], disk_predicate))
@@ -619,7 +619,7 @@
contains([`show, `showandfollow], part_predicate))
{
term row = StorageFields::TableRow(fields, disk, partition);
- content = add(content, row);
+ contents = add(contents, row);
}
});
}
@@ -627,7 +627,7 @@
IterateTargetMap(target_map, callback);
- return content;
+ return contents;
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/TabPanel.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/TabPanel.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/modules/TabPanel.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/modules/TabPanel.ycp Wed Apr 2 16:58:00 2008
@@ -95,14 +95,14 @@
}
- global term DumbTab(term id, list<term> tabs, term content)
+ global term DumbTab(term id, list<term> tabs, term contents)
{
if (!UI::HasSpecialWidget(`DumbTab))
return `VBox(`Left(`ComboBox(id, `opt(`notify), "DumbTab Workaround",
maplist(term t, tabs, {
return `item(t[0]:nil, deletechars(t[1]:"", "&"));
- }))), content);
+ }))), contents);
else
- return `DumbTab(id, tabs, content);
+ return `DumbTab(id, tabs, contents);
}
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.ycp?rev=45988&r1=45987&r2=45988&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/modules/TreePanel.ycp Wed Apr 2 16:58:00 2008
@@ -67,7 +67,7 @@
}
/**
- * Update the content of the Tree widget.
+ * Update the contents of the Tree widget.
*/
global void Update(map d, list tree, any new_item)
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org