[yast-commit] r62627 - in /trunk/yast2: library/modules/Popup.ycp package/yast2.changes

Author: jsuchome Date: Wed Oct 13 10:11:05 2010 New Revision: 62627 URL: http://svn.opensuse.org/viewcvs/yast?rev=62627&view=rev Log: - open LongError popup instead of Error if the message is too long (bnc#611596) Modified: trunk/yast2/library/modules/Popup.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/library/modules/Popup.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/modules/Popup.ycp?r... ============================================================================== --- trunk/yast2/library/modules/Popup.ycp (original) +++ trunk/yast2/library/modules/Popup.ycp Wed Oct 13 10:11:05 2010 @@ -43,7 +43,11 @@ integer default_width = 60; integer default_height = 10; +// if error message is too long, show LongError instead of Error Popup +global boolean switch_to_richtext = true; +// lines of message text which force usage of RichText +global integer too_many_lines = 20; /** * Internal function that returns a popup dialog with an additional label. @@ -1272,7 +1276,11 @@ */ global define void Error(string message) { - anyMessageInternal( Label::ErrorMsg(), message, Icon::IconPath ("error") ); + list lines = splitstring (message, "\n"); + if (switch_to_richtext && size (lines) > too_many_lines) + anyMessageInternalRich( Label::ErrorMsg(), message, Icon::IconPath ("error"), default_width, default_height ); + else + anyMessageInternal( Label::ErrorMsg(), message, Icon::IconPath ("error") ); } /** Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=6... ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Wed Oct 13 10:11:05 2010 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Oct 13 10:07:55 CEST 2010 - jsuchome@suse.cz + +- open LongError popup instead of Error if the message is too long + (bnc#611596) + +------------------------------------------------------------------- Thu Oct 7 07:21:57 UTC 2010 - lslezak@suse.cz - just log problemDeltaDownload callbacks - libzypp automatically -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn2.opensuse.org