Skip to content

Commit

Permalink
As you wish, IDs -> ID
Browse files Browse the repository at this point in the history
  • Loading branch information
kobliha committed Aug 22, 2014
1 parent fc7eb95 commit 3baeda6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/clients/firewall_stage1_proposal.rb
Expand Up @@ -42,7 +42,7 @@ class FirewallStage1ProposalClient < Client
LINK_DISABLE_VNC = "firewall--disable_vnc_in_proposal"
LINK_FIREWALL_DIALOG = "firewall_stage1"

module IDs
module ID
SSH_PORT = "open_ssh_port"
VNC_PORT = "open_vnc_port"
ENABLE_FW = "enable_fw"
Expand Down Expand Up @@ -153,7 +153,7 @@ def FirewallDialogSimple

vnc_support = Left(
CheckBox(
Id(IDs::VNC_PORT),
Id(ID::VNC_PORT),
# TRANSLATORS: check-box label
_("Open &VNC Ports"),
SuSEFirewall4Network.EnabledVnc1stStage
Expand All @@ -171,7 +171,7 @@ def FirewallDialogSimple
VBox(
Left(
CheckBox(
Id(IDs::ENABLE_FW),
Id(ID::ENABLE_FW),
Opt(:notify),
# TRANSLATORS: check-box label
_("Enable Firewall"),
Expand All @@ -180,15 +180,15 @@ def FirewallDialogSimple
),
Left(
CheckBox(
Id(IDs::SSH_PORT),
Id(ID::SSH_PORT),
# TRANSLATORS: check-box label
_("Open SSH Port"),
SuSEFirewall4Network.EnabledSsh1stStage
)
),
Left(
CheckBox(
Id(IDs::ENABLE_SSHD),
Id(ID::ENABLE_SSHD),
# TRANSLATORS: check-box label
_("Enable SSH Service"),
SuSEFirewall4Network.EnabledSshd
Expand Down Expand Up @@ -239,12 +239,12 @@ def FirewallDialogSimple
Wizard.HideBackButton

UI.ChangeWidget(
Id(IDs::SSH_PORT),
Id(ID::SSH_PORT),
:Enabled,
SuSEFirewall4Network.Enabled1stStage
)
UI.ChangeWidget(
Id(IDs::VNC_PORT),
Id(ID::VNC_PORT),
:Enabled,
SuSEFirewall4Network.Enabled1stStage
)
Expand All @@ -253,15 +253,15 @@ def FirewallDialogSimple

while true
dialog_ret = UI.UserInput
enable_firewall = UI.QueryWidget(Id(IDs::ENABLE_FW), :Value)
enable_firewall = UI.QueryWidget(Id(ID::ENABLE_FW), :Value)

if dialog_ret == IDs::ENABLE_FW
UI.ChangeWidget(Id(IDs::SSH_PORT), :Enabled, enable_firewall)
UI.ChangeWidget(Id(IDs::VNC_PORT), :Enabled, enable_firewall)
if dialog_ret == ID::ENABLE_FW
UI.ChangeWidget(Id(ID::SSH_PORT), :Enabled, enable_firewall)
UI.ChangeWidget(Id(ID::VNC_PORT), :Enabled, enable_firewall)
next
elsif dialog_ret == :next || dialog_ret == :ok
open_ssh_port = UI.QueryWidget(Id(IDs::SSH_PORT), :Value)
open_vnc_port = UI.QueryWidget(Id(IDs::VNC_PORT), :Value)
open_ssh_port = UI.QueryWidget(Id(ID::SSH_PORT), :Value)
open_vnc_port = UI.QueryWidget(Id(ID::VNC_PORT), :Value)

SuSEFirewall4Network.SetEnabled1stStage(enable_firewall)

Expand All @@ -271,7 +271,7 @@ def FirewallDialogSimple
end

SuSEFirewall4Network.SetSshdEnabled(
UI::QueryWidget(Id(IDs::ENABLE_SSHD), :Value)
UI::QueryWidget(Id(ID::ENABLE_SSHD), :Value)
)
end

Expand Down

0 comments on commit 3baeda6

Please sign in to comment.