Sha256: 20870d129f01d37166d7ba8b07e380f6db0794f7dd959e34e1b251b0b120172a

Contents?: true

Size: 1.17 KB

Versions: 7

Compression:

Stored size: 1.17 KB

Contents

class Welcome < View
  attr_accessor :no_login

  def layout
    gui_vbox :nogroup do
      gui_hbox :nogroup do
        gui_fields :nogroup do
        end
        show_str :username
        show_pass :password
        show_str_ro :version
        show_button :simple_connect, :direct_connect
        gui_fields :nogroup do
        end
      end

      gui_window :login_failed do
        show_html :reason
        show_button :try_again
      end
      if ConfigBase.welcome_text
        gui_vbox :nogroup do
          show_html :links
        end
      end
    end

    dputs(5) { "#{@layout.inspect}" }
    @visible = false
    @no_login ||= false
  end

  def rpc_show(session)
    dputs(3) { self.inspect }
    if @no_login
      dputs(2) { 'No login is enabled' }
      session
      return reply(:session_id, session.sid) +
          View.rpc_list(session)
    else
      dputs(2) { 'Login is enabled' }
      super(session) + reply(:hide, :direct_connect)
    end
  end

  def self.nologin
    dputs(2) { 'Going for no login' }
    $config.__Views.__Welcome.__no_login = true
    View.Welcome.no_login = true
  end

  def rpc_button_try_again(session, data)
    reply(:window_hide)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qooxview-1.9.1312 lib/qooxview/helpers/welcome.rb
qooxview-1.9.13.pre.12 lib/qooxview/helpers/welcome.rb
qooxview-1.9.13.pre.11 lib/qooxview/helpers/welcome.rb
qooxview-1.9.13.pre.10 lib/qooxview/helpers/welcome.rb
qooxview-1.9.11 lib/qooxview/helpers/welcome.rb
qooxview-1.9.10 lib/qooxview/helpers/welcome.rb
qooxview-1.9.9 lib/qooxview/helpers/welcome.rb