Class: Y2Network::Widgets::EditRoute
- Inherits:
-
CWM::PushButton
- Object
- CWM::PushButton
- Y2Network::Widgets::EditRoute
- Defined in:
- src/lib/y2network/widgets/routing_buttons.rb
Instance Method Summary collapse
- #handle ⇒ Object
- #init ⇒ Object
-
#initialize(table, config) ⇒ EditRoute
constructor
A new instance of EditRoute.
- #label ⇒ Object
Constructor Details
#initialize(table, config) ⇒ EditRoute
Returns a new instance of EditRoute.
52 53 54 55 56 57 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 52 def initialize(table, config) super() @table = table @config = config textdomain "network" end |
Instance Method Details
#handle ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 63 def handle return nil unless @table.selected_route route = @table.selected_route.dup res = Y2Network::Dialogs::Route.run(route, @config.interfaces) @table.replace_route(route) if res == :ok nil end |
#init ⇒ Object
73 74 75 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 73 def init disable if @config.backend?(:network_manager) end |
#label ⇒ Object
59 60 61 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 59 def label _("&Edit") end |