Merge lp:~darkxst/ubuntu/saucy/ubuntu-gnome-default-settings/new_plymouth into lp:ubuntu/saucy/ubuntu-gnome-default-settings

Proposed by Tim Lunn on 2013-08-28
Status: Merged
Merged at revision: 16
Proposed branch: lp:~darkxst/ubuntu/saucy/ubuntu-gnome-default-settings/new_plymouth
Merge into: lp:ubuntu/saucy/ubuntu-gnome-default-settings
Diff against target: 610 lines (+313/-96)
6 files modified
debian/changelog (+9/-0)
debian/plymouth-theme-ubuntu-gnome-logo.install (+1/-0)
debian/ubuntu-gnome-default-settings.gsettings-override (+1/-1)
lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.grub (+1/-1)
lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.script (+297/-90)
lib/plymouth/themes/ubuntu-gnome-text/ubuntu-gnome-text.plymouth.in (+4/-4)
To merge this branch: bzr merge lp:~darkxst/ubuntu/saucy/ubuntu-gnome-default-settings/new_plymouth
Reviewer Review Type Date Requested Status
Ubuntu branches 2013-08-28 Pending
Review via email: mp+182524@code.launchpad.net
To post a comment you must log in.
18. By Tim Lunn on 2013-08-28

revert renaming of plymouth text theme moduleName to fix text theme

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-08-02 10:02:10 +0000
3+++ debian/changelog 2013-08-28 02:14:10 +0000
4@@ -1,3 +1,12 @@
5+ubuntu-gnome-default-settings (13.10.7) UNRELEASED; urgency=low
6+
7+ * Update to new plymouth theme, Thanks Alfredo Hernández
8+ * Add noise texture to plymouth theme
9+ * revert renaming of plymouth text theme moduleName to fix text theme
10+ * Use Ubuntu GNOME logo for gdm
11+
12+ -- Tim Lunn <tim@feathertop.org> Wed, 28 Aug 2013 07:29:17 +1000
13+
14 ubuntu-gnome-default-settings (13.10.6) saucy; urgency=low
15
16 * Adjust GNOME Shell "favorites" for ubiquity.desktop rename
17
18=== modified file 'debian/plymouth-theme-ubuntu-gnome-logo.install'
19--- debian/plymouth-theme-ubuntu-gnome-logo.install 2012-09-29 00:33:02 +0000
20+++ debian/plymouth-theme-ubuntu-gnome-logo.install 2013-08-28 02:14:10 +0000
21@@ -1,1 +1,2 @@
22 lib/plymouth/themes/ubuntu-gnome-logo/
23+lib/plymouth/ubuntu-gnome_logo.png
24
25=== modified file 'debian/ubuntu-gnome-default-settings.gsettings-override'
26--- debian/ubuntu-gnome-default-settings.gsettings-override 2013-08-02 10:02:10 +0000
27+++ debian/ubuntu-gnome-default-settings.gsettings-override 2013-08-28 02:14:10 +0000
28@@ -59,7 +59,7 @@
29 active-plugins = ['docinfo', 'modelines', 'filebrowser', 'spell', 'time', 'zeitgeistplugin']
30
31 [org.gnome.login-screen]
32-logo='/lib/plymouth/ubuntu_logo.png'
33+logo='/lib/plymouth/ubuntu-gnome_logo.png'
34
35 [org.gnome.mutter.keybindings]
36 toggle-tiled-left = ['<Primary><Super>Left','<Super>Left']
37
38=== removed file 'lib/plymouth/themes/ubuntu-gnome-logo/background_1.png'
39Binary files lib/plymouth/themes/ubuntu-gnome-logo/background_1.png 2012-09-29 00:33:02 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/background_1.png 1970-01-01 00:00:00 +0000 differ
40=== removed file 'lib/plymouth/themes/ubuntu-gnome-logo/background_2.png'
41Binary files lib/plymouth/themes/ubuntu-gnome-logo/background_2.png 2012-09-29 00:33:02 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/background_2.png 1970-01-01 00:00:00 +0000 differ
42=== removed file 'lib/plymouth/themes/ubuntu-gnome-logo/background_3.png'
43Binary files lib/plymouth/themes/ubuntu-gnome-logo/background_3.png 2012-09-29 00:33:02 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/background_3.png 1970-01-01 00:00:00 +0000 differ
44=== added file 'lib/plymouth/themes/ubuntu-gnome-logo/noise-texture.png'
45Binary files lib/plymouth/themes/ubuntu-gnome-logo/noise-texture.png 1970-01-01 00:00:00 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/noise-texture.png 2013-08-28 02:14:10 +0000 differ
46=== modified file 'lib/plymouth/themes/ubuntu-gnome-logo/password_field.png'
47Binary files lib/plymouth/themes/ubuntu-gnome-logo/password_field.png 2012-09-29 00:33:02 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/password_field.png 2013-08-28 02:14:10 +0000 differ
48=== modified file 'lib/plymouth/themes/ubuntu-gnome-logo/password_field16.png'
49Binary files lib/plymouth/themes/ubuntu-gnome-logo/password_field16.png 2012-09-29 00:33:02 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/password_field16.png 2013-08-28 02:14:10 +0000 differ
50=== modified file 'lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_off.png'
51Binary files lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_off.png 2012-10-04 07:44:18 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_off.png 2013-08-28 02:14:10 +0000 differ
52=== added file 'lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_off16.png'
53Binary files lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_off16.png 1970-01-01 00:00:00 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_off16.png 2013-08-28 02:14:10 +0000 differ
54=== added file 'lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_on.png'
55Binary files lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_on.png 1970-01-01 00:00:00 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_on.png 2013-08-28 02:14:10 +0000 differ
56=== added file 'lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_on16.png'
57Binary files lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_on16.png 1970-01-01 00:00:00 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/progress_dot_on16.png 2013-08-28 02:14:10 +0000 differ
58=== modified file 'lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.grub'
59--- lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.grub 2012-09-29 00:33:02 +0000
60+++ lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.grub 2013-08-28 02:14:10 +0000
61@@ -1,3 +1,3 @@
62-if background_color 13,37,73; then
63+if background_color 45,51,53; then
64 clear
65 fi
66
67=== modified file 'lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.script'
68--- lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.script 2012-10-04 07:44:18 +0000
69+++ lib/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.script 2013-08-28 02:14:10 +0000
70@@ -1,6 +1,6 @@
71-# ubuntu-logo.script - boot splash plugin
72+# ubuntu-gnome-logo.script - boot splash plugin
73 #
74-# Copyright (C) 2009 Canonical Ltd.
75+# Copyright (C) 2013 Canonical Ltd.
76 #
77 # This program is free software; you can redistribute it and/or modify
78 # it under the terms of the GNU General Public License as published by
79@@ -18,32 +18,35 @@
80 # 02111-1307, USA.
81 #
82 # Written by: Alberto Milone <alberto.milone@canonical.com>
83+# Adapted to Ubuntu GNOME by: Alfredo Hernández <aldomann.designs@gmail.com>
84 #
85 # Based on the example provided with the "script plugin" written by:
86 # Charlie Brej <cbrej@cs.man.ac.uk>
87-#
88+#
89+# Question stuff written by: Markus Waas <mail@markuswaas.de>
90+#
91
92-# Set the text colour in (rgb / 256)
93+# Set the text colour in (RGB / 256)
94 text_colour.red = 1.0;
95 text_colour.green = 1.0;
96 text_colour.blue = 1.0;
97
98-# Tinted text #e1e1e1
99-tinted_text_colour.red = 0.87;
100-tinted_text_colour.green = 0.87;
101-tinted_text_colour.blue = 0.87;
102+# Tinted text #133773
103+tinted_text_colour.red = 0.07;
104+tinted_text_colour.green = 0.22;
105+tinted_text_colour.blue = 0.45;
106
107-# Action Text - #ffffff - RGB 255 255 255
108+# Action Text - #ffffff
109 action_text_colour.red = 1.0;
110 action_text_colour.green = 1.0;
111 action_text_colour.blue = 1.0;
112
113-# Orange - #ff4012 - RGB 255 64 18
114+# Blue - #0087ed
115 debugsprite = Sprite();
116 debugsprite_bottom = Sprite();
117 debugsprite_medium = Sprite();
118
119-# are we currently prompting for a password?
120+# Are we currently prompting for a password?
121 prompt_active = 0;
122
123 # General purpose function to create text
124@@ -86,8 +89,8 @@
125 local.text_height;
126 local.min_height;
127
128- # Put the 1st line below the middle screen + some spacing
129- y = (Window.GetY () + Window.GetHeight () / 2) + 100;
130+ # Put the 1st line below the logo + some spacing
131+ y = logo.y + logo.height + (progress_indicator.bullet_height * 7 ); # + logo_spacing;
132
133 text_height = first_line_height * 7.5;
134
135@@ -95,6 +98,8 @@
136 if (y + text_height > min_height)
137 y = min_height - text_height;
138
139+ if (y < progress_indicator.y + progress_indicator.height)
140+ return progress_indicator.y + progress_indicator.height;
141 return y;
142 }
143
144@@ -155,54 +160,63 @@
145 return int;
146 }
147
148+
149+
150+#--------------------------------------Background functions --------------------------
151+noise.image = Image ("noise-texture.png");
152+
153+fun draw_bg () {
154+ noise.i = 0;
155+ noise.j = 0;
156+
157+ while (noise.j*256 < Window.GetHeight ()) {
158+ while (noise.i*256 < Window.GetWidth ()) {
159+ noise.sprite[noise.i][noise.j] = Sprite ();
160+ noise.sprite[noise.i][noise.j].SetImage (noise.image);
161+ noise.sprite[noise.i][noise.j].SetX (noise.i*256);
162+ noise.sprite[noise.i][noise.j].SetY (noise.j*256);
163+ noise.i++;
164+ }
165+ noise.i = 0;
166+ noise.j++;
167+ }
168+}
169+
170+Window.SetBackgroundTopColor (0.18, 0.20, 0.21); # Nice colour on top of the screen fading to
171+Window.SetBackgroundBottomColor (0.18, 0.20, 0.21); # an equally nice colour on the bottom
172+
173 #-----------------------------------------------------------------------------
174-# Background colour
175-# #133773 --> 0.07, 0.21, 0.44
176-#
177-Window.SetBackgroundTopColor (0.07, 0.21, 0.44);
178-Window.SetBackgroundBottomColor (0.07, 0.21, 0.44);
179-
180-# Load the Backgrounds
181-screen_width = Window.GetWidth();
182-screen_height = Window.GetHeight();
183-for (i = 1; i < 4; i++){
184- bg_images[i] = Image("background_" + i + ".png");
185- bg_resizes[i] = bg_images[i].Scale(screen_width, screen_height);
186- bg_sprites[i] = Sprite(bg_resizes[i]);
187- bg_sprites[i].SetPosition(Window.GetX(), Window.GetY(), -10000);
188- bg_sprites[i].SetOpacity(0);
189-}
190-
191-update_counter = 0;
192-
193-
194-fun animate_bg(progress){
195- speed = 8; #increase to slow down
196- if ((progress - global.fade_progress) >= (3.0*speed)) {
197- global.fade_progress = progress;
198- }
199- #DebugBottom("progress: " + progress + " " + (progress - global.fade_progress));
200-
201- tmp_progress = (progress - global.fade_progress)/speed;
202- if (tmp_progress <= 1.0) {
203- bg_sprites[1].SetOpacity((1-tmp_progress));
204- bg_sprites[2].SetOpacity(tmp_progress);
205- }
206- else
207- if (tmp_progress <= 2.0) {
208- fadeA = (tmp_progress-1);
209- bg_sprites[2].SetOpacity((1-fadeA));
210- bg_sprites[3].SetOpacity(fadeA);
211- }
212- else {
213- fadeB = (tmp_progress-2);
214- bg_sprites[3].SetOpacity((1-fadeB));
215- bg_sprites[1].SetOpacity(fadeB);
216- }
217-}
218-
219-progress_dot_off_filename = "progress_dot_off.png";
220-password_field_filename = "password_field.png";
221+bits_per_pixel = Window.GetBitsPerPixel ();
222+if (bits_per_pixel == 4) {
223+ logo_filename = "ubuntu_gnome_logo16.png";
224+ progress_dot_off_filename = "progress_dot_off16.png";
225+ progress_dot_on_filename = "progress_dot_on16.png";
226+ password_field_filename = "password_field16.png";
227+ question_field_filename = "password_field16.png";
228+} else {
229+ logo_filename = "ubuntu_gnome_logo.png";
230+ progress_dot_off_filename = "progress_dot_off.png";
231+ progress_dot_on_filename = "progress_dot_on.png";
232+ password_field_filename = "password_field.png";
233+ question_field_filename = "password_field.png";
234+}
235+
236+logo.image = Image (logo_filename);
237+logo.sprite = Sprite ();
238+logo.sprite.SetImage (logo.image);
239+logo.width = logo.image.GetWidth ();
240+logo.height = logo.image.GetHeight ();
241+logo.x = Window.GetX () + Window.GetWidth () / 2 - logo.width / 2;
242+logo.y = Window.GetY () + Window.GetHeight () / 2 - logo.height;
243+logo.z = 1000;
244+logo.sprite.SetX (logo.x);
245+logo.sprite.SetY (logo.y);
246+logo.sprite.SetZ (logo.z);
247+logo.sprite.SetOpacity (1);
248+draw_bg ();
249+
250+# Spacing below the logo - in pixels
251+logo_spacing = logo.height * 4;
252
253 message_notification[0].image = ImageToTintedText ("");
254 message_notification[1].image = ImageToTintedText ("");
255@@ -210,6 +224,16 @@
256
257 status = "normal";
258
259+progress_indicator.bullet_off = Image (progress_dot_off_filename);
260+progress_indicator.bullet_on = Image (progress_dot_on_filename);
261+progress_indicator.bullet_width = progress_indicator.bullet_off.GetWidth ();
262+progress_indicator.bullet_height = progress_indicator.bullet_off.GetHeight ();
263+progress_indicator.bullet_hspacing = progress_indicator.bullet_width * 1.35;
264+progress_indicator.width = progress_indicator.bullet_width * 3.6;
265+progress_indicator.height = progress_indicator.bullet_height;
266+progress_indicator.y = logo.y + logo.height + (logo.height / 3);
267+progress_indicator.x = Window.GetX () + Window.GetWidth () / 2 - progress_indicator.width / 2; # logo.x + 26;
268+
269 # use a fixed string with ascending and descending stems to calibrate the
270 # bounding box for the first message, so the messages below don't move up
271 # and down according to *their* height.
272@@ -220,22 +244,139 @@
273 # a bit if needed.
274 top_of_the_text = TextYOffset();
275
276+#-----------------------------------------Logo functions------------------------------
277+
278+# Call this when updating the screen
279+fun draw_logo () {
280+ logo.sprite.SetX (logo.x);
281+ logo.sprite.SetY (logo.y);
282+ logo.sprite.SetZ (logo.z);
283+ logo.sprite.SetOpacity (1);
284+}
285
286
287 #-----------------------------------------Progress Indicator--------------------------
288-
289+fun set_progress_indicator () {
290+
291+
292+ # Here we assume that we can store half bullets on each half of the screen
293+ # together with some spacing
294+ local.x = progress_indicator.x;
295+
296+ for (index = 0; index <= 2; index++) {
297+ # Set the "off" bullets
298+ progress_indicator.bullets_off[index].sprite = Sprite (progress_indicator.bullet_off);
299+ progress_indicator.bullets_off[index].sprite.SetPosition (local.x, progress_indicator.y, 1000);
300+ progress_indicator.bullets_off[index].x = local.x;
301+ progress_indicator.bullets_off[index].y = progress_indicator.y;
302+ progress_indicator.bullets_off[index].sprite.SetOpacity (1);
303+
304+ #local.debug_medium_string = "Progress indicator " + index + ": x = " + progress_indicator.bullets_off[index].x +
305+ # ", y = " + progress_indicator.bullets_off[index].y + ", logo width = " + logo.width +
306+ # ", logo height = " + logo.height + " " + screen_width + " " + screen_height;
307+ #
308+ #(index % 2) && DebugMedium (local.debug_medium_string) || DebugBottom (local.debug_medium_string);
309+
310+ # Set the "on" bullets on top of the "off" bullets and make them transparent
311+ progress_indicator.bullets_on[index].sprite = Sprite (progress_indicator.bullet_on);
312+ progress_indicator.bullets_on[index].x = progress_indicator.bullets_off[index].x;
313+ progress_indicator.bullets_on[index].y = progress_indicator.bullets_off[index].y;
314+ progress_indicator.bullets_on[index].sprite.SetPosition (progress_indicator.bullets_on[index].x, progress_indicator.bullets_on[index].y, 10000);
315+
316+ progress_indicator.bullets_on[index].sprite.SetOpacity (0);
317+
318+ local.x += progress_indicator.bullet_hspacing;
319+ }
320+ #local.debug_string = "Progress indicator: x1 = " + progress_indicator.x + ", x2 = " + local.x + ", y = " + progress_indicator.y +
321+ # ", x logo = " + logo.x + ", y logo = " + logo.y + ", indicator width = " + progress_indicator.width;
322+ #Debug(progress_indicator.bullets_off[0].x);
323+}
324+
325+
326+# We have 2 bullets, one on top of the other:
327+# The white one is on top of the red one and the former should
328+# slowly fade so as to get a nice transition effect.
329+fun switch_on_bullet (bullets_off, bullets_on, bullet_number, opacity) {
330+ local.x = bullets_on[bullet_number].x;
331+ local.y = bullets_on[bullet_number].y;
332+ local.z = bullets_on[bullet_number].z;
333+
334+ # Hide the bullets which are off
335+ bullets_off[bullet_number].sprite.SetOpacity (0);
336+
337+ # Show the bullets which are on
338+ bullets_on[bullet_number].sprite.SetPosition (local.x, local.y, local.z);
339+ bullets_on[bullet_number].sprite.SetOpacity (opacity);
340+
341+ # Bump the number of times we have switched on bullets
342+ global.times_bullets_switched++;
343+}
344+
345+fun switch_off_bullets () {
346+ # Debug("Switching off progress indicator");
347+
348+ set_progress_indicator ();
349+ global.times_bullets_switched = 0;
350+ global.on_off = 1;
351+}
352+
353+# This is something that we can call when we exit
354+fun switch_on_bullets () {
355+ # Debug("Switching off progress indicator");
356+ if (!global.progress_indicator.bullets_on) set_progress_indicator ();
357+ local = global.progress_indicator;
358+
359+ for (index = 0; bullets_on[index]; index++) {
360+ switch_on_bullet (bullets_off, bullets_on, index, 1.0);
361+ }
362+}
363
364
365 # Implement in boot progress callback
366 fun animate_progress_indicator (progress, time) {
367- if (global.fade_progress == NULL) {
368- global.fade_progress = progress;
369- }
370- global.update_counter++; # we probably don't need to animate at 50fps, slow it down a bit
371- if (!(global.update_counter % 3)){
372- global.update_counter = 0;
373- animate_bg(progress);
374- }
375+ if (global.progress_time == NULL) {
376+ global.progress_time = progress; #time;
377+ switch_off_bullets ();
378+ }
379+
380+# Debug ("progress = " + progress + ", time = " + time + " times switched = " + global.times_bullets_switched + " on_off " + global.on_off);
381+
382+# if (global.times_bullets_switched == NULL)
383+# global.times_bullets_switched = 3;
384+
385+# if (global.on_off == NULL)
386+# global.on_off = 0;
387+
388+ if ((progress - global.progress_time) >= 1.0) {
389+ global.progress_time = progress;
390+
391+ if (global.times_bullets_switched == 3) {
392+ # Change which bullets are switched on
393+ # and which ones are switched off
394+ global.on_off = !global.on_off;
395+ global.times_bullets_switched = 0;
396+ }
397+
398+ if (global.on_off) {
399+ switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on,
400+ global.times_bullets_switched, 1.0);
401+ }
402+ else {
403+ switch_on_bullet (progress_indicator.bullets_on, progress_indicator.bullets_off,
404+ global.times_bullets_switched, 1.0);
405+ }
406+ }
407+
408+
409+ # Start setting bullets to "on" with translucency
410+# for (index = 0; index <= 5; index++) {
411+# opacity = 0.0;
412+# while (opacity <= 1.0) {
413+# switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on,
414+# index, opacity);
415+# opacity += 0.1;
416+# }
417+# }
418 }
419
420
421@@ -451,29 +592,29 @@
422 password_dialogue.entry.image.GetHeight () / 2 -
423 password_dialogue.bullet_image.GetHeight () / 2;
424 margin = bullet_width;
425- spaces = Math.Int( (password_dialogue.entry.image.GetWidth () - (margin * 2)) / (bullet_width / 2 ) );
426+ spaces = Math.Int( (password_dialogue.entry.image.GetWidth () - (margin * 2) ) / ( 2 * bullet_width / 3 ) );
427 #Debug ("spaces = " + spaces + ", bullets = " + bullets);
428- bullets_area.width = margin + spaces * (bullet_width / 2);
429+ bullets_area.width = margin + spaces * ( 2 * bullet_width / 3);
430 bullets_area.x = Window.GetX () + Window.GetWidth () / 2 - bullets_area.width / 2;
431 #DebugBottom ("pwd_entry x = " + password_dialogue.entry.x + ", bullets_area.x = " + bullets_area.x + ", bullets_area.width = " + bullets_area.width);
432 if (bullets > spaces)
433 bullets = spaces;
434- for (index = 0; password_dialogue.bullets[index] || index < bullets; index++){
435+ for (index = 0; password_dialogue.bullets[index] || index < spaces ; index++){
436 if (!password_dialogue.bullets[index]) {
437 password_dialogue.bullets[index].sprite = Sprite ();
438 password_dialogue.bullets[index].sprite.SetImage (password_dialogue.bullet_image);
439 password_dialogue.bullets[index].x = bullets_area.x + # password_dialogue.entry.x + margin +
440- index * bullet_width / 2;
441+ index * ( 2 * bullet_width / 3 ) ;
442 password_dialogue.bullets[index].sprite.SetX (password_dialogue.bullets[index].x);
443 password_dialogue.bullets[index].y = bullet_y;
444 password_dialogue.bullets[index].sprite.SetY (password_dialogue.bullets[index].y);
445- password_dialogue.bullets[index].z = password_dialogue.entry.z + 1;
446+ password_dialogue.bullets[index].z = password_dialogue.entry.z + 100 - index;
447 password_dialogue.bullets[index].sprite.SetZ (password_dialogue.bullets[index].z);
448 }
449
450 password_dialogue.bullets[index].sprite.SetOpacity (0);
451
452- if (index < bullets) {
453+ if (index < bullets ) {
454 password_dialogue.bullets[index].sprite.SetOpacity (1);
455 }
456 }
457@@ -879,17 +1020,77 @@
458 Plymouth.SetUpdateStatusFunction (update_status_callback);
459
460 #-----------------------------------------Display Question stuff -----------------------
461-#
462-# TODO: Implement this if needed
463-#
464+
465+fun question_dialogue_setup (message_label, text_image) {
466+ #Debug("Question dialog setup");
467+
468+ local.field;
469+ local.content;
470+ local.margin;
471+
472+ field.image = Image (question_field_filename);
473+ content = Sprite ();
474+ bullet_image = Image (progress_dot_off_filename);
475+ margin = bullet_image.GetWidth() / 2;
476+
477+ # Hide the normal labels
478+ prompt_active = 1;
479+ if (message_notification[1].sprite) hide_message (1);
480+
481+ # Set the prompt label
482+ label = get_message_label(message_label, 0, 1);
483+ label.z = 10000;
484+
485+ setup_message (message_label, label.x, label.y, label.z, 2);
486+ show_message (2);
487+
488+ # Set up the text field which contains the contents
489+ field.sprite = Sprite ();
490+ field.sprite.SetImage (field.image);
491+
492+ # Centre the box horizontally
493+ field.x = Window.GetX () + Window.GetWidth () / 2 - field.image.GetWidth () / 2;
494+ content_x = field.x + margin;
495+
496+ # Put the field below the second label.
497+ field.y = message_notification[2].y + label.height;
498+ content_y = field.y + field.image.GetHeight () / 2 - text_image.GetHeight () / 2;
499+
500+ #Debug ("field x = " + field.x + ", y = " + field.y);
501+ field.z = 10000;
502+ field.sprite.SetX (field.x);
503+ field.sprite.SetY (field.y);
504+ field.sprite.SetZ (field.z);
505+
506+ #Debug ("content_x = " + content_x + " content_y = " + content_y);
507+ content_z = field.z + 1;
508+ content.SetPosition (content_x, content_y, content_z);
509+
510+ global.question_dialogue = local;
511+}
512+
513 # The callback function is called when the display should display a question dialogue.
514-# First arg is prompt string, the second is the entry contents.
515-#fun display_question_callback (prompt_string, entry_contents)
516-#{
517-# time++;
518-#}
519-#
520-#Plymouth.SetDisplayQuestionFunction (display_question_callback);
521+# First arg is prompt string, the second is the field contents.
522+fun display_question_callback (prompt, contents) {
523+ global.status = "question";
524+ #Debug ("Reply: " + contents);
525+
526+ textImage = ImageToText(contents);
527+ if (!global.question_dialogue) {
528+ question_dialogue_setup(prompt, textImage);
529+ }
530+
531+ margin = global.question_dialogue.margin;
532+ fieldWidth = global.question_dialogue.field.image.GetWidth ();
533+ for (i = 0; ( (textImage.GetWidth () + 2 * margin ) > fieldWidth ); i++) {
534+ textImage = ImageToText(StringCopy (contents, i, StringLength (contents)));
535+ }
536+
537+ global.question_dialogue.content.SetImage (textImage);
538+}
539+
540+
541+Plymouth.SetDisplayQuestionFunction (display_question_callback);
542
543 #-----------------------------------------Refresh stuff --------------------------------
544 #
545@@ -901,7 +1102,7 @@
546 #
547 fun refresh_callback ()
548 {
549- # nothing to do
550+ draw_logo ();
551 }
552 Plymouth.SetRefreshFunction (refresh_callback);
553
554@@ -918,9 +1119,14 @@
555 if (message_notification[2].sprite) hide_message(2);
556 prompt_active = 0;
557 }
558-
559- if (message_notification[1].sprite) show_message (1);
560-
561+ if (global.question_dialogue) {
562+ question_dialogue_opacity (0);
563+ global.question_dialogue = NULL;
564+ if (message_notification[2].sprite) hide_message(2);
565+ prompt_active = 0;
566+ }
567+
568+ if (message_notification[1].sprite) show_message (1);
569
570 }
571
572@@ -930,9 +1136,10 @@
573 #----------------------------------------- Quit --------------------------------
574
575 # TODO: Maybe we should also hide any other dialog
576-# Make the progress indicator look full when on exit
577+# Show the logo and make the progress indicator look full when on exit
578 fun quit_callback ()
579 {
580+ logo.sprite.SetOpacity (1);
581 switch_on_bullets ();
582 }
583
584
585=== added file 'lib/plymouth/themes/ubuntu-gnome-logo/ubuntu_gnome_logo.png'
586Binary files lib/plymouth/themes/ubuntu-gnome-logo/ubuntu_gnome_logo.png 1970-01-01 00:00:00 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/ubuntu_gnome_logo.png 2013-08-28 02:14:10 +0000 differ
587=== added file 'lib/plymouth/themes/ubuntu-gnome-logo/ubuntu_gnome_logo16.png'
588Binary files lib/plymouth/themes/ubuntu-gnome-logo/ubuntu_gnome_logo16.png 1970-01-01 00:00:00 +0000 and lib/plymouth/themes/ubuntu-gnome-logo/ubuntu_gnome_logo16.png 2013-08-28 02:14:10 +0000 differ
589=== modified file 'lib/plymouth/themes/ubuntu-gnome-text/ubuntu-gnome-text.plymouth.in'
590--- lib/plymouth/themes/ubuntu-gnome-text/ubuntu-gnome-text.plymouth.in 2013-07-21 18:57:54 +0000
591+++ lib/plymouth/themes/ubuntu-gnome-text/ubuntu-gnome-text.plymouth.in 2013-08-28 02:14:10 +0000
592@@ -1,11 +1,11 @@
593 [Plymouth Theme]
594 Name=Ubuntu GNOME Text
595-Description=Text mode theme based on ubuntu-logo theme
596+Description=Text mode theme based on ubuntu-gnome-logo theme
597 ModuleName=ubuntu-text
598
599 [ubuntu-text]
600 title=Ubuntu GNOME
601-black=0x133773
602+black=0x2d3335
603 white=0xffffff
604-brown=0x717a99
605-blue=0x191e29
606+brown=0x0087ed
607+blue=0x133773
608
609=== added file 'lib/plymouth/ubuntu-gnome_logo.png'
610Binary files lib/plymouth/ubuntu-gnome_logo.png 1970-01-01 00:00:00 +0000 and lib/plymouth/ubuntu-gnome_logo.png 2013-08-28 02:14:10 +0000 differ

Subscribers

People subscribed via source and target branches

to all changes: