diff -Nru kubuntu-default-settings-12.04ubuntu4/debian/changelog kubuntu-default-settings-12.04ubuntu4+messages/debian/changelog --- kubuntu-default-settings-12.04ubuntu4/debian/changelog 2012-04-12 23:25:51.000000000 +0000 +++ kubuntu-default-settings-12.04ubuntu4+messages/debian/changelog 2015-04-05 18:02:07.000000000 +0000 @@ -1,3 +1,9 @@ +kubuntu-default-settings (1:12.04ubuntu4+messages) precise; urgency=low + + * Added support for plymouth scrolling boot log messages + + -- Pali Rohár Sun, 05 Apr 2015 20:01:56 +0200 + kubuntu-default-settings (1:12.04ubuntu4) precise; urgency=low [ Harald Sitter ] diff -Nru kubuntu-default-settings-12.04ubuntu4/lib/plymouth/themes/kubuntu-logo/kubuntu-logo.script kubuntu-default-settings-12.04ubuntu4+messages/lib/plymouth/themes/kubuntu-logo/kubuntu-logo.script --- kubuntu-default-settings-12.04ubuntu4/lib/plymouth/themes/kubuntu-logo/kubuntu-logo.script 2012-04-12 23:25:51.000000000 +0000 +++ kubuntu-default-settings-12.04ubuntu4+messages/lib/plymouth/themes/kubuntu-logo/kubuntu-logo.script 2015-04-05 18:00:31.000000000 +0000 @@ -19,6 +19,7 @@ # 02111-1307, USA. # # Written by: Alberto Milone +# Pali Rohár # # Based on the example provided with the "script plugin" written by: # Charlie Brej @@ -88,7 +89,7 @@ local.min_height; # Put the 1st line below the logo + some spacing - y = logo.y + logo.height + (progress_indicator.bullet_height * 7 ); # + logo_spacing; + y = logo.y + logo.height + (progress_indicator.bullet_height * 2 ); # + logo_spacing; text_height = first_line_height * 7.5; @@ -275,6 +276,14 @@ # a bit if needed. top_of_the_text = TextYOffset(); +# Character 'M' is the biggest - calculate maximum characters for line +log_line_width = Window.GetWidth () / ImageToTintedText ("M").GetWidth () - 5; +# Calculate line count +log_line_count = ( Window.GetHeight () - progress_indicator.y - progress_indicator.height ) / 20; + +for (i = 0; i < log_line_count; i++) + log_notification[i] = ""; + #-----------------------------------------Logo functions------------------------------ # Call this when updating the screen @@ -433,10 +442,8 @@ message_label.y = top_of_the_text; # Put the 2nd line below the fsck line - if (is_action_line) { - local.fsck_label.y = message_label.y + (first_line_height + first_line_height / 2); - message_label.y = local.fsck_label.y + (first_line_height * 2); - } + if (is_action_line) + message_label.y = progress_indicator.y + progress_indicator.height + 60; # Debug("action label x = " + message_label.x + " y = " + message_label.y ); @@ -533,6 +540,46 @@ if (keys != NULL) message = StringCopy (message, keys + StringLength(local.substring), NULL); + local.substring = "log:"; + local.log = StringString (message, local.substring); + if (log != NULL) { + message = StringCopy (message, log + StringLength (local.substring), NULL); + + if (message == "ok" || message == "failed") { + local.last = 0; + for (last = 0; last < log_line_count-1; last++) {} + + local.len = StringLength (log_notification[last]); + local.ok = ""; + local.failed = ""; + + if (len > 2) + ok = StringCopy (log_notification[last], len - 2, NULL); + + if (len > 6) + failed = StringCopy (log_notification[last], len - 6, NULL); + + if (len > 0 && ok != "ok" && failed != "failed") + log_notification[last] += " " + message; + } else { + if (StringLength (message) > log_line_width-6) + message = message.SubString (0, log_line_width-9); + message += "..."; + + for (i = 0; i < log_line_count-1; i++) + log_notification[i] = log_notification[i+1]; + log_notification[i] = message; + } + + message = ""; + for (i = 0; i < log_line_count; i++) + if (log_notification[i] != "") + message += log_notification[i] + "\n"; + + label = get_message_label ("", 1, 1); + setup_message ("", label.x, label.y, 10000, 1); + } + local.label.is_fake = is_fake; label = get_message_label(message, is_fake, is_action_line); label.z = 10000;