forked from muquit/mrdialog
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprgbox.rb
More file actions
executable file
·41 lines (32 loc) · 861 Bytes
/
Copy pathprgbox.rb
File metadata and controls
executable file
·41 lines (32 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env ruby
# muquit@muquit.com Apr-01-2014
require [File.expand_path(File.dirname(__FILE__)), '..', 'lib', 'mrdialog'].join('/')
require 'pp'
class TestPrgBox1
ME = File.basename($0)
def initialize
if ENV['CHANGE_TITLE']
if ME =~ /(.+)\.rb$/
base = $1
puts "\033]0;mrdialog - #{base}\007"
end
end
end
def doit
dialog = MRDialog.new
dialog.logger = Logger.new(ENV["HOME"] + "/dialog_" + ME + ".log")
dialog.clear = true
dialog.title = "PRGBOX"
path = File.expand_path(File.dirname(__FILE__))
command = path + "/shortlist"
height = 20
width = 70
dialog.prgbox(command, height, width)
text = "Hi, this is prgbox text"
command = path + "/shortlist 2"
dialog.prgbox(command, height, width, text)
end
end
if __FILE__ == $0
TestPrgBox1.new.doit
end