59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# File 'plugins/crawler/gui/general_settings_frame.rb', line 59
def initialize(owner)
super(owner, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
iframe = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_RAISED|FRAME_THICK)
outer_matrix = FXMatrix.new(iframe, 3, :opts => MATRIX_BY_COLUMNS|LAYOUT_FILL_X)
gbframe = FXGroupBox.new(outer_matrix, "Performance", FRAME_GROOVE|LAYOUT_FILL_Y, 0, 0, 0, 0)
matrix = FXMatrix.new(gbframe, 2, :opts => MATRIX_BY_COLUMNS|LAYOUT_FILL_X|LAYOUT_FILL_Y)
FXLabel.new(matrix, "Max. Depth:", nil, LAYOUT_TOP|JUSTIFY_RIGHT)
@max_depth_txt = FXTextField.new(matrix, 10, nil, 0, :opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT)
FXLabel.new(matrix, "Max. Threads:", nil, LAYOUT_TOP|JUSTIFY_RIGHT)
@max_threads_txt = FXTextField.new(matrix, 10, nil, 0, :opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT)
FXLabel.new(matrix, "Max. Repeat:", nil, LAYOUT_TOP|JUSTIFY_RIGHT)
@max_repeat_txt = FXTextField.new(matrix, 10, nil, 0, :opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT)
FXLabel.new(matrix, "Delay (ms):", nil, LAYOUT_TOP|JUSTIFY_RIGHT)
@delay_txt = FXTextField.new(matrix, 10, nil, 0, :opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT)
gbframe = FXGroupBox.new(outer_matrix, "Form Handling", FRAME_GROOVE|LAYOUT_FILL_Y, 0, 0, 0, 0)
iframe = FXVerticalFrame.new(gbframe, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
@submit_forms_cb = FXCheckButton.new(iframe, "Submit Forms", nil, 0, JUSTIFY_LEFT|JUSTIFY_TOP|ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP)
@submit_forms_cb.checkState = true
@fill_forms_cb = FXCheckButton.new(iframe, "Fill Forms", nil, 0, JUSTIFY_LEFT|JUSTIFY_TOP|ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP)
@fill_forms_cb.checkState = false
@fill_forms_cb.disable
FXLabel.new(iframe, "Don't send forms if they contain following field names (regex):")
@excluded_field_patterns = Watobo::Gui::ListBox.new(iframe)
gbframe = FXGroupBox.new(outer_matrix, "Rewrite", FRAME_GROOVE|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 0)
iframe = FXVerticalFrame.new(gbframe, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FIX_WIDTH, :width => 250)
fxtext = FXText.new(iframe, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|TEXT_WORDWRAP)
fxtext.backColor = fxtext.parent.backColor
fxtext.disable
text = "To speed up the crawl process and to save bandwidth it is recommended to use HEAD requests for specific document extensions."
text << "The response to a HEAD request only includes the http headers but no body. The extensions pattern is defined as an regular expression (case insesitive),"
text << "e.g. '(pdf|swf|doc|flv|jpg|png|gif)' - without quotes."
fxtext.setText(text)
@rewrite_method_cb = FXCheckButton.new(iframe, "Use HEAD method for:", nil, 0, JUSTIFY_LEFT|JUSTIFY_TOP|ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP)
@rewrite_method_cb.checkState = true
f = FXHorizontalFrame.new(iframe, :opts => LAYOUT_FILL_X)
FXLabel.new(f, "Ext. Pattern:", nil, LAYOUT_TOP|JUSTIFY_RIGHT)
@head_request_pattern_txt = FXTextField.new(f, 10, nil, 0, :opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT|LAYOUT_FILL_X)
@head_request_pattern_txt.text = '(pdf|swf|doc|flv|jpg|png|gif|zip|tar|gz|bz2|tgz)'
end
|