Author: jsuchome Date: Tue Jun 12 13:31:28 2007 New Revision: 38405 URL: http://svn.opensuse.org/viewcvs/yast?rev=38405&view=rev Log: - check if resource group is installed before selecting it (#143273) - translate "file"/"service" - 2.15.0 Modified: trunk/profile-manager/VERSION trunk/profile-manager/package/yast2-profile-manager.changes trunk/profile-manager/src/ProfileManager.ycp trunk/profile-manager/src/dialogs.ycp Modified: trunk/profile-manager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/profile-manager/VERSION?rev=38405&r1=38404&r2=38405&view=diff ============================================================================== --- trunk/profile-manager/VERSION (original) +++ trunk/profile-manager/VERSION Tue Jun 12 13:31:28 2007 @@ -1 +1 @@ -2.14.1 +2.15.0 Modified: trunk/profile-manager/package/yast2-profile-manager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/profile-manager/package/yast2-profile-manager.changes?rev=38405&r1=38404&r2=38405&view=diff ============================================================================== --- trunk/profile-manager/package/yast2-profile-manager.changes (original) +++ trunk/profile-manager/package/yast2-profile-manager.changes Tue Jun 12 13:31:28 2007 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Jun 12 13:21:29 CEST 2007 - jsuchome@suse.cz + +- check if resource group is installed before selecting it (#143273) +- translate "file"/"service" +- 2.15.0 + +------------------------------------------------------------------- Fri May 25 13:30:04 CEST 2007 - jsrain@suse.cz - removed outdated translations from .desktop-files (#271209) Modified: trunk/profile-manager/src/ProfileManager.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/profile-manager/src/ProfileManager.ycp?rev=38405&r1=38404&r2=38405&view=diff ============================================================================== --- trunk/profile-manager/src/ProfileManager.ycp (original) +++ trunk/profile-manager/src/ProfileManager.ycp Tue Jun 12 13:31:28 2007 @@ -737,8 +737,9 @@ if (position != "last") { UI::OpenDialog(`opt(`decorated), `HBox(`HSpacing(1.5), `VBox( + `HSpacing (60), `VSpacing(1), - // LogView label: + // LogView label: `LogView(`id(`progress),_("Progress Information"), 10, 0), `VSpacing(1), `ProgressBar(`id(`pb), "", 100, 0), Modified: trunk/profile-manager/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/profile-manager/src/dialogs.ycp?rev=38405&r1=38404&r2=38405&view=diff ============================================================================== --- trunk/profile-manager/src/dialogs.ycp (original) +++ trunk/profile-manager/src/dialogs.ycp Tue Jun 12 13:31:28 2007 @@ -163,6 +163,13 @@ // map for saving user_defined flags of each resource map user_defined = $[]; + map type2string = $[ + // resource type (menu entry) + "file" : _("File"), + // resource type (menu entry) + "service" : _("Service"), + ]; + /** * Scan table items for presence of given resource */ @@ -178,11 +185,10 @@ return maplist (map res, group["resources"]:[], ``{ string name = res["name"]:""; - user_defined [name] = res["user_defined"]:false; //TODO not needed? if (res["active"]:false) - return `item(`id(name), "X", name, res["type"]:""); + return `item(`id(name), "X", name, type2string[res["type"]:""]:""); else - return `item(`id(name), "", name, res["type"]:""); + return `item(`id(name), "", name, type2string[res["type"]:""]:""); }); } @@ -550,6 +556,34 @@ } else if (ret == `rgroups) { + map group = resource_groups[selected]:$[]; + if (!group["active"]:false) + { + // files from the resource group that are not available + list<string> missing_files = []; + foreach (map res, group["resources"]:[], { + string name = res["name"]:""; + if (res["type"]:"" == "file" && !FileUtils::Exists (name)) + missing_files = add (missing_files, res["name"]:""); + }); + if (missing_files != [] && !Popup::AnyQuestionRichText (Popup::NoHeadline (), + // continue/cancel popup message, %1 is group name, %2 file(s) + sformat (_("The file <b>%2</b> from resource group <i>%1</i> +is not available on the system.<br> +The resource group is probably not installed.<br> +Really select this resource group?", +"These files from resource group <i>%1</i> are not available on the system:<br> +<b>%2</b><br> +The resource group is probably not installed.<br> +Really select this resource group?", size (missing_files)), + selected, mergestring (missing_files, "<br>")), + 60, 9, + Label::YesButton (), Label::NoButton (), `focus_no) + ) + { + continue; + } + } boolean active = mark_group_active (selected); UI::ChangeWidget (`id(`rgroups),`Item (selected, 0), active?"X":""); modified = true; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org