Module: Yast::DrbdCommonInclude
- Defined in:
- ../../src/include/drbd/common.rb
Instance Method Summary (collapse)
- - (Object) cmpList(a, b)
- - (Object) initialize_drbd_common(include_target)
- - (Object) Modified
- - (Object) my_SetContents(conf, contents)
- - (Object) myHelp(help)
- - (Object) PollAbort
- - (Object) ReallyAbort
Instance Method Details
- (Object) cmpList(a, b)
95 96 97 98 99 100 101 102 103 104 |
# File '../../src/include/drbd/common.rb', line 95 def cmpList(a, b) a = deep_copy(a) b = deep_copy(b) same = true if Builtins.size(a) != Builtins.size(b) same = false #TODO: end false end |
- (Object) initialize_drbd_common(include_target)
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File '../../src/include/drbd/common.rb', line 30 def initialize_drbd_common(include_target) textdomain "drbd" Yast.import "Label" Yast.import "Wizard" Yast.import "Drbd" Yast.import "Popup" Yast.import "CWM" @DIALOG = ["startup_conf", "global_conf", "resource_conf","lvm_conf"] @PARENT = {} @NAME = { "startup_conf" => _("Start-up Configuration"), "global_conf" => _("Global Configuration"), "resource_conf" => _("Resource Configuration"), "lvm_conf" => _("LVM Configuration"), "basic_conf" => _("Resource Basic Configuration"), "advance_conf" => _("Resource Advanced Configuration") } end |
- (Object) Modified
57 58 59 |
# File '../../src/include/drbd/common.rb', line 57 def Modified Drbd.modified end |
- (Object) my_SetContents(conf, contents)
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File '../../src/include/drbd/common.rb', line 66 def my_SetContents(conf, contents) contents = deep_copy(contents) Wizard.SetContents( Ops.add("DRBD - ", Ops.get_string(@NAME, conf, "")), contents, Ops.get_string(@HELPS, conf, ""), true, true ) if UI.WidgetExists(Id(:wizardTree)) # UI::ChangeWidget(`id(`wizardTree), `CurrentItem, current_dialog); UI.SetFocus(Id(:wizardTree)) end # if (Heartbeat::firstrun) { # UI::ChangeWidget(`id(`back), `Enabled, conf != "node_conf"); # if (conf == "startup_conf") { # UI::WizardCommand(`SetNextButtonLabel( Label::FinishButton() ) ); # Wizard::SetNextButton(`PushButton(`id(`next), `opt(`key_F10), Label::FinishButton())); # } else { # UI::WizardCommand(`SetNextButtonLabel( Label::NextButton() ) ); # Wizard::SetNextButton(`PushButton(`id(`next), `opt(`key_F10), Label::NextButton())); # } # } nil end |
- (Object) myHelp(help)
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File '../../src/include/drbd/common.rb', line 106 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 |
- (Object) PollAbort
53 54 55 |
# File '../../src/include/drbd/common.rb', line 53 def PollAbort UI.PollInput == :abort end |
- (Object) ReallyAbort
61 62 63 64 |
# File '../../src/include/drbd/common.rb', line 61 def ReallyAbort # return !Heartbeat::Modified() || Popup::ReallyAbort(true); !Modified() || Popup.ReallyAbort(true) end |