SlideShow.ycp Purpose: Slide show during package installation |
|
This module has an unstable interface. |
Constructor
Start the internal (global) timer.
Reset the internal (global) timer.
Stop the internal (global) timer and account elapsed time.
Check if currently the "Details" page is shown
- Return value:
-
true if showing details, false otherwise
Check if currently the "Slide Show" page is shown
- Return value:
-
true if showing details, false otherwise
Check if currently the "Release Notes" page is shown
- Return value:
-
true if showing details, false otherwise
Sum up all list items
- Parameters:
-
sizes
Sum up all positive list items, but cut off individual items at a maximum value. Negative return values indicate overflow of any individual item at "max_cutoff". In this case, the real sum is the absolute value of the return value.
- Parameters:
-
sizes max_cutoff
Format an integer number as (at least) two digits; use leading zeroes if necessary.
- Parameters:
-
x
- Return value:
-
number as two-digit string
Format an integer seconds value with min:sec or hours:min:sec
- Parameters:
-
seconds
Format an integer seconds value with min:sec or hours:min:sec
- Parameters:
-
seconds
Format number of remaining bytes to be installed as string.
- Parameters:
-
remaining bytes remaining, -1 for 'done'
- Return value:
-
human readable remaining time or byte / kB/ MB size
Format number of remaining packages to be installed as string.
- Parameters:
-
remaining bytes remaining, -1 for 'done'
- Return value:
-
human readable remaining time or byte / kB/ MB size
Normalize a CD size list like [ [ 111, 0, 333 ], [ 211, 222, 0 ] ] to a flat single list that doesn't contain any 0 items (but -1 if there are any) If the resulting list would be completely empty, use a simple fallback: [ 1 ]
- Parameters:
-
sizesPerSourceList
Get a list of available slides (images) for the slide show.
- Parameters:
-
lang
- Return value:
-
slides
Check if showing slides is supported.
Check if slides are available.
Check if the dialog is currently set up so the user could switch to the slide page.
Check if the slide show is available. This must be called before trying to access any slides; some late initialization is done here.
Set the slide show text.
- Parameters:
-
text
Load one slide from files complete with image and textual description.
- Parameters:
-
text_file_name file name + path of the text file (rich text / HTML)
- Return value:
-
true if OK, false if error
Get version info for a package (without build no.)
- Parameters:
-
pkg_name name of the package without path and ".rpm" extension
- Return value:
-
version string
Get package file name from path
- Parameters:
-
pkg_name location of the package
- Return value:
-
package file name
set media type "CD" or "DVD"
- Parameters:
-
new_media_type
Set the slide show directory
- Parameters:
-
dir
Perform sanity check for correct initialzation etc.
- Parameters:
-
silent don't complain in log file
- Return value:
-
true if OK, false if any error
Package providal start
- Parameters:
-
pkg_name sz remote
Set the curent language. Must be called once during initialization.
- Parameters:
-
new_language
Append message to the installation log
- Parameters:
-
msg
Update internal bookkeeping: subtract size of one package from the global list of remaining sizes per CD
- Parameters:
-
pkg_size
Return a CD's progress bar ID
- Parameters:
-
src_no number of the repository (from 0 on) cd_no number of the CD within that repository (from 0 on)
Recalculate remaining times per CD based on package sizes remaining and data rate so far. Recalculation is only done each 'recalc_interval' seconds unless 'force_recalc' is set to 'true'.
- Parameters:
-
force_recalc force recalculation even if timeout not reached yet
- Return value:
-
true if recalculated, false if not
Create one single item for the CD statistics table
- Parameters:
-
id col1 col2 col3 col4
Returns a table widget item list for CD statistics
Progress display update This is called via the packager's progress callbacks.
- Parameters:
-
pkg_percent package percentage
Update progress widgets for all CDs. Uses global statistics variables.
- Parameters:
-
silent_check
Update progress widgets for the current CD: Label and ProgressBar. Use global statistics variables for that.
- Parameters:
-
silent_check
Update progress widgets
- Parameters:
-
silent_check
Switch unit to seconds if necessary and recalc everything accordingly.
- Return value:
-
true if just switched from sizes to seconds, false otherwise
Load a slide image + text.
- Parameters:
-
slide_no number of slide to load
Check if the current slide needs to be changed and do that if necessary.
package start display update - this is called at the beginning of a new package
- Parameters:
-
pkg_name package name pkg_summary package summary (short description) pkg_size deleting Flag: deleting (true) or installing (false) package?
package start display update - this is called at the end of a new package
- Parameters:
-
pkg_name package name pkg_size deleting Flag: deleting (true) or installing (false) package?
Add widgets for progress bar etc. around a slide show page
- Parameters:
-
page_id ID to use for this page (for checking with UI::WidgetExists() ) page_contents The inner widgets (the page contents)
- Return value:
-
A term describing the widgets
Construct widgets describing a page with the real slide show (the RichText / HTML page)
- Return value:
-
A term describing the widgets
Construct widgets for the "details" page
- Return value:
-
A term describing the widgets
Switch from the 'details' view to the 'slide show' view.
Switch from the 'slide show' view to the 'details' view.
- Parameters:
-
silent_check
Switch to the 'release notes' view.
Open the slide show base dialog with empty work area (placeholder for the image) and CD statistics.
Initialize internal pacakge data, such as remaining package sizes and times. This may not be called before the pkginfo server is up and running, so this cannot be reliably done from the constructor in all cases.
- Parameters:
-
force true to force reinitialization
Try to figure out what media will be needed next and set next_src_no and next_cd_no accordingly.
Set the current repository and CD number. Must be called for each CD change. src_no: 1...n cd_no: 1...n
- Parameters:
-
src_no cd_no
Process (slide show) input (button press).
- Parameters:
-
button
Open the slide show dialog.
Close the slide show dialog.