Module: Yast::FirewallComplexInclude
- Defined in:
- ../../src/include/firewall/complex.rb
Instance Method Summary (collapse)
-
- (Boolean) AbortDialog
Returns whether user confirmed aborting the configuration.
- - (Object) initialize_firewall_complex(include_target)
-
- (Object) ReadDialog
Read settings dialog.
-
- (Object) WriteDialog
Write settings dialog.
Instance Method Details
- (Boolean) AbortDialog
Returns whether user confirmed aborting the configuration.
104 105 106 107 108 109 110 111 112 113 114 115 |
# File '../../src/include/firewall/complex.rb', line 104 def AbortDialog if SuSEFirewall.GetModified return Popup.YesNoHeadline( # TRANSLATORS: popup headline _("Aborting Firewall Configuration"), # TRANSLATORS: popup message _("All changes would be lost.\nReally abort configuration?\n") ) else return true end end |
- (Object) initialize_firewall_complex(include_target)
33 34 35 36 37 38 39 40 41 42 43 44 |
# File '../../src/include/firewall/complex.rb', line 33 def initialize_firewall_complex(include_target) textdomain "firewall" Yast.import "Popup" Yast.import "SuSEFirewall" Yast.import "Wizard" Yast.import "Confirm" Yast.import "Report" Yast.import "Message" Yast.include include_target, "firewall/helps.rb" end |
- (Object) ReadDialog
Read settings dialog.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File '../../src/include/firewall/complex.rb', line 49 def ReadDialog Wizard.RestoreHelp(HelpForDialog("reading_configuration")) # Checking for root's permissions return :abort if !Confirm.MustBeRoot # reading firewall settings ret = SuSEFirewall.Read if !ret Report.Error(Message.CannotContinueWithoutPackagesInstalled) return :abort end # testing for other firewall running if SuSEFirewall.IsOtherFirewallRunning # TRANSLATORS: Popup headline if Popup.ContinueCancelHeadline( _("Another Firewall Active"), # TRANSLATORS: Popup text _( "Another kind of firewall is active in your system.\n" + "If you continue, SuSEfirewall2 may produce undefined errors.\n" + "It would be better to remove the other firewall before\n" + "configuring SuSEfirewall2.\n" + "Continue with configuration?\n" ) ) != true return :abort end end # hidding finished progress Wizard.SetContentsButtons("", Empty(), "", "", "") Wizard.SetAbortButton(:abort, Label.CancelButton) # FIXME: handle possible read errors ret ? :next : :abort end |
- (Object) WriteDialog
Write settings dialog
90 91 92 93 94 95 96 97 98 99 |
# File '../../src/include/firewall/complex.rb', line 90 def WriteDialog Wizard.RestoreHelp(HelpForDialog("saving_configuration")) ret = SuSEFirewall.Write return ret ? :next : :abort # hidding finished progress Wizard.SetContentsButtons("", Empty(), "", "", "") Wizard.SetAbortButton(:abort, Label.CancelButton) end |