Author: locilka
Date: Tue Jan 29 11:40:11 2008
New Revision: 43963
URL: http://svn.opensuse.org/viewcvs/yast?rev=43963&view=rev
Log:
- New desktop selection dialog without system task combo-boxes.
System selection with icons (bnc #356926).
- More UI checking in dialogs.
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_complex_welcome.ycp
trunk/installation/src/clients/inst_mode.ycp
trunk/installation/src/clients/inst_proposal.ycp
trunk/installation/src/clients/inst_software_selection.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=43963&r1=43962&r2=43963&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Tue Jan 29 11:40:11 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Tue Jan 29 17:34:03 CET 2008 - locilka@suse.cz
+
+- New desktop selection dialog without system task combo-boxes.
+ System selection with icons (bnc #356926).
+- More UI checking in dialogs.
+
+-------------------------------------------------------------------
Mon Jan 28 13:00:19 CET 2008 - aschnell@suse.de
- support Qt and Gtk frontend in startup scripts
Modified: trunk/installation/src/clients/inst_complex_welcome.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_complex_welcome.ycp?rev=43963&r1=43962&r2=43963&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_complex_welcome.ycp (original)
+++ trunk/installation/src/clients/inst_complex_welcome.ycp Tue Jan 29 11:40:11 2008
@@ -230,7 +230,7 @@
`Left (`Label (`opt(`boldFont), _("License Agreement"))),
`Left (`Label (_("License agreement is missing here.
It will be added soon."))),
- `Left (`CheckBox (`id (`license_agreement), `opt (`notify), _("I Do Agree to the License Terms."), InstData::product_license_accepted))
+ `Left (`CheckBox (`id (`license_agreement), `opt (`notify), _("I Do &Agree to the License Terms."), InstData::product_license_accepted))
)
),
`VWeight (3, `VStretch())
Modified: trunk/installation/src/clients/inst_mode.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_mode.ycp?rev=43963&r1=43962&r2=43963&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_mode.ycp (original)
+++ trunk/installation/src/clients/inst_mode.ycp Tue Jan 29 11:40:11 2008
@@ -276,8 +276,9 @@
}
// Use Sources defined by product
else if (ret == `productsources) {
- if (UI::WidgetExists (`id (`productsources)))
+ if (UI::WidgetExists (`id (`productsources))) {
Installation::productsources_selected = (boolean) UI::QueryWidget (`id (`productsources), `Value);
+ }
ret = nil;
continue;
}
@@ -372,7 +373,9 @@
ProductControl::DisabledModules = add (ProductControl::DisabledModules, "inst_add-on");
}
- Installation::productsources_selected = (boolean) UI::QueryWidget (`id (`productsources), `Value);
+ if (UI::WidgetExists (`id (`productsources))) {
+ Installation::productsources_selected = (boolean) UI::QueryWidget (`id (`productsources), `Value);
+ }
ProductControl::DisabledModules = filter (string m, ProductControl::DisabledModules, {
return m != "productsources" && m != "inst_productsources";
});
Modified: trunk/installation/src/clients/inst_proposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_proposal.ycp?rev=43963&r1=43962&r2=43963&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_proposal.ycp (original)
+++ trunk/installation/src/clients/inst_proposal.ycp Tue Jan 29 11:40:11 2008
@@ -76,7 +76,11 @@
**/
define void display_proposal( string proposal ) ``{
- UI::ChangeWidget(`id(`proposal), `Value, proposal );
+ if (UI::WidgetExists (`id(`proposal))) {
+ UI::ChangeWidget(`id(`proposal), `Value, proposal );
+ } else {
+ y2error (-1, "Widget `proposal does not exist");
+ }
};
Modified: trunk/installation/src/clients/inst_software_selection.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_software_selection.ycp?rev=43963&r1=43962&r2=43963&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_software_selection.ycp (original)
+++ trunk/installation/src/clients/inst_software_selection.ycp Tue Jan 29 11:40:11 2008
@@ -21,6 +21,7 @@
import "Popup";
import "Stage";
import "Directory";
+import "Icon";
// do not offer the dialog if base selection is fixed
if (ProductFeatures::GetFeature ("software", "selection_type") == `fixed)
@@ -29,19 +30,15 @@
boolean text_mode = UI::GetDisplayInfo()["TextMode"]:false;
DefaultDesktop::Init();
-string default_desktop = DefaultDesktop::Desktop ();
+string default_desktop = DefaultDesktop::Desktop();
-// TRANSLATORS: help text 1/3
+// TRANSLATORS: help text 1/2
string help = _("<p>This is a base selection where you can decide which common
parts of the system will by installed.</p>") +
-// TRANSLATORS: help text 2/3
-_("<p>First, select a <b>Type of System</b> that allows you to choose
-the base task of the system.</p>") +
-
-// TRANSLATORS: help text 3/3
-_("<p>Then, choose secondary system tasks - what do you want to do with
-this system.</p>");
+// TRANSLATORS: help text 2/2
+_("<p>Select a <b>Type of System</b> that allows you to choose
+the base task of the system.</p>");
/**
* @struct $[
@@ -60,89 +57,34 @@
"order" : 1,
"label" : _("GNOME Desktop"),
"patterns" : ["gnome", "x11", "base"],
- "icon" : "pattern-gnome.png",
+ "icon" : "pattern-gnome",
],
"kde" : $[
"order" : 1,
"label" : _("KDE Desktop"),
"patterns" : ["kde", "x11", "base"],
- "icon" : "pattern-kde.png",
+ "icon" : "pattern-kde",
],
"xfce" : $[
"order" : 4,
"label" : _("XFCE Desktop"),
"patterns" : ["xfce", "x11", "base"],
- "icon" : "yast-tv.png",
+ "icon" : "yast-tv",
],
"min_x" : $[
"order" : 6,
- "label" : _("Minimal X"),
+ "label" : _("Minimal X-Windows"),
"patterns" : ["x11", "base"],
- "icon" : "yast-x11.png",
+ "icon" : "yast-x11",
],
"textmode" : $[
"order" : 8,
- "label" : _("Text Mode"),
+ "label" : _("Minimal Server Selection (Text Mode)"),
"patterns" : ["base"],
- "icon" : "yast-sshd.png",
+ "icon" : "yast-sshd",
],
- "base" : $[
- "order" : 9,
- "label" : _("Base (Minimal) Selection"),
- "patterns" : ["base"],
- "icon" : "yast.png",
- ]
];
-// Could be defined in control file
-map system_tasks = $[
- "office" : $[
- "order" : 5,
- "label" : _("Open and modify documents from my mother"),
- "patterns" : ["office"],
- "icon" : "yast-messages.png",
- "default" : true,
- ],
- "multimedia" : $[
- "order" : 6,
- "label" : _("Use multimedia"),
- "patterns" : ["multimedia"],
- "icon" : "yast-sound.png",
- "default" : true,
- ],
- "imaging" : $[
- "order" : 7,
- "label" : _("Do some graphics"),
- "patterns" : ["imaging"],
- "icon" : "yast-autofs.png",
- "default" : false,
- ],
- "games" : $[
- "order" : 8,
- "label" : _("Play games"),
- "patterns" : ["games"],
- "icon" : "yast-joystick.png",
- "default" : false,
- ],
- "network_admin" : $[
- "order" : 10,
- "label" : _("Administer and debug network"),
- "patterns" : ["network_admin"],
- "icon" : "yast-network.png",
- "default" : false,
- ],
-];
-
-foreach (string task_name, map one_task, system_tasks, {
- // if not yet defined, assign a boolean value for particular
- if (! haskey (InstData::current_systasks_status, task_name)) {
- InstData::current_systasks_status[task_name] = one_task["default"]:false;
- }
-});
-
-string SystemTaskID (string task_name) {
- return sformat ("systemtask:%1", task_name);
-}
void SelectSoftwareNow () {
y2milestone ("Selected desktop: %1", InstData::selected_desktop);
@@ -154,85 +96,56 @@
y2milestone ("Marking desktop pattern to be installed: %1", one_pattern);
Pkg::ResolvableInstall (one_pattern, `pattern);
});
+}
- // go through all known system tasks
- foreach (string one_task_name, map one_system_task, system_tasks, {
- // when a task is selected
- if ((boolean) UI::QueryWidget (`id (SystemTaskID (one_task_name)), `Value) == true) {
- // pre-select all patterns listed in it
- foreach (string one_pattern, (list <string>) system_tasks[one_task_name, "patterns"]:[], {
- y2milestone ("Marking system-task pattern to be installed: %1", one_pattern);
- Pkg::ResolvableInstall (one_pattern, `pattern);
- });
-
- // and store its state for the next run
- InstData::current_systasks_status[one_task_name] = true;
- } else {
- InstData::current_systasks_status[one_task_name] = false;
- }
- });
+string GetDesktopRadioButtonId (string desktop_name) {
+ if (desktop_name == nil || desktop_name == "") {
+ y2warning ("Wrong desktop name: %1", desktop_name);
+ return "";
+ }
+
+ return sformat ("selected_desktop_%1", desktop_name);
}
-list <term> GetListOfDesktops () {
+term GetDesktops () {
list <string> sort_order = maplist (string desktop_name, map one_desktop, all_desktops, {
return desktop_name;
});
sort_order = sort (string x, string y, sort_order, ``(all_desktops[x,"order"]:99 < all_desktops[y,"order"]:99));
- list <term> ret = [
- `item (
- `id ("-none-"),
- // TRANSLATORS: Combo box item
- _("Choose one...")
- )
- ];
+ term ret = `VBox ();
- integer counter = 0;
+ integer counter = -1;
foreach (string desktop_name, sort_order, {
counter = counter + 1;
- ret[counter] = `item (
- `id (desktop_name),
- `icon (all_desktops[desktop_name,"icon"]:"yast.png"),
- all_desktops[desktop_name,"label"]:""
- );
- });
-
- return ret;
-}
-
-term GetListOfTasks () {
- term ret = `VBox();
-
- list <string> sort_order = maplist (string task_name, map one_task, system_tasks, {
- return task_name;
- });
-
- sort_order = sort (string x, string y, sort_order, ``(system_tasks[x,"order"]:99 < system_tasks[y,"order"]:99));
+ // boolean text_mode
- integer counter = -1;
-
- foreach (string task_name, sort_order, {
- counter = counter + 1;
-
- ret[counter] = `HBox (
- (text_mode ? `Empty():`Image (Directory::themedir + "/current/icons/22x22/apps/" + system_tasks[task_name,"icon"]:"yast.png", "")),
- (text_mode ? `Empty():`HSpacing (1)),
- `Left (`CheckBox (
- `id (SystemTaskID (task_name)),
- system_tasks[task_name,"label"]:"",
- // default values, need to be read on exit
- InstData::current_systasks_status[task_name]:false
- ))
- );
+ ret[counter] =
+ `Left (`HBox (
+ `Image (Icon::IconPath(all_desktops[desktop_name,"icon"]:"yast"), ""),
+ `HSpacing (2),
+ `RadioButton (
+ `id (GetDesktopRadioButtonId (desktop_name)),
+ `opt (`notify),
+ all_desktops[desktop_name,"label"]:""
+ )
+ ));
});
return ret;
}
void RedrawSelDesktopInfo (string currently_selected) {
+ if (currently_selected == nil || currently_selected == "") {
+ y2milestone ("No desktop is currently selected");
+ return;
+ } else {
+ y2milestone ("Selected desktop: %1", currently_selected);
+ }
+
list <string> desktop_patterns = all_desktops[currently_selected,"patterns"]:[];
list