[yast-commit] r45731 - in /trunk/packager: package/yast2-packager.changes src/clients/repositories.ycp
Author: lslezak Date: Wed Mar 26 11:05:41 2008 New Revision: 45731 URL: http://svn.opensuse.org/viewcvs/yast?rev=45731&view=rev Log: - repositories - URL can be selected and copied (bnc#334757) Modified: trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/repositories.ycp Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=45731&r1=45730&r2=45731&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Wed Mar 26 11:05:41 2008 @@ -2,6 +2,7 @@ Wed Mar 26 08:16:48 CET 2008 - lslezak@suse.cz - media check - updated and improved help text (bnc#132881) +- repositories - URL can be selected and copied (bnc#334757) ------------------------------------------------------------------- Fri Mar 21 17:29:04 CET 2008 - lslezak@suse.cz Modified: trunk/packager/src/clients/repositories.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/repositories.ycp?rev=45731&r1=45730&r2=45731&view=diff ============================================================================== --- trunk/packager/src/clients/repositories.ycp (original) +++ trunk/packager/src/clients/repositories.ycp Wed Mar 26 11:05:41 2008 @@ -44,6 +44,8 @@ boolean full_mode = false; + boolean textmode = UI::GetDisplayInfo()["TextMode"]:false; + integer numSources = 0; list<map<string,any> > sourceStatesIn = []; @@ -173,15 +175,21 @@ UI::ChangeWidget( `id( `table ), `Items, items ); } - term repoInfoTerm(string name, string url, string category) { - term infoTerm = - `VBox ( - `Left (`Heading ( name ) ), - `Left (`Label ( url ) ), - `Left (`Label ( category ) ) - ); + string repoInfoRichText(string name, string url, string category) + { + return sformat("<P><B><BIG>%1</BIG></B></P><P>%2</P><P>%3</P>", name, url, category); + } - return infoTerm; + term repoInfoTerm(string name, string url, string category) + { + return textmode ? + `VBox ( + `Left(`Heading(`id(`name), `opt(`hstretch), name)), + `Left(`Label(`id(`url), `opt(`hstretch), url)), + `Left(`Label(`id(`category), `opt(`hstretch), category )) + ) + : + `VSquash(`RichText(`id(`repo_info), repoInfoRichText("", "", ""))); } void fillRepoInfo(integer index, map source) { @@ -195,8 +203,18 @@ // label, %1 is repo category (eg. YUM) string category = sformat (_("Category: %1"), info["type"]:_("Unknown")); - - UI::ReplaceWidget (`id (`repo_rp), repoInfoTerm( name, url, category ) ); + + if (textmode) + { + UI::ChangeWidget(`id(`name), `Label, name); + UI::ChangeWidget(`id(`url), `Label, url); + UI::ChangeWidget(`id(`category), `Label, category); + } + else + { + UI::ChangeWidget(`id(`repo_info), `Value, repoInfoRichText(name, url, category)); + } + UI::ChangeWidget (`id (`enable), `Value, info["enabled"]:true); UI::ChangeWidget (`id (`autorefresh), `Value, info["autorefresh"]:true); } @@ -566,9 +584,7 @@ `HBox ( `HSpacing (1), `HWeight( 1, `VBox ( - `ReplacePoint (`id (`repo_rp), - repoInfoTerm( "", "", "" )), - `VSpacing (0.4), + repoInfoTerm("", "", ""), // label `Left (`Label (_("Properties"))), // check box -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org