Sha256: a26b7632623fec16a2c621be831148a045314ee20decdb10a4ec7191bf43da42

Contents?: true

Size: 862 Bytes

Versions: 2

Compression:

Stored size: 862 Bytes

Contents

# frozen_string_literal: true

module SSHTunnel
  module UI
    module Windows
      module Hosts
        class NewWindow < Gtk::Window

          # Register the class in the GLib world
          type_register

          class << self

            def init
              # Set the template from the resources binary
              set_template resource: '/com/ungtb10d/ssh-hull/ui/hosts/new_window.glade'
              super
            end

          end

          include SSHTunnel::UI::Helpers::HostWindowHelper


          def initialize(application, window, host)
            super

            # Set window title
            set_title t('window.host.new')
          end


          private


            def save_and_reload_view
              @application.config.add_host(@host)
              super
            end

        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ssh-hull-2.0 lib/ssh-hull/ui/windows/hosts/new_window.rb
ssh-hull-1.0.0 lib/ssh-hull/ui/windows/hosts/new_window.rb