Index: stringscan.rb ================================================================== --- stringscan.rb +++ stringscan.rb @@ -79,12 +79,11 @@ #core method; here we search for a string in text files within a directory and display a list of matching files in the listbox def stringgrep $root.update $file_list = [] $grep_list = [] - $p.start - $bottomlabel.configure('text' => "Searching for \"#{$searchterm}\" in #{$dirname}") + $bottomlabel.configure('text' => "Searching for \"#{$searchterm}\" in #{$dirname}...") $lbox.delete(0, 'end') $tbox.configure('state'=>'normal') $tbox.delete('1.0', 'end') $tbox.configure('state'=>'disabled') $root.update @@ -105,11 +104,10 @@ end end rescue #puts "Search term not found.\n" end - $p.stop $grep_list = $lbox.get(0, 'end') num = $grep_list.count.to_s $bottomlabel.configure('text' => "Found #{num} matches for \"#{$searchterm}\" in #{$dirname}") end rescue @@ -275,11 +273,10 @@ $tscrollframe = Tk::Frame.new($bottomrightframe).pack('side'=>'right','fill' => 'y', 'expand' => 'no') $tscroll = Tk::Tile::Scrollbar.new($tscrollframe).pack('side'=>'right','fill' => 'y', 'expand' => 'no') $tbox.yscrollbar($tscroll) $labelframe = Tk::Tile::Frame.new($root).pack('side'=>'bottom', 'fill'=>'both', 'expand' => 'no') $bottomlabel = Tk::Tile::Label.new($labelframe) {text "No data displayed"}.pack('side' => 'left','fill' => 'both','expand' => 'no') - $p = Tk::Tile::Progressbar.new($labelframe) {orient 'horizontal'; length 200; mode 'indeterminate'}.pack('side' => 'left','fill' => 'both','expand' => 'no') $bottomsep = Tk::Tile::Separator.new($root) { orient 'horizontal' }.pack('side'=> 'bottom', 'fill'=>'both') $root.bind("#{$accelkey}-Q", proc{exit}) $root.bind("#{$accelkey}-q", proc{exit}) $root.bind("#{$accelkey}-O", proc{choosedir}) $root.bind("#{$accelkey}-o", proc{choosedir})