Class: Watobo::Gui::AdvancedSettingsFrame

Inherits:
FXVerticalFrame
  • Object
show all
Defined in:
lib/watobo/gui/full_scan_dialog.rb

Instance Method Summary collapse

Constructor Details

#initialize(owner, project, opts) ⇒ AdvancedSettingsFrame

Returns a new instance of AdvancedSettingsFrame.



176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/watobo/gui/full_scan_dialog.rb', line 176

def initialize(owner, project, opts)
  super(owner, opts)
  @project = project
  smf = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_TOP)
  FXLabel.new(smf, "Advanced Settings")
  
  gbox = FXGroupBox.new(self, "Excluded Chats",LAYOUT_SIDE_RIGHT|FRAME_GROOVE|LAYOUT_FILL_X, 0, 0, 0, 0)
  @excludedChats = FXDataTarget.new('')
  @excludedChats.value = @project.scan_settings[:excluded_chats].join(", ")
  FXTextField.new(gbox, 0, @excludedChats, FXDataTarget::ID_VALUE, :opts => LAYOUT_FILL_X|FRAME_GROOVE|FRAME_SUNKEN)
  
  frame = FXHorizontalFrame.new(gbox, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_RIGHT)
  button = FXButton.new(frame, "View/Edit" ,  nil, nil, :opts => BUTTON_NORMAL|LAYOUT_RIGHT)  
  button.enable
  button.connect(SEL_COMMAND) do |sender, sel, item|
    
  end
  @ignoreEqualChats = FXCheckButton.new(frame, "Ignore Similar Chats", nil, 0, ICON_AFTER_TEXT|LAYOUT_LEFT)
  @ignoreEqualChats.checkState = false
  #-------------------------- Proxy ---------------------------------#
  gbox = FXGroupBox.new(self, "Forwarding Proxy",LAYOUT_SIDE_RIGHT|FRAME_GROOVE|LAYOUT_FILL_X, 0, 0, 0, 0)
  frame = FXHorizontalFrame.new(gbox, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_RIGHT)
  FXLabel.new(frame, "Current: ")
  @forwardingProxy = FXDataTarget.new('')
  FXTextField.new(frame, 0, @forwardingProxy, FXDataTarget::ID_VALUE, :opts => LAYOUT_FILL_X|FRAME_GROOVE|FRAME_SUNKEN)
  
  @forwardingProxy.value = @project.settings[:proxy]
  button = FXButton.new(frame, "View/Edit" ,  nil, nil, :opts => BUTTON_NORMAL|LAYOUT_RIGHT)  
  button.enable
  button.connect(SEL_COMMAND, method(:startProxyDialog))
  #-------------------------- Session Management ---------------------------------#
  gbox = FXGroupBox.new(self, "Session Management",LAYOUT_SIDE_RIGHT|FRAME_GROOVE|LAYOUT_FILL_X, 0, 0, 0, 0)
  frame = FXHorizontalFrame.new(gbox, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_RIGHT)
  #FXLabel.new(frame, " ")
  button = FXButton.new(frame, "View/Edit" ,  nil, nil, :opts => BUTTON_NORMAL|LAYOUT_RIGHT)  
  button.enable
  button.connect(SEL_COMMAND, method(:startSessionManagementDialog))
  
end

Instance Method Details

#startProxyDialog(sender, sel, ptr) ⇒ Object



155
156
157
158
159
160
161
162
# File 'lib/watobo/gui/full_scan_dialog.rb', line 155

def startProxyDialog(sender, sel, ptr)
  proxy_dialog = Watobo::Gui::ProxyDialog.new(self, @selectedProxy, @selectedProxyList)
  if proxy_dialog.execute != 0 then
    @selectedProxyList = proxy_dialog.getProxyList
    @selectedProxy = proxy_dialog.proxy
    @forwardingProxy.value = @selectedProxy
  end
end

#startSessionManagementDialog(sender, sel, ptr) ⇒ Object



164
165
166
167
168
169
170
171
172
173
# File 'lib/watobo/gui/full_scan_dialog.rb', line 164

def startSessionManagementDialog(sender, sel, ptr)
  smdlg = SessionManagementDialog.new(self, @project)
  if smdlg.execute != 0 then
    
    @login_chat_ids = smdlg.getLoginScriptIds() 
    @sid_patterns = smdlg.getSidPatterns()
    @logout_signatures = smdlg.getLogoutSignatures()
    
  end
end