Module: Yast::IplbCommonInclude

Defined in:
../../src/include/iplb/common.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) initialize_iplb_common(include_target)



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File '../../src/include/iplb/common.rb', line 32

def initialize_iplb_common(include_target)
  textdomain "iplb"

  Yast.import "Label"
  Yast.import "Wizard"
  Yast.import "Iplb"
  Yast.import "Popup"
  Yast.import "CWM"

  @DIALOG = ["global_conf", "vserver_conf"]

  @NAME = {
    "global_conf"  => _("Global Configuration"),
    "vserver_conf" => _("Virtual Servers Configuration")
  }
end

- (Object) my_SetContents(conf, contents)



49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File '../../src/include/iplb/common.rb', line 49

def my_SetContents(conf, contents)
  contents = deep_copy(contents)
  Wizard.SetContents(
    Ops.add("IPLB - ", Ops.get_string(@NAME, conf, "")),
    contents,
    Ops.get_string(@HELPS, conf, ""),
    true,
    true
  )

  UI.SetFocus(Id(:wizardTree)) if UI.WidgetExists(Id(:wizardTree))

  true
end

- (Object) myHelp(help)



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File '../../src/include/iplb/common.rb', line 64

def myHelp(help)
  UI.OpenDialog(
    Opt(:decorated),
    HBox(
      VSpacing(16),
      VBox(
        HSpacing(60),
        VSpacing(0.5),
        RichText(Ops.get_string(@HELPS, help, "")),
        VSpacing(1.5),
        PushButton(Id(:ok), Opt(:default, :key_F10), Label.OKButton)
      )
    )
  )

  UI.SetFocus(Id(:ok))
  UI.UserInput
  UI.CloseDialog

  nil
end