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) 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:	DualMultiSelectionBox.ycp
# Package:	yast2-storage
# Summary:	Expert Partitioner
# Authors:	Arvin Schnell <aschnell@suse.de>
#
# The items must have the `id() as their first element.
require "yast"

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

      Yast.import "Label"
      Yast.import "Event"
      Yast.import "Popup"
      Yast.import "Storage"

      textdomain "storage"


      @items = []

      @selected = []
      @item_map = {}
      @classified = {}
      @keep_order = false
    end

    def GetUnselectedItems
      Builtins.filter(@items) do |item|
        id = Ops.get(item, [0, 0])
        !Builtins.contains(@selected, id)
      end
    end


    def GetSelectedItems
      Builtins.y2milestone("selected:%1", @selected)
      if @keep_order
        return Builtins.maplist(@selected) do |id|
          Ops.get(@item_map, id, Empty())
        end
      else
        return Builtins.filter(@items) do |item|
          id = Ops.get(item, [0, 0])
          Builtins.contains(@selected, id)
        end
      end
    end



    def Create(header, new_items, new_selected, unselected_label, selected_label, unselected_rp, selected_rp, can_change_order)
      header = deep_copy(header)
      new_items = deep_copy(new_items)
      new_selected = deep_copy(new_selected)
      unselected_rp = deep_copy(unselected_rp)
      selected_rp = deep_copy(selected_rp)
      @items = deep_copy(new_items)
      @selected = deep_copy(new_selected)
      @item_map = Builtins.listmap(new_items) do |item|
        { Ops.get_string(item, [0, 0], "") => item }
      end
      @keep_order = can_change_order
      sel_header = deep_copy(header)
      if can_change_order
        sel_header = Builtins.add(sel_header, Center(_("Class")))
      end
      sel_term = Table(
        Id(:selected),
        Opt(:keepSorting, :multiSelection, :notify),
        sel_header,
        GetSelectedItems()
      )
      if can_change_order
        order_buttons = VBox(
          PushButton(Id(:top), _("Top")),
          VSpacing(0.5),
          PushButton(Id(:up), _("Up")),
          VSpacing(0.5),
          PushButton(Id(:down), _("Down")),
          VSpacing(0.5),
          PushButton(Id(:bottom), _("Bottom")),
          VSpacing(1.5),
          PushButton(Id(:classify), _("Classify"))
        )
        sel_term = HBox(sel_term, order_buttons)
      end
      HBox(
        HWeight(
          1,
          VBox(
            Left(Label(unselected_label)),
            Table(
              Id(:unselected),
              Opt(:keepSorting, :multiSelection, :notify),
              header,
              GetUnselectedItems()
            ),
            ReplacePoint(Id(:unselected_rp), unselected_rp)
          )
        ),
        MarginBox(
          1,
          1,
          HSquash(
            VBox(
              # push button text
              PushButton(
                Id(:add),
                Opt(:hstretch),
                Ops.add(_("Add") + " ", UI.Glyph(:ArrowRight))
              ),
              # push button text
              PushButton(
                Id(:add_all),
                Opt(:hstretch),
                Ops.add(_("Add All") + " ", UI.Glyph(:ArrowRight))
              ),
              VSpacing(1),
              # push button text
              PushButton(
                Id(:remove),
                Opt(:hstretch),
                Ops.add(Ops.add(UI.Glyph(:ArrowLeft), " "), _("Remove"))
              ),
              # push button text
              PushButton(
                Id(:remove_all),
                Opt(:hstretch),
                Ops.add(Ops.add(UI.Glyph(:ArrowLeft), " "), _("Remove All"))
              )
            )
          )
        ),
        HWeight(
          1,
          VBox(
            Left(Label(selected_label)),
            sel_term,
            ReplacePoint(Id(:selected_rp), selected_rp)
          )
        )
      )
    end


    def GetSelected
      deep_copy(@selected)
    end

    def ScanPatternFile(fname)
      ret = []
      txt = ""
      Builtins.y2milestone("ScanPatternFile fname:%1", fname)
      d = Convert.to_map(SCR.Read(path(".target.stat"), fname))
      Builtins.y2milestone("ScanPatternFile stat:%1", d)
      ok = true
      if !Ops.get_boolean(d, "isreg", false)
        # error popup text
        txt = Builtins.sformat(_("File %1 is not a regular file!"), fname)
        Popup.Error(txt)
        ok = false
      elsif Ops.greater_than(Ops.get_integer(d, "size", 0), 1024 * 1024)
        # error popup text
        txt = Builtins.sformat(_("File %1 is too big!"), fname)
        Popup.Error(txt)
        ok = false
      end
      sl = []
      fl = []
      if ok
        bo = Convert.to_map(
          SCR.Execute(path(".target.bash_output"), Ops.add("cat ", fname))
        )
        sl = Builtins.filter(
          Builtins.splitstring(Ops.get_string(bo, "stdout", ""), "\n")
        ) { |s| !Builtins.isempty(s) }
        fl = Builtins.filter(Builtins.splitstring(Ops.get(sl, 0, ""), " \t")) do |s|
          !Builtins.isempty(s)
        end
        Builtins.y2milestone(
          "ScanPatternFile fline:%1 size:%2",
          fl,
          Builtins.size(fl)
        )
        if Builtins.isempty(sl) || Builtins.size(fl) != 2 ||
            Builtins.size(Ops.get(fl, 1, "")) != 1
          # error popup text
          txt = _(
            "Pattern file has invalid format!\n" +
              "\n" +
              "The file needs to contain lines with a regular expression and a class name\n" +
              "per line. Example:"
          )
          txt = Ops.add(txt, "\nsda.* A\nsdb.* B")
          Popup.Error(txt)
          ok = false
        end
      end
      if ok
        Builtins.foreach(sl) do |s|
          fl = Builtins.filter(Builtins.splitstring(s, " \t")) do |f|
            !Builtins.isempty(f)
          end
          if !Builtins.isempty(Ops.get(fl, 0, "")) &&
              Builtins.size(Ops.get(fl, 1, "")) == 1
            ret = Builtins.add(
              ret,
              [Ops.get(fl, 0, ""), Builtins.toupper(Ops.get(fl, 1, ""))]
            )
          end
        end
        # popup text
        txt = _("Detected following pattern lines:") + "\n"
        Builtins.foreach(ret) do |l|
          txt = Ops.add(
            Ops.add(
              Ops.add(Ops.add(txt, "\n"), Ops.get_string(l, 0, "")),
              " : "
            ),
            Ops.get_string(l, 1, "")
          )
        end
        txt = Ops.add(txt, "\n\n")
        txt = Ops.add(
          txt,
          _("Ok to match devices to classes with these patterns?")
        )
        ok = Popup.YesNo(txt)
        ret = [] if !ok
      end
      Builtins.y2milestone("ScanPatternFile ret:%1", ret)
      deep_copy(ret)
    end

    def FindDeviceMatches(dc, plst)
      plst = deep_copy(plst)
      tg = Storage.GetTargetMap
      dc.value = Builtins.mapmap(dc.value) do |d, c|
        p = Storage.GetPartition(tg, d)
        Builtins.y2milestone("FindDeviceMatches %1 is %2", d, p)
        match = Builtins.find(plst) do |m|
          found = Builtins.regexpmatch(d, Ops.get_string(m, 0, ""))
          if !found
            found = Builtins.regexpmatch(
              Ops.get_string(p, "device", ""),
              Ops.get_string(m, 0, "")
            )
          end
          if !found
            id = Builtins.find(Ops.get_list(p, "udev_id", [])) do |s|
              Builtins.regexpmatch(
                Ops.add("/dev/disk/by-id/", s),
                Ops.get_string(m, 0, "")
              )
            end
            found = id != nil
          end
          if !found
            found = Builtins.regexpmatch(
              Ops.add("/dev/disk/by-path/", Ops.get_string(p, "udev_path", "")),
              Ops.get_string(m, 0, "")
            )
          end
          found
        end
        Builtins.y2milestone("FindDeviceMatches match %1 is %2", d, match)
        c = Ops.get_string(match, 1, "") if match != nil
        { d => c }
      end

      nil
    end

    def ClassifyPopup(selected)
      selected = deep_copy(selected)
      # button text
      txt_sort = "Sorted"
      # button text
      txt_inter = "Interleaved"
      # button text
      txt_pat = "Pattern File"
      _SymToLetter = lambda do |sym|
        lbl = Builtins.tostring(sym)
        Builtins.substring(lbl, Ops.subtract(Builtins.size(lbl), 1))
      end
      _SymToLabel = lambda do |sym, hint|
        # button text
        Ops.add(_("Class") + (hint ? " &" : ""), _SymToLetter.call(sym))
      end
      _ClassifyHelpText = lambda do
        # dialog help text
        txt = _(
          "<p>This dialog is for defining classes for the raid devices\n" +
            "contained in the raid. Available classes are A, B, C, D and E but for many cases\n" +
            "fewer classes are needed (e.g. only A and B). </p>"
        )
        # dialog help text
        txt = Ops.add(
          txt,
          Builtins.sformat(
            _(
              "<p>You can put a device into a class by right-clicking on the\n" +
                "device and choosing the appropriate class from context menu. By pressing the \n" +
                "Ctrl  or Shift key you can select multiple devices and put them into a class in\n" +
                "one step. One can also use the buttons labeled \"%1\" to \"%2\" to put currently \n" +
                "selected devices into this class.</p>"
            ),
            _SymToLabel.call(:class_A, false),
            _SymToLabel.call(:class_E, false)
          )
        )
        # dialog help text
        txt = Ops.add(
          txt,
          Builtins.sformat(
            _(
              "<p>After choosing classes for devices you can order the \ndevices by pressing one of the buttons labeled \"%1\" or \"%2\"."
            ),
            txt_sort,
            txt_inter
          )
        )
        txt = Ops.add(txt, " ")
        # dialog help text
        txt = Ops.add(
          txt,
          _(
            "<b>Sorted</b> puts all devices of class A before all devices\nof class B and so on."
          )
        )
        txt = Ops.add(txt, " ")
        # dialog help text
        txt = Ops.add(
          txt,
          _(
            "<b>Interleaved</b> uses first device of class A, then first device of \n" +
              "class B, then all the following classes with assigned devices. Then the \n" +
              "second device of class A, the second device of class B, and so on will follow."
          )
        )
        txt = Ops.add(txt, " ")
        # dialog help text
        txt = Ops.add(
          txt,
          _(
            "All devices without a class are sorted to the end of devices list.\n" +
              "When you leave the pop-up the current order of the devices is used as the \n" +
              "order in the RAID to be created.</p>"
          )
        )
        # dialog help text
        txt = Ops.add(
          txt,
          Builtins.sformat(
            _(
              "By pressing button \"<b>%1</b>\" you can select a file that contains\n" +
                "lines with a regular expression and a class name (e.g. \"sda.*  A\"). All devices that match \n" +
                "the regular expression will be put into the class on this line. The regular expression is \n" +
                "matched against the kernel name (e.g. /dev/sda1), \n" +
                "the udev path name (e.g. /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part1) and the\n" +
                "the udev id (e.g. /dev/disk/by-id/ata-ST3500418AS_9VMN8X8L-part1). \n" +
                "The first match finally determines the class if a devices name matches more then one\n" +
                "regular expression.</p>"
            ),
            txt_pat
          )
        )
        txt
      end

      if Builtins.isempty(@classified)
        @classified = Builtins.listmap(
          Convert.convert(selected, :from => "list", :to => "list <string>")
        ) { |s| { s => "" } }
      end
      Builtins.y2milestone("ClassifyPopup select:%1", selected)
      Builtins.y2milestone("ClassifyPopup classified:%1", @classified)
      itl = Builtins.maplist(
        Convert.convert(selected, :from => "list", :to => "list <string>")
      ) { |s| Item(Id(s), s, Ops.get(@classified, s, "")) }
      Builtins.y2milestone("ClassifyPopup items:%1", itl)
      classes = [:class_A, :class_B, :class_C, :class_D, :class_E]
      cb = HBox()
      Builtins.foreach(classes) do |s|
        lbl = Builtins.tostring(s)
        lbl = Builtins.substring(lbl, Ops.subtract(Builtins.size(lbl), 1))
        cb = Builtins.add(cb, PushButton(Id(s), _SymToLabel.call(s, true)))
      end
      UI.OpenDialog(
        Opt(:decorated),
        VBox(
          MinHeight(
            15,
            Table(
              Id(:classtab),
              Opt(
                :keepSorting,
                :immediate,
                :notify,
                :multiSelection,
                :notifyContextMenu
              ),
              # headline text
              Header(_("Device"), Center(_("Class"))),
              itl
            )
          ),
          cb,
          HBox(
            PushButton(Id(:help), Opt(:helpButton), Label.HelpButton),
            PushButton(Id(:sorted), Ops.add(txt_sort, " (AAABBBCCC)")),
            PushButton(Id(:interleaved), Ops.add(txt_inter, " (ABCABCABC)")),
            PushButton(Id(:pattern), txt_pat)
          ),
          VSpacing(0.5),
          ButtonBox(
            PushButton(Id(:cancel), Opt(:cancelButton), Label.CancelButton),
            PushButton(Id(:ok), Opt(:okButton), Label.OKButton)
          )
        )
      )
      UI.ChangeWidget(:help, :HelpText, _ClassifyHelpText.call)
      ret = nil
      ctx = Builtins.maplist(classes) do |s|
        Item(Id(s), _SymToLabel.call(s, false))
      end
      begin
        ev = UI.WaitForEvent
        ret = Event.IsWidgetActivatedOrSelectionChanged(ev)
        ret = Event.IsWidgetValueChanged(ev) if ret == nil
        ret = Event.IsWidgetContextMenuActivated(ev) if ret == nil
        Builtins.y2milestone("ClassifyPopup event:%1 ret:%2", ev, ret)
        if ret == :classtab
          if Event.IsWidgetContextMenuActivated(ev) != nil
            UI.OpenContextMenu(term(:menu, ctx))
            value = UI.UserInput
            ret = Convert.to_symbol(value) if Convert.to_symbol(value) != nil
            Builtins.y2milestone("ClassifyPopup value:%1", value)
          end
        end
        if Builtins.contains(classes, ret)
          ls = Convert.convert(
            UI.QueryWidget(Id(:classtab), :SelectedItems),
            :from => "any",
            :to   => "list <string>"
          )
          Builtins.y2milestone("ClassifyPopup ls:%1", ls)
          let = _SymToLetter.call(ret)
          Builtins.y2milestone("ClassifyPopup class:%1", let)
          itl = Convert.convert(
            UI.QueryWidget(Id(:classtab), :Items),
            :from => "any",
            :to   => "list <term>"
          )
          itl = Builtins.maplist(itl) do |t|
            if Builtins.contains(ls, Ops.get_string(t, 1, ""))
              Ops.set(t, 2, let)
            end
            deep_copy(t)
          end
          UI.ChangeWidget(Id(:classtab), :Items, itl)
          UI.ChangeWidget(Id(:classtab), :SelectedItems, ls)
        elsif ret == :interleaved
          itl = Convert.convert(
            UI.QueryWidget(Id(:classtab), :Items),
            :from => "any",
            :to   => "list <term>"
          )
          ll = Builtins.filter(itl) do |a|
            Ops.less_than(Ops.get_string(a, 2, ""), "A")
          end
          itl = Builtins.filter(itl) do |a|
            Ops.greater_or_equal(Ops.get_string(a, 2, ""), "A")
          end
          sl = []
          tll = []
          cidx = 0
          while Ops.less_than(cidx, Builtins.size(classes))
            let = _SymToLetter.call(Ops.get(classes, cidx, :none))
            sl = Builtins.filter(itl) { |t| Ops.get_string(t, 2, "") == let }
            tll = Builtins.add(tll, sl) if !Builtins.isempty(sl)
            cidx = Ops.add(cidx, 1)
          end
          sl = []
          mpty = Item(Id(0), "-")
          while !Builtins.isempty(tll)
            cidx = 0
            while Ops.less_than(cidx, Builtins.size(tll))
              sl = Builtins.add(sl, Ops.get(tll, [cidx, 0], mpty))
              Ops.set(tll, cidx, Builtins.remove(Ops.get(tll, cidx, []), 0))
              if !Builtins.isempty(Ops.get(tll, cidx, []))
                cidx = Ops.add(cidx, 1)
              else
                tll = Builtins.remove(tll, cidx)
              end
            end
          end
          itl = Convert.convert(
            Builtins.union(sl, ll),
            :from => "list",
            :to   => "list <term>"
          )
          UI.ChangeWidget(Id(:classtab), :Items, itl)
        elsif ret == :sorted
          itl = Convert.convert(
            UI.QueryWidget(Id(:classtab), :Items),
            :from => "any",
            :to   => "list <term>"
          )
          ll = Builtins.filter(itl) do |a|
            Ops.less_than(Ops.get_string(a, 2, ""), "A")
          end
          itl = Builtins.sort(Builtins.filter(itl) do |t|
            Ops.greater_or_equal(Ops.get_string(t, 2, ""), "A")
          end) do |a, b|
            Ops.less_than(Ops.get_string(a, 2, " "), Ops.get_string(b, 2, " "))
          end
          itl = Convert.convert(
            Builtins.union(itl, ll),
            :from => "list",
            :to   => "list <term>"
          )
          UI.ChangeWidget(Id(:classtab), :Items, itl)
        elsif ret == :pattern
          # headline text
          fname = UI.AskForExistingFile(".", "", _("Pattern File"))
          Builtins.y2milestone("ClassifyPopup file:%1", fname)
          plst = []
          plst = ScanPatternFile(fname) if fname != nil
          if !Builtins.isempty(plst)
            itl = Convert.convert(
              UI.QueryWidget(Id(:classtab), :Items),
              :from => "any",
              :to   => "list <term>"
            )
            dc = {}
            dc = Builtins.listmap(itl) { |t| { Ops.get_string(t, 1, "") => "" } }
            Builtins.y2milestone("ClassifyPopup dc:%1", dc)
            dc_ref = arg_ref(dc)
            FindDeviceMatches(dc_ref, plst)
            dc = dc_ref.value
            Builtins.y2milestone("ClassifyPopup dc:%1", dc)
            itl = Builtins.maplist(itl) do |t|
              Ops.set(t, 2, Ops.get(dc, Ops.get_string(t, 1, ""), ""))
              deep_copy(t)
            end
            UI.ChangeWidget(Id(:classtab), :Items, itl)
          end
        end
      end while !Builtins.contains([:ok, :cancel], ret)
      if ret == :cancel
        selected = nil
      else
        itl = Convert.convert(
          UI.QueryWidget(Id(:classtab), :Items),
          :from => "any",
          :to   => "list <term>"
        )
        selected = Builtins.maplist(itl) { |t| Ops.get_string(t, 1, "") }
        Builtins.foreach(itl) do |t|
          Ops.set(
            @classified,
            Ops.get_string(t, 1, ""),
            Ops.get_string(t, 2, "")
          )
        end
        Builtins.y2milestone("ClassifyPopup classified:%1", @classified)
      end
      UI.CloseDialog
      Builtins.y2milestone("ClassifyPopup return:%1", selected)
      deep_copy(selected)
    end


    def reverse(v)
      v = deep_copy(v)
      siz = Builtins.size(v)
      i = 0
      while Ops.less_than(i, Ops.divide(siz, 2))
        v = Builtins::List.swap(v, i, Ops.subtract(Ops.subtract(siz, 1), i))
        i = Ops.add(i, 1)
      end
      deep_copy(v)
    end

    def Handle(widget)
      sel = []
      case widget
        when :add, :unselected
          tmp1 = Convert.to_list(
            UI.QueryWidget(Id(:unselected), :SelectedItems)
          )
          @selected = Builtins.flatten([@selected, tmp1])
          sel = Convert.convert(
            UI.QueryWidget(Id(:selected), :SelectedItems),
            :from => "any",
            :to   => "list <string>"
          )
          Builtins.y2milestone("selected:%1", @selected)
        when :remove, :selected
          tmp1 = Convert.to_list(UI.QueryWidget(Id(:selected), :SelectedItems))
          @selected = Builtins.filter(@selected) do |tmp2|
            !Builtins.contains(tmp1, tmp2)
          end
          sel = Convert.convert(
            UI.QueryWidget(Id(:selected), :SelectedItems),
            :from => "any",
            :to   => "list <string>"
          )
          sel = Convert.convert(
            Builtins.filter(sel) { |tmp2| !Builtins.contains(tmp1, tmp2) },
            :from => "list",
            :to   => "list <string>"
          )
          Builtins.y2milestone("selected:%1", @selected)
        when :add_all
          tmp1 = Builtins.maplist(@items) do |item|
            id = Ops.get(item, [0, 0])
            deep_copy(id)
          end
          tmp1 = Builtins.filter(
            Convert.convert(tmp1, :from => "list", :to => "list <string>")
          ) { |s| !Builtins.contains(@selected, s) }
          @selected = Builtins.merge(@selected, tmp1)
          sel = Convert.convert(
            UI.QueryWidget(Id(:selected), :SelectedItems),
            :from => "any",
            :to   => "list <string>"
          )
          Builtins.y2milestone("selected:%1", @selected)
        when :remove_all
          @selected = []
          @classified = {}
          @items = Builtins.maplist(@items) do |t|
            Ops.set(t, 5, "")
            Ops.set(@item_map, Ops.get_string(t, 1, ""), t)
            deep_copy(t)
          end
          Builtins.y2milestone("selected:%1", @selected)
        when :classify
          Builtins.y2milestone("selected:%1", @selected)
          l = ClassifyPopup(@selected)
          if l != nil
            @selected = deep_copy(l)
            Builtins.y2milestone("selected:%1", @selected)
            @items = Builtins.maplist(@items) do |t|
              Ops.set(t, 5, Ops.get(@classified, Ops.get_string(t, 1, ""), ""))
              Ops.set(@item_map, Ops.get_string(t, 1, ""), t)
              deep_copy(t)
            end
          end
        when :down, :up
          up = widget == :up
          sel = Convert.convert(
            UI.QueryWidget(Id(:selected), :SelectedItems),
            :from => "any",
            :to   => "list <string>"
          )
          cnt = -1
          siz = Ops.subtract(Builtins.size(@selected), 1)
          sm = Builtins.listmap(
            Convert.convert(@selected, :from => "list", :to => "list <string>")
          ) do |s|
            cnt = Ops.add(cnt, 1)
            { s => cnt }
          end
          cnt = 0
          diff = up ? -1 : 1
          sel = reverse(sel) if !up
          Builtins.foreach(sel) do |s|
            idx = Ops.get(sm, s, 0)
            if up && Ops.greater_than(idx, cnt) ||
                !up && Ops.less_than(idx, Ops.subtract(siz, cnt))
              @selected = Builtins::List.swap(
                @selected,
                Ops.add(idx, diff),
                idx
              )
            end
            cnt = Ops.add(cnt, 1)
          end
          Builtins.y2milestone("change:%1 selected:%2", sel, @selected)
        when :bottom, :top
          up = widget == :top
          sel = Convert.convert(
            UI.QueryWidget(Id(:selected), :SelectedItems),
            :from => "any",
            :to   => "list <string>"
          )
          @selected = Builtins.filter(
            Convert.convert(@selected, :from => "list", :to => "list <string>")
          ) { |s| !Builtins.contains(sel, s) }
          if up
            @selected = Builtins.merge(sel, @selected)
          else
            @selected = Builtins.merge(@selected, sel)
          end
          Builtins.y2milestone("change:%1 selected:%2", sel, @selected)
      end

      if Builtins.contains(
          [
            :unselected,
            :selected,
            :add,
            :add_all,
            :remove,
            :remove_all,
            :up,
            :down,
            :top,
            :bottom,
            :classify
          ],
          widget
        )
        UI.ChangeWidget(Id(:unselected), :Items, GetUnselectedItems())
        UI.ChangeWidget(Id(:selected), :Items, GetSelectedItems())
        UI.ChangeWidget(Id(:selected), :SelectedItems, sel)
      end

      nil
    end

    publish :function => :Create, :type => "term (term, list <term>, list, string, string, term, term, boolean)"
    publish :function => :GetSelected, :type => "list ()"
    publish :function => :Handle, :type => "void (symbol)"
  end

  DualMultiSelectionBox = DualMultiSelectionBoxClass.new
  DualMultiSelectionBox.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