diff options
Diffstat (limited to 'zarb-ml/mageia-sysadm/attachments/20110211/248c00f1/attachment-0001.html')
-rw-r--r-- | zarb-ml/mageia-sysadm/attachments/20110211/248c00f1/attachment-0001.html | 631 |
1 files changed, 631 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/attachments/20110211/248c00f1/attachment-0001.html b/zarb-ml/mageia-sysadm/attachments/20110211/248c00f1/attachment-0001.html new file mode 100644 index 000000000..bc154eb40 --- /dev/null +++ b/zarb-ml/mageia-sysadm/attachments/20110211/248c00f1/attachment-0001.html @@ -0,0 +1,631 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" +"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>[518] rename theme script and path</title> +</head> +<body> + +<style type="text/css"><!-- +#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; } +#msg dl.meta dt { float: left; width: 6em; font-weight: bold; } +#msg dt:after { content:':';} +#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; } +#msg dl a { font-weight: bold} +#msg dl a:link { color:#fc3; } +#msg dl a:active { color:#ff0; } +#msg dl a:visited { color:#cc6; } +h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; } +#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; } +#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; } +#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; } +#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; } +#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; } +#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; } +#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; } +#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; } +#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; } +#logmsg pre { background: #eee; padding: 1em; } +#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;} +#logmsg dl { margin: 0; } +#logmsg dt { font-weight: bold; } +#logmsg dd { margin: 0; padding: 0 0 0.5em 0; } +#logmsg dd:before { content:'\00bb';} +#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; } +#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; } +#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; } +#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; } +#logmsg table th.Corner { text-align: left; } +#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; } +#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; } +#patch { width: 100%; } +--></style> +<div id="msg"> +<dl class="meta"> +<dt>Revision</dt> <dd>518</dd> +<dt>Author</dt> <dd>rda</dd> +<dt>Date</dt> <dd>2011-02-11 13:26:16 +0100 (Fri, 11 Feb 2011)</dd> +</dl> + +<h3>Log Message</h3> +<pre>rename theme script and path</pre> + +<h3>Modified Paths</h3> +<ul> +<li><a href="#thememageiathemetrunkMageiaDefaultplymouthMageiaplymouth">theme/mageia-theme/trunk/Mageia-Default/plymouth/Mageia.plymouth</a></li> +</ul> + +<h3>Added Paths</h3> +<ul> +<li><a href="#thememageiathemetrunkcommonplymouthmgascript">theme/mageia-theme/trunk/common/plymouth/mga.script</a></li> +</ul> + +<h3>Removed Paths</h3> +<ul> +<li><a href="#thememageiathemetrunkcommonplymouthmdvscript">theme/mageia-theme/trunk/common/plymouth/mdv.script</a></li> +</ul> + +</div> +<div id="patch"><pre> +<a id="thememageiathemetrunkMageiaDefaultplymouthMageiaplymouth">Modified: theme/mageia-theme/trunk/Mageia-Default/plymouth/Mageia.plymouth</a> +=================================================================== +--- theme/mageia-theme/trunk/Mageia-Default/plymouth/Mageia.plymouth 2011-02-11 12:23:47 UTC (rev 517) ++++ theme/mageia-theme/trunk/Mageia-Default/plymouth/Mageia.plymouth 2011-02-11 12:26:16 UTC (rev 518) +@@ -1,8 +1,8 @@ + [Plymouth Theme] +-Name=Mandriva Free theme +-Description=Mandriva Free theme ++Name=Mageia theme ++Description=Mageia theme + ModuleName=script + + [script] +-ImageDir=/usr/share/plymouth/themes/Mandriva-Free +-ScriptFile=/usr/share/plymouth/themes/Mandriva-Free/mdv.script ++ImageDir=/usr/share/plymouth/themes/Mageia ++ScriptFile=/usr/share/plymouth/themes/Mageia/mga.script + +<a id="thememageiathemetrunkcommonplymouthmdvscript">Deleted: theme/mageia-theme/trunk/common/plymouth/mdv.script</a> +=================================================================== +--- theme/mageia-theme/trunk/common/plymouth/mdv.script 2011-02-11 12:23:47 UTC (rev 517) ++++ theme/mageia-theme/trunk/common/plymouth/mdv.script 2011-02-11 12:26:16 UTC (rev 518) +@@ -1,277 +0,0 @@ +-# Mdv splashy like theme +- +-Window.GetMaxWidth = fun (){ +- i = 0; +- width = 0; +- while (Window.GetWidth(i)){ +- width = Math.Max(width, Window.GetWidth(i)); +- i++; +- } +- return width; +-}; +- +-Window.GetMaxHeight = fun (){ +- i = 0; +- height = 0; +- while (Window.GetHeight(i)){ +- height = Math.Max(height, Window.GetHeight(i)); +- i++; +- } +- return height; +-}; +- +-anim.imagecount = 32; +-anim.target_width = 0.5* 0.46 * Window.GetWidth(); +-anim.target_height = 0.5* 0.11 * Window.GetWidth(); +- +-fun RotatedImage (index){ +- index = Math.Int(index); +- if (!RotatedImageCache[index]) +- RotatedImageCache[index] = anim.original_image.Rotate((Math.Pi*2*index)/anim.imagecount).Scale(anim.target_width, anim.target_height); +- +- return RotatedImageCache[index]; +- } +- +- +-if (Plymouth.GetMode() == "suspend" || Plymouth.GetMode() == "resume") { +- background.original_image = ImageNew("suspend.png"); +- Window.SetBackgroundTopColor(1, 0, 0); +- Window.SetBackgroundBottomColor(0, 1, 0); +-} +-else { +- logo.original_image = ImageNew("logo_mageia.png"); +- background.original_image = ImageNew("background.png"); +- Window.SetBackgroundTopColor(0.234, 0.43, 0.705); +- Window.SetBackgroundBottomColor(0.16, 0.25, 0.44); +- +- anim.image= ImageNew("animation.png"); +- anim.original_image= anim.image.Scale(anim.target_width, anim.target_width); +- +- anim.sprite = SpriteNew(); +- anim.sprite.SetImage(RotatedImage (0)); +- anim.sprite.SetX((Window.GetX() + Window.GetWidth() - RotatedImage(0).GetWidth()) / 2); +- anim.sprite.SetY(Window.GetY() + Window.GetHeight() * 0.82); +- anim.angle = 0; +- anim.index = 0; +- +- motif.original_image = ImageNew("motif.png"); +- motif.image = motif.original_image.Scale(motif.original_image.GetWidth() * Window.GetMaxWidth() / background.original_image.GetWidth(), motif.original_image.GetHeight() * Window.GetMaxHeight() / background.original_image.GetHeight()); +- motif.sprite = SpriteNew(); +- motif.sprite.SetImage(motif.image); +- motif.sprite.SetOpacity(0); +- motif.sprite.SetY((Window.GetMaxHeight() - motif.image.GetHeight()) / 2); +- if (Plymouth.GetMode() == "shutdown") { +- motif.opacity = 1; +- } +- else { +- motif.opacity = 0; +- } +-} +- +-ratio = logo.original_image.GetWidth() / logo.original_image.GetHeight(); +-reduction = 0.4; +-logo.image = logo.original_image.Scale(reduction * Window.GetMaxWidth() , reduction / ratio * Window.GetMaxWidth()); +-logo.sprite = SpriteNew(); +-logo.sprite.SetImage(logo.image); +-logo.opacity_angle = 0; +-logo.sprite.SetX((Window.GetX() + Window.GetMaxWidth() - logo.image.GetWidth()) / 2); +-logo.sprite.SetY(Window.GetY() + 50); +- +-background.image = background.original_image.Scale(Window.GetMaxWidth() , Window.GetMaxHeight()); +-background.sprite = SpriteNew(); +-background.sprite.SetImage(background.image); +-background.sprite.SetPosition(Window.GetX(), Window.GetY(), -10); +- +-sprite_prompt = SpriteNew(); +- +-fun refresh_callback () +- { +- if (status == "normal") +- { +- anim.index += 1; +- anim.index %= anim.imagecount; +- anim.sprite.SetImage(RotatedImage (anim.index)); +- #anim.sprite.SetOpacity (1); +- motif.sprite.SetOpacity(motif.opacity); +- } +- else +- { +- anim.sprite.SetOpacity(0); +- motif.sprite.SetOpacity(0); +- } +- +- } +- +-if (Plymouth.GetMode() != "suspend" && Plymouth.GetMode() != "resume") { +- Plymouth.SetRefreshFunction (refresh_callback); +-} +- +-#----------------------------------------- Dialog -------------------------------- +- +-status = "normal"; +- +-fun dialog_setup() +- { +- local.box; +- local.lock; +- local.entry; +- local.prompt_sprite; +- +- box.image = ImageNew("box.png"); +- lock.image = ImageNew("lock.png"); +- entry.image = ImageNew("entry.png"); +- +- box.sprite = SpriteNew(); +- box.sprite.SetImage(box.image); +- box.x = Window.GetX() + Window.GetWidth() / 2 - box.image.GetWidth()/2; +- box.y = Window.GetY() + Window.GetHeight() / 2 - box.image.GetHeight()/2; +- box.z = 10000; +- box.sprite.SetPosition(box.x, box.y, box.z); +- +- lock.sprite = SpriteNew(); +- lock.sprite.SetImage(lock.image); +- lock.x = box.x + box.image.GetWidth()/2 - (lock.image.GetWidth() + entry.image.GetWidth()) / 2; +- lock.y = box.y + box.image.GetHeight()/2 - lock.image.GetHeight()/2; +- lock.z = box.z + 1; +- lock.sprite.SetPosition(lock.x, lock.y, lock.z); +- +- entry.sprite = SpriteNew(); +- entry.sprite.SetImage(entry.image); +- entry.x = lock.x + lock.image.GetWidth(); +- entry.y = box.y + box.image.GetHeight()/2 - entry.image.GetHeight()/2; +- entry.z = box.z + 1; +- entry.sprite.SetPosition(entry.x, entry.y, entry.z); +- +- prompt_sprite = SpriteNew(); +- prompt_sprite.SetPosition(box.x, box.y - 20, box.z); +- +- global.dialog.box = box; +- global.dialog.lock = lock; +- global.dialog.entry = entry; +- global.dialog.bullet_image = ImageNew("bullet.png"); +- global.dialog.prompt_sprite = prompt_sprite; +- dialog_opacity (1); +- } +- +-fun dialog_opacity(opacity) +- { +- dialog.box.sprite.SetOpacity(opacity); +- dialog.lock.sprite.SetOpacity(opacity); +- dialog.entry.sprite.SetOpacity(opacity); +- dialog.prompt_sprite.SetOpacity(opacity); +- for (index = 0; dialog.bullet[index]; index++) +- { +- dialog.bullet[index].sprite.SetOpacity(opacity); +- } +- } +- +-fun display_normal_callback () +- { +- global.status = "normal"; +- if (global.dialog) +- dialog_opacity (0); +- } +- +-fun display_password_callback (prompt, bullets) +- { +- global.status = "password"; +- if (!global.dialog) +- dialog_setup(); +- else +- dialog_opacity(1); +- motif.sprite.SetOpacity(0); +- anim.sprite.SetOpacity(0); +- +- dialog.prompt_sprite.SetImage(Image.Text(prompt, 1.0, 1.0, 1.0)); +- for (index = 0; dialog.bullet[index] || index < bullets; index++) +- { +- +- if (!dialog.bullet[index]) +- { +- dialog.bullet[index].sprite = SpriteNew(); +- dialog.bullet[index].sprite.SetImage(dialog.bullet_image); +- dialog.bullet[index].x = dialog.entry.x + index * dialog.bullet_image.GetWidth(); +- dialog.bullet[index].y = dialog.entry.y + dialog.entry.image.GetHeight() / 2 - dialog.bullet_image.GetHeight() / 2; +- dialog.bullet[index].z = dialog.entry.z + 1; +- dialog.bullet[index].sprite.SetPosition(dialog.bullet[index].x, dialog.bullet[index].y, dialog.bullet[index].z); +- } +- if (index < bullets) +- dialog.bullet[index].sprite.SetOpacity(1); +- else +- dialog.bullet[index].sprite.SetOpacity(0); +- } +- } +- +-fun display_message_callback (prompt) +- { +- +-prompt = Image.Text(prompt,1.0, 1.0, 1.0); +-sprite_prompt.SetImage(prompt); +-sprite_prompt.SetPosition(Window.GetX() + (Window.GetWidth() - prompt.GetWidth()) / 2, Window.GetY() + Window.GetHeight() * 0.93, 2); +- } +- +-/* instantiate dialog at startup, to ensure all icons are loaded in memory before initrd is unmounted, in case /usr isn't mounted yet */ +-dialog_setup(); dialog_opacity(0); +-Plymouth.SetDisplayNormalFunction(display_normal_callback); +-Plymouth.SetDisplayPasswordFunction(display_password_callback); +-Plymouth.SetMessageFunction(display_message_callback); +- +-#----------------------------------------- Progress Bar -------------------------------- +- +-if (Plymouth.GetMode() == "suspend" || Plymouth.GetMode() == "resume") { +- progress_box.original_image = ImageNew("progress_box_background.png"); +- progress_box.image = progress_box.original_image.Scale(Window.GetMaxWidth() * 0.44, progress_box.original_image.GetHeight()); +- progress_box.edge = ImageNew("progress_box_edge.png"); +- progress_box.left_edge_sprite = SpriteNew(); +- progress_box.right_edge_sprite = SpriteNew(); +- progress_box.sprite = SpriteNew(); +- progress_box.sprite.SetImage(progress_box.image); +- progress_box.left_edge_sprite.SetImage(progress_box.edge); +- progress_box.right_edge_sprite.SetImage(progress_box.edge); +- +- progress_box.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2; +- progress_box.y = Window.GetY() + Window.GetHeight() * 0.86 - progress_box.image.GetHeight() / 2; +- +- progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0); +- progress_box.left_edge_sprite.SetPosition(progress_box.x-1, progress_box.y, 0); +- progress_box.right_edge_sprite.SetPosition(progress_box.x + progress_box.image.GetWidth() , progress_box.y, 0); +- +- progress_bar.original_image = ImageNew("progress_bar.png"); +- progress_bar.sprite = SpriteNew(); +- +- progress_bar.sprite.SetPosition(progress_box.x + 1, progress_box.y + 2, 1); +-} +- +-fun progress_callback (duration, progress) +- { +-if (Plymouth.GetMode() == "suspend" || Plymouth.GetMode() == "resume") { +- new_width = (progress_box.image.GetWidth() - 2) * progress; +- if (progress_bar.image.GetWidth() != Math.Int (new_width)) +- { +- progress_bar.image = progress_bar.original_image.Scale(new_width, progress_bar.original_image.GetHeight()); +- progress_bar.sprite.SetImage(progress_bar.image); +- } +- } +- +- if (Plymouth.GetMode() == "shutdown") { +- motif.opacity = 1 - progress; +- } +- else { +- motif.opacity = progress; +- } +- } +- +-Plymouth.SetBootProgressFunction(progress_callback); +- +-#----------------------------------------- Quit -------------------------------- +- +-fun quit_callback () +-{ +- anim.sprite.SetOpacity (0); +- if (Plymouth.GetMode() == "shutdown") { +- motif.sprite.SetOpacity(0); +- } +-} +- +-Plymouth.SetQuitFunction(quit_callback); +- + +<a id="thememageiathemetrunkcommonplymouthmgascriptfromrev512thememageiathemetrunkcommonplymouthmdvscript">Copied: theme/mageia-theme/trunk/common/plymouth/mga.script (from rev 512, theme/mageia-theme/trunk/common/plymouth/mdv.script)</a> +=================================================================== +--- theme/mageia-theme/trunk/common/plymouth/mga.script (rev 0) ++++ theme/mageia-theme/trunk/common/plymouth/mga.script 2011-02-11 12:26:16 UTC (rev 518) +@@ -0,0 +1,277 @@ ++# Mdv splashy like theme ++ ++Window.GetMaxWidth = fun (){ ++ i = 0; ++ width = 0; ++ while (Window.GetWidth(i)){ ++ width = Math.Max(width, Window.GetWidth(i)); ++ i++; ++ } ++ return width; ++}; ++ ++Window.GetMaxHeight = fun (){ ++ i = 0; ++ height = 0; ++ while (Window.GetHeight(i)){ ++ height = Math.Max(height, Window.GetHeight(i)); ++ i++; ++ } ++ return height; ++}; ++ ++anim.imagecount = 32; ++anim.target_width = 0.5* 0.46 * Window.GetWidth(); ++anim.target_height = 0.5* 0.11 * Window.GetWidth(); ++ ++fun RotatedImage (index){ ++ index = Math.Int(index); ++ if (!RotatedImageCache[index]) ++ RotatedImageCache[index] = anim.original_image.Rotate((Math.Pi*2*index)/anim.imagecount).Scale(anim.target_width, anim.target_height); ++ ++ return RotatedImageCache[index]; ++ } ++ ++ ++if (Plymouth.GetMode() == "suspend" || Plymouth.GetMode() == "resume") { ++ background.original_image = ImageNew("suspend.png"); ++ Window.SetBackgroundTopColor(1, 0, 0); ++ Window.SetBackgroundBottomColor(0, 1, 0); ++} ++else { ++ logo.original_image = ImageNew("logo_mageia.png"); ++ background.original_image = ImageNew("background.png"); ++ Window.SetBackgroundTopColor(0.234, 0.43, 0.705); ++ Window.SetBackgroundBottomColor(0.16, 0.25, 0.44); ++ ++ anim.image= ImageNew("animation.png"); ++ anim.original_image= anim.image.Scale(anim.target_width, anim.target_width); ++ ++ anim.sprite = SpriteNew(); ++ anim.sprite.SetImage(RotatedImage (0)); ++ anim.sprite.SetX((Window.GetX() + Window.GetWidth() - RotatedImage(0).GetWidth()) / 2); ++ anim.sprite.SetY(Window.GetY() + Window.GetHeight() * 0.82); ++ anim.angle = 0; ++ anim.index = 0; ++ ++ motif.original_image = ImageNew("motif.png"); ++ motif.image = motif.original_image.Scale(motif.original_image.GetWidth() * Window.GetMaxWidth() / background.original_image.GetWidth(), motif.original_image.GetHeight() * Window.GetMaxHeight() / background.original_image.GetHeight()); ++ motif.sprite = SpriteNew(); ++ motif.sprite.SetImage(motif.image); ++ motif.sprite.SetOpacity(0); ++ motif.sprite.SetY((Window.GetMaxHeight() - motif.image.GetHeight()) / 2); ++ if (Plymouth.GetMode() == "shutdown") { ++ motif.opacity = 1; ++ } ++ else { ++ motif.opacity = 0; ++ } ++} ++ ++ratio = logo.original_image.GetWidth() / logo.original_image.GetHeight(); ++reduction = 0.4; ++logo.image = logo.original_image.Scale(reduction * Window.GetMaxWidth() , reduction / ratio * Window.GetMaxWidth()); ++logo.sprite = SpriteNew(); ++logo.sprite.SetImage(logo.image); ++logo.opacity_angle = 0; ++logo.sprite.SetX((Window.GetX() + Window.GetMaxWidth() - logo.image.GetWidth()) / 2); ++logo.sprite.SetY(Window.GetY() + 50); ++ ++background.image = background.original_image.Scale(Window.GetMaxWidth() , Window.GetMaxHeight()); ++background.sprite = SpriteNew(); ++background.sprite.SetImage(background.image); ++background.sprite.SetPosition(Window.GetX(), Window.GetY(), -10); ++ ++sprite_prompt = SpriteNew(); ++ ++fun refresh_callback () ++ { ++ if (status == "normal") ++ { ++ anim.index += 1; ++ anim.index %= anim.imagecount; ++ anim.sprite.SetImage(RotatedImage (anim.index)); ++ #anim.sprite.SetOpacity (1); ++ motif.sprite.SetOpacity(motif.opacity); ++ } ++ else ++ { ++ anim.sprite.SetOpacity(0); ++ motif.sprite.SetOpacity(0); ++ } ++ ++ } ++ ++if (Plymouth.GetMode() != "suspend" && Plymouth.GetMode() != "resume") { ++ Plymouth.SetRefreshFunction (refresh_callback); ++} ++ ++#----------------------------------------- Dialog -------------------------------- ++ ++status = "normal"; ++ ++fun dialog_setup() ++ { ++ local.box; ++ local.lock; ++ local.entry; ++ local.prompt_sprite; ++ ++ box.image = ImageNew("box.png"); ++ lock.image = ImageNew("lock.png"); ++ entry.image = ImageNew("entry.png"); ++ ++ box.sprite = SpriteNew(); ++ box.sprite.SetImage(box.image); ++ box.x = Window.GetX() + Window.GetWidth() / 2 - box.image.GetWidth()/2; ++ box.y = Window.GetY() + Window.GetHeight() / 2 - box.image.GetHeight()/2; ++ box.z = 10000; ++ box.sprite.SetPosition(box.x, box.y, box.z); ++ ++ lock.sprite = SpriteNew(); ++ lock.sprite.SetImage(lock.image); ++ lock.x = box.x + box.image.GetWidth()/2 - (lock.image.GetWidth() + entry.image.GetWidth()) / 2; ++ lock.y = box.y + box.image.GetHeight()/2 - lock.image.GetHeight()/2; ++ lock.z = box.z + 1; ++ lock.sprite.SetPosition(lock.x, lock.y, lock.z); ++ ++ entry.sprite = SpriteNew(); ++ entry.sprite.SetImage(entry.image); ++ entry.x = lock.x + lock.image.GetWidth(); ++ entry.y = box.y + box.image.GetHeight()/2 - entry.image.GetHeight()/2; ++ entry.z = box.z + 1; ++ entry.sprite.SetPosition(entry.x, entry.y, entry.z); ++ ++ prompt_sprite = SpriteNew(); ++ prompt_sprite.SetPosition(box.x, box.y - 20, box.z); ++ ++ global.dialog.box = box; ++ global.dialog.lock = lock; ++ global.dialog.entry = entry; ++ global.dialog.bullet_image = ImageNew("bullet.png"); ++ global.dialog.prompt_sprite = prompt_sprite; ++ dialog_opacity (1); ++ } ++ ++fun dialog_opacity(opacity) ++ { ++ dialog.box.sprite.SetOpacity(opacity); ++ dialog.lock.sprite.SetOpacity(opacity); ++ dialog.entry.sprite.SetOpacity(opacity); ++ dialog.prompt_sprite.SetOpacity(opacity); ++ for (index = 0; dialog.bullet[index]; index++) ++ { ++ dialog.bullet[index].sprite.SetOpacity(opacity); ++ } ++ } ++ ++fun display_normal_callback () ++ { ++ global.status = "normal"; ++ if (global.dialog) ++ dialog_opacity (0); ++ } ++ ++fun display_password_callback (prompt, bullets) ++ { ++ global.status = "password"; ++ if (!global.dialog) ++ dialog_setup(); ++ else ++ dialog_opacity(1); ++ motif.sprite.SetOpacity(0); ++ anim.sprite.SetOpacity(0); ++ ++ dialog.prompt_sprite.SetImage(Image.Text(prompt, 1.0, 1.0, 1.0)); ++ for (index = 0; dialog.bullet[index] || index < bullets; index++) ++ { ++ ++ if (!dialog.bullet[index]) ++ { ++ dialog.bullet[index].sprite = SpriteNew(); ++ dialog.bullet[index].sprite.SetImage(dialog.bullet_image); ++ dialog.bullet[index].x = dialog.entry.x + index * dialog.bullet_image.GetWidth(); ++ dialog.bullet[index].y = dialog.entry.y + dialog.entry.image.GetHeight() / 2 - dialog.bullet_image.GetHeight() / 2; ++ dialog.bullet[index].z = dialog.entry.z + 1; ++ dialog.bullet[index].sprite.SetPosition(dialog.bullet[index].x, dialog.bullet[index].y, dialog.bullet[index].z); ++ } ++ if (index < bullets) ++ dialog.bullet[index].sprite.SetOpacity(1); ++ else ++ dialog.bullet[index].sprite.SetOpacity(0); ++ } ++ } ++ ++fun display_message_callback (prompt) ++ { ++ ++prompt = Image.Text(prompt,1.0, 1.0, 1.0); ++sprite_prompt.SetImage(prompt); ++sprite_prompt.SetPosition(Window.GetX() + (Window.GetWidth() - prompt.GetWidth()) / 2, Window.GetY() + Window.GetHeight() * 0.93, 2); ++ } ++ ++/* instantiate dialog at startup, to ensure all icons are loaded in memory before initrd is unmounted, in case /usr isn't mounted yet */ ++dialog_setup(); dialog_opacity(0); ++Plymouth.SetDisplayNormalFunction(display_normal_callback); ++Plymouth.SetDisplayPasswordFunction(display_password_callback); ++Plymouth.SetMessageFunction(display_message_callback); ++ ++#----------------------------------------- Progress Bar -------------------------------- ++ ++if (Plymouth.GetMode() == "suspend" || Plymouth.GetMode() == "resume") { ++ progress_box.original_image = ImageNew("progress_box_background.png"); ++ progress_box.image = progress_box.original_image.Scale(Window.GetMaxWidth() * 0.44, progress_box.original_image.GetHeight()); ++ progress_box.edge = ImageNew("progress_box_edge.png"); ++ progress_box.left_edge_sprite = SpriteNew(); ++ progress_box.right_edge_sprite = SpriteNew(); ++ progress_box.sprite = SpriteNew(); ++ progress_box.sprite.SetImage(progress_box.image); ++ progress_box.left_edge_sprite.SetImage(progress_box.edge); ++ progress_box.right_edge_sprite.SetImage(progress_box.edge); ++ ++ progress_box.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2; ++ progress_box.y = Window.GetY() + Window.GetHeight() * 0.86 - progress_box.image.GetHeight() / 2; ++ ++ progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0); ++ progress_box.left_edge_sprite.SetPosition(progress_box.x-1, progress_box.y, 0); ++ progress_box.right_edge_sprite.SetPosition(progress_box.x + progress_box.image.GetWidth() , progress_box.y, 0); ++ ++ progress_bar.original_image = ImageNew("progress_bar.png"); ++ progress_bar.sprite = SpriteNew(); ++ ++ progress_bar.sprite.SetPosition(progress_box.x + 1, progress_box.y + 2, 1); ++} ++ ++fun progress_callback (duration, progress) ++ { ++if (Plymouth.GetMode() == "suspend" || Plymouth.GetMode() == "resume") { ++ new_width = (progress_box.image.GetWidth() - 2) * progress; ++ if (progress_bar.image.GetWidth() != Math.Int (new_width)) ++ { + +@@ Diff output truncated at 20000 characters. @@ +</pre></div> + +</body> +</html>
\ No newline at end of file |