Stringscan

Check-in [28f8803fe4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Code formatting and cleanup
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:28f8803fe4042faa31b4c906b14f12958b9989c11cba829d039f8e1803e836d5
User & Date: kevin 2017-09-19 11:43:46
Context
2017-09-20
02:47
UI tweaks check-in: 8af3877f02 user: kevin tags: trunk
2017-09-19
11:43
Code formatting and cleanup check-in: 28f8803fe4 user: kevin tags: trunk
03:13
Update file for 1.1 check-in: d9d50ad502 user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to stringscan.rb.

130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
...
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
...
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
...
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
    $glassdata = 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AcSAg8sJGRWZAAAAXhJREFUOMutlL9LQlEUxz+WGRHllGNEPyAUWnLWsVYhXNpd+ldC6B/QPyDnoMXNtbnFIRAarLAn+bDU13IuHC/vPm/agQuXy/d93veec+4Bv9gGKkAbGAORrAHQBPLAOn+MAtBVMNdqARlfaEk+minAJ/AOvAEjC973gWeAnvpoCNSAfWAX2AKKQN36eWtRWhoK+grkErRXlvO8S7hjuah6pK2uwE2X6BKYiujFsx5FlfPBmkO0B6Rkf+8JfgZC2Wdd4EjtNzzBcwVzgccKfuIJzgJp2X+7RIfAjyrGkQe4pvTtpIcxUcLOgt7MSZ8bfcUFDWOebMfhvCp9btqzK7NlLspW/36ptjPrAbgDbqUVbQOFOKh++wFwLfCk4WNM9OS2scPGrA/gQODmbCIFnQpspm7TsIdPWqCPIkgJ9AZ4Uk97DFyIq3NgU7R9yf0wrliB5fZMxqI+K7FEnIpLe+5GkvMyK8SxoyArQTXcOA+XvX5SWoL/gP4Cdj2n/+OJ36AAAAAASUVORK5CYII='

    $folderimage = TkPhotoImage.new(:data => $folderdata)
    $glassimage = TkPhotoImage.new(:data => $glassdata)

    $icondata = 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABuvAAAbrwFeGpEcAAAAB3RJTUUH4QcKAhkVOQjHbgAAF1lJREFUeNrNW2l0nNV5fu693zL7opE02uUVLNuSN1kKJhBTKBgTl5QU6pICLQ3tSU+a07RpFuD0pIHDadOVpElP6iyHkzQlKacQ0gCNjUkBEyzkbYwsC9uyFo+kGc2m2edb7u2PmZFGsjZkZbnn3HNn+ea7933uc9/7vO/9hmAZpaNzNwK971S87wKAKgBeAE4ADUKIjQJYAyGaANQKgWpAeADYAVgByAAEgAKADIAECIkQIAhgiBBynhByDkAUQCTQ2xOt7C/Q24NfRCGLGz7TcUdnlwzgnlLtFEI4OOd2zrmNc0GsVguqfVXwej3wuN1wOh1w2OywWG1QVRmSxCAEYBgG8vkCstkskqkU4rE4JiNRTITDKBQ0UEbzjNIkpXQSwPMAvhro7QkDwLbdXTjzTs8vFYAdAPZyLj4mBN8lSRJcTgecTieqfVVoamxAQ10d/H4/nA47uODQNQOGacA0TZimCc4FAAEhBAACSgkopWCMQWIMkixDURQwShGNxTE8OoJLl4YwOjaGeDyOZDINQvA2pfQfABwN9PbEV5MRZBHjGwAMcs7V1uZGbGvfipbmZiiqAouqQpZlTE1NIRKNIBaLIR6PIZ/PQwgBzjmEENMVQkAAIKTYHSFkulJKQQiBzWZDTU0t6uvqUF/fANMUyOWzCIcn8X9vHMPFwSHIshQB8Gigt+fQL5wBHZ1drQAu33n7rWTr5jak0mmkkknEEzFEo1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dO1d4+eWXC9lsVlSKsJtvvvmO+vr6H37sYx9DMBiE0+mEqqoIhUJIp9Pw+/14/vnnE9lsdteRI0cGf1UMIBVB1Lz14Ycftn/0ox9tWrNmzVq3292sqmq9LMteANQwjFQulwtPTU0Fh4eHh1555ZUrhw4dSuTzeQ4g193dffP69eufufvuu33ZbBaUUlgsxThhx44dEELg0UcfvfDcc89dd60AsGswnlW0sxSj3W6XHnrooboNGzasc7vd62w220aLxbJJVdUtsiyvJYQ4ACimaZLS/wuN06dPZ6ampggAORgMjmua9l8jIyMPbd++XS4/Ntfd3Q0AsFqtOH36tE9V1W+MjIykf9m7AF2E+gQAzWQy5POf/3zonnvuye/evXu8paXlvMvl8iqKYhNCsFwup8VisfTo6Gj0zJkz0cOHDyfGx8dFhd8wBwYGQolEYgsh5Af79u3ramtrm378jhACTdPQ398fm5vh+WUAwEsD5RWM4HMYIlKpFJ555pn4M888kwRweQ5Yc50jn6PiOACEQqH0T37yk1sNw3jR5XLdsm7dumJ0evYsRkdHvxqJRLRf5S5Al6hkAaPJPLGHqAB3FiCEECGEyO/Zs+fPtm7d+ruMMXb27NnnU6nU3zHGjJMnTwr8ikvZD8gAFAAWFJ8Ot5eqE8UHmN2l6pmnukvXuAA4Sr+zle6jlu47y18dPHjw108IzRM4YZ5Ey6ylskCmZq7O/4XN8v8D9yIPOOfsZU4AAAAASUVORK5CYII='
    $icon = TkPhotoImage.new(:data => $icondata)
        #initialize variables for entry
    $dirname = TkVariable.new
    $searchterm = TkVariable.new
        #top window and frame
    Tk::TkDND::DND
    $root = TkRoot.new {
        title "Stringscan"
    }
        $root.iconphoto_default($icon)
        if $platform == 'aqua'
        Tk.tk_call('fullscreen::fullscreen', $root)
        end
        
     $root.withdraw
        
        #menu
    $menubar = TkMenu.new($root)
    TkOption.add '*tearOff', 0
    if $platform == 'aqua'
        $appmenu = TkSysMenu_Apple.new($menubar)
        $menubar.add :cascade, :menu => $appmenu
        $appmenu.add :command, :label => 'About Stringscan', :command=> proc{aboutWindow}
................................................................................
    if $platform != 'aqua'
        $helpmenu.add :command, :label => 'About Stringscan', :command=> proc{aboutWindow}
        $helpmenu.add :command, :label => 'License', :command=>proc{getReg}
        $helpmenu.add :command, :label=>'Check for Updates', :command=>proc{checkUpdate}
    end
    $root['menu'] = $menubar
    $mainframe = Tk::Tile::Frame.new($root).pack('side' => 'top','fill' => 'both','expand' => 'yes')
        #button frame and buttons
    $buttonframe = Tk::Tile::Frame.new($mainframe){padding 2}.pack('side' => 'top','fill' => 'both','expand' => 'no')
    choosedirproc = proc{choosedir}
    $choosebutton = Tk::Tile::Button.new($buttonframe) {
        image $folderimage
        takefocus 0
        padding 5
        command  choosedirproc
................................................................................
        image $glassimage
        takefocus 0
        padding 5
        command stringgrepProc
    }.pack('side' => 'left','fill' => 'both','expand' => 'no')
    Tk::RbWidget::BalloonHelp.new($runbutton, 'text'=>'Run Search', 'background'=>'lightyellow', 'relief'=>'solid', 'borderwidth'=>1)
    $sep = Tk::Tile::Separator.new($mainframe) { orient 'horizontal' }.pack('side'=> 'top', 'fill'=>'both')
        #labels and entries
    $topframe = Tk::Tile::Frame.new($mainframe){padding 5}.pack('side' => 'top','fill' => 'both','expand' => 'no')
    $chooselabel = Tk::Tile::Label.new($topframe) {text "Directory:"}.pack('side' => 'left','fill' => 'both','expand' => 'no')
    $direntry = Tk::Tile::Entry.new($topframe) {textvariable $dirname }.pack('side' => 'left','fill' => 'both','expand' => 'no')
    $termlabel = Tk::Tile::Label.new($topframe) {text "Search Term:"}.pack('side' => 'left','fill' => 'both','expand' => 'no')
    $termentry = Tk::Tile::Entry.new($topframe) {textvariable $searchterm}.pack('side' => 'left','fill' => 'both','expand' => 'no')
    $termentry.bind('Return', proc {stringgrep})
    $nextsep = Tk::Tile::Separator.new($mainframe) {orient 'horizontal'}.pack('side'=>'top', 'fill'=>'both')
        #listbox, textbox, scrollbars
    $bottomframe = Tk::Frame.new($mainframe).pack('side'=>'bottom','fill' => 'both', 'expand' => 'yes')
    $bottomleftframe = Tk::Tile::Frame.new($bottomframe).pack('side'=>'left','fill' => 'both', 'expand' => 'yes')
    $listlabel = Tk::Tile::Label.new($bottomleftframe) {
        text 'File Name'
        style 'TablelistHeader.TLabel'
        padding 1
    }.pack('side'=>'top', 'fill'=>'both', 'expand' => 'no')
................................................................................
        highlightcolor 'SlateGray3'
        bg 'white'
        state 'disabled'
    }.pack('side'=>'left','fill' => 'both', 'expand' => 'yes')
    $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})
    $root.bind("#{$accelkey}-R", proc{stringgrep})
    $root.bind("#{$accelkey}-r", proc{stringgrep})

    $root.update







