Class: Watobo::Gui::ClientCertDialog
- Inherits:
-
FXDialogBox
- Object
- FXDialogBox
- Watobo::Gui::ClientCertDialog
- Includes:
- Responder
- Defined in:
- lib/watobo/gui/client_cert_dialog.rb
Defined Under Namespace
Classes: PEMFrame, PKCS12Frame, StoreFrame
Constant Summary collapse
- NO_SELECTION =
"no site selected"
Instance Attribute Summary collapse
-
#client_certificates ⇒ Object
readonly
Returns the value of attribute client_certificates.
Instance Method Summary collapse
-
#initialize(owner, prefs = {}) ⇒ ClientCertDialog
constructor
A new instance of ClientCertDialog.
- #savePasswords? ⇒ Boolean
Constructor Details
#initialize(owner, prefs = {}) ⇒ ClientCertDialog
Returns a new instance of ClientCertDialog.
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/watobo/gui/client_cert_dialog.rb', line 265 def initialize(owner, prefs={}) super(owner, "Client Certificates", :opts => DECOR_ALL) FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept) @password_policy = { :save_passwords => false } @cert_path = nil @client_certificates = {} current_certs = Watobo.project.getClientCertificates @client_certificates = current_certs unless current_certs.nil? @password_policy.update prefs[:password_policy] if prefs.has_key? :password_policy @site_dt = FXDataTarget.new('') main_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_GROOVE) frame = FXHorizontalFrame.new(main_frame, :opts => LAYOUT_FILL_X) @scope_only_cb = FXCheckButton.new(frame, "scope only", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_LEFT) @scope_only_cb.setCheck(false) @scope_only_cb.connect(SEL_COMMAND) { updateSitesCombo() } @sites_combo = FXComboBox.new(frame, 5, @site_dt, FXDataTarget::ID_VALUE, COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP|LAYOUT_FILL_X) @sites_combo.numVisible = @sites_combo.numItems >= 20 ? 20 : @sites_combo.numItems @sites_combo.numColumns = 25 @sites_combo.editable = true updateSitesCombo() @sites_combo.connect(SEL_COMMAND, method(:update_fields)) # @save_pws_cbt = FXCheckButton.new(matrix, "save passwords") # @save_pws_cbt.checkState = false # @save_pws_cbt.checkState = true if @password_policy[:save_passwords] == true # note_label = FXLabel.new(matrix, "This setting affects all passwords!!!") @cert_settings = [] @tabBook = FXTabBook.new(main_frame, nil, 0, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_RIGHT) res_tab = FXTabItem.new(@tabBook, "PEM", nil) @cert_settings << PEMFrame.new(@tabBook) res_tab = FXTabItem.new(@tabBook, "PKCS12", nil) @cert_settings << PKCS12Frame.new(@tabBook) = FXHorizontalFrame.new(main_frame, :opts => LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, :padLeft => 40, :padRight => 40, :padTop => 20, :padBottom => 20) accept = FXButton.new(, "&Accept", nil, self, ID_ACCEPT, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) accept.enable # Cancel FXButton.new(, "&Cancel", nil, self, ID_CANCEL, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) end |
Instance Attribute Details
#client_certificates ⇒ Object (readonly)
Returns the value of attribute client_certificates.
256 257 258 |
# File 'lib/watobo/gui/client_cert_dialog.rb', line 256 def client_certificates @client_certificates end |
Instance Method Details
#savePasswords? ⇒ Boolean
258 259 260 261 |
# File 'lib/watobo/gui/client_cert_dialog.rb', line 258 def savePasswords?() return false #@save_pws_cbt.checked? end |