|


|




|
|

|
<
|
<







 







|







 







|







|







 







|



|







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

149

150
151
152
153
154
155
156
...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
...
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
...
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
    $glassdata = 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AcSAg8sJGRWZAAAAXhJREFUOMutlL9LQlEUxz+WGRHllGNEPyAUWnLWsVYhXNpd+ldC6B/QPyDnoMXNtbnFIRAarLAn+bDU13IuHC/vPm/agQuXy/d93veec+4Bv9gGKkAbGAORrAHQBPLAOn+MAtBVMNdqARlfaEk+minAJ/AOvAEjC973gWeAnvpoCNSAfWAX2AKKQN36eWtRWhoK+grkErRXlvO8S7hjuah6pK2uwE2X6BKYiujFsx5FlfPBmkO0B6Rkf+8JfgZC2Wdd4EjtNzzBcwVzgccKfuIJzgJp2X+7RIfAjyrGkQe4pvTtpIcxUcLOgt7MSZ8bfcUFDWOebMfhvCp9btqzK7NlLspW/36ptjPrAbgDbqUVbQOFOKh++wFwLfCk4WNM9OS2scPGrA/gQODmbCIFnQpspm7TsIdPWqCPIkgJ9AZ4Uk97DFyIq3NgU7R9yf0wrliB5fZMxqI+K7FEnIpLe+5GkvMyK8SxoyArQTXcOA+XvX5SWoL/gP4Cdj2n/+OJ36AAAAAASUVORK5CYII='

    $folderimage = TkPhotoImage.new(:data => $folderdata)
    $glassimage = TkPhotoImage.new(:data => $glassdata)

    $icondata = 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABuvAAAbrwFeGpEcAAAAB3RJTUUH4QcKAhkVOQjHbgAAF1lJREFUeNrNW2l0nNV5fu693zL7opE02uUVLNuSN1kKJhBTKBgTl5QU6pICLQ3tSU+a07RpFuD0pIHDadOVpElP6iyHkzQlKacQ0gCNjUkBEyzkbYwsC9uyFo+kGc2m2edb7u2PmZFGsjZkZbnn3HNn+ea7933uc9/7vO/9hmAZpaNzNwK971S87wKAKgBeAE4ADUKIjQJYAyGaANQKgWpAeADYAVgByAAEgAKADIAECIkQIAhgiBBynhByDkAUQCTQ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nnU6nU3zHGjJMnTwr8ikvZD8gAFAAWFJ8Ot5eqE8UHmN2l6pmnukvXuAA4Sr+zle6jlu47y18dPHjw108IzRM4YZ5Ey6ylskCmZq7O/4XN8v8D9yIPOOfsZU4AAAAASUVORK5CYII='
    $icon = TkPhotoImage.new(:data => $icondata)
    #initialize variables for entry
    $dirname = TkVariable.new
    $searchterm = TkVariable.new
    #top window and frame
    Tk::TkDND::DND
    $root = TkRoot.new {
        title "Stringscan"
    }
    $root.iconphoto_default($icon)
    if $platform == 'aqua'
        Tk.tk_call('fullscreen::fullscreen', $root)
    end

        $root.withdraw

        #menu
    $menubar = TkMenu.new($root)
    TkOption.add '*tearOff', 0
    if $platform == 'aqua'
        $appmenu = TkSysMenu_Apple.new($menubar)
        $menubar.add :cascade, :menu => $appmenu
        $appmenu.add :command, :label => 'About Stringscan', :command=> proc{aboutWindow}
................................................................................
    if $platform != 'aqua'
        $helpmenu.add :command, :label => 'About Stringscan', :command=> proc{aboutWindow}
        $helpmenu.add :command, :label => 'License', :command=>proc{getReg}
        $helpmenu.add :command, :label=>'Check for Updates', :command=>proc{checkUpdate}
    end
    $root['menu'] = $menubar
    $mainframe = Tk::Tile::Frame.new($root).pack('side' => 'top','fill' => 'both','expand' => 'yes')
    #button frame and buttons
    $buttonframe = Tk::Tile::Frame.new($mainframe){padding 2}.pack('side' => 'top','fill' => 'both','expand' => 'no')
    choosedirproc = proc{choosedir}
    $choosebutton = Tk::Tile::Button.new($buttonframe) {
        image $folderimage
        takefocus 0
        padding 5
        command  choosedirproc
................................................................................
        image $glassimage
        takefocus 0
        padding 5
        command stringgrepProc
    }.pack('side' => 'left','fill' => 'both','expand' => 'no')
    Tk::RbWidget::BalloonHelp.new($runbutton, 'text'=>'Run Search', 'background'=>'lightyellow', 'relief'=>'solid', 'borderwidth'=>1)
    $sep = Tk::Tile::Separator.new($mainframe) { orient 'horizontal' }.pack('side'=> 'top', 'fill'=>'both')
    #labels and entries
    $topframe = Tk::Tile::Frame.new($mainframe){padding 5}.pack('side' => 'top','fill' => 'both','expand' => 'no')
    $chooselabel = Tk::Tile::Label.new($topframe) {text "Directory:"}.pack('side' => 'left','fill' => 'both','expand' => 'no')
    $direntry = Tk::Tile::Entry.new($topframe) {textvariable $dirname }.pack('side' => 'left','fill' => 'both','expand' => 'no')
    $termlabel = Tk::Tile::Label.new($topframe) {text "Search Term:"}.pack('side' => 'left','fill' => 'both','expand' => 'no')
    $termentry = Tk::Tile::Entry.new($topframe) {textvariable $searchterm}.pack('side' => 'left','fill' => 'both','expand' => 'no')
    $termentry.bind('Return', proc {stringgrep})
    $nextsep = Tk::Tile::Separator.new($mainframe) {orient 'horizontal'}.pack('side'=>'top', 'fill'=>'both')
    #listbox, textbox, scrollbars
    $bottomframe = Tk::Frame.new($mainframe).pack('side'=>'bottom','fill' => 'both', 'expand' => 'yes')
    $bottomleftframe = Tk::Tile::Frame.new($bottomframe).pack('side'=>'left','fill' => 'both', 'expand' => 'yes')
    $listlabel = Tk::Tile::Label.new($bottomleftframe) {
        text 'File Name'
        style 'TablelistHeader.TLabel'
        padding 1
    }.pack('side'=>'top', 'fill'=>'both', 'expand' => 'no')
................................................................................
        highlightcolor 'SlateGray3'
        bg 'white'
        state 'disabled'
    }.pack('side'=>'left','fill' => 'both', 'expand' => 'yes')
    $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})
    $root.bind("#{$accelkey}-R", proc{stringgrep})
    $root.bind("#{$accelkey}-r", proc{stringgrep})

    $root.update