visualruby 3.2.0 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.vr_settings.yaml +5 -5
- data/examples/golf_handicap/.vr_settings.yaml +26 -0
- data/examples/golf_handicap/src/Handicap.rb +112 -0
- data/examples/golf_handicap/src/Score.rb +37 -0
- data/examples/golf_handicap/src/glade/Handicap.glade +191 -0
- data/examples/golf_handicap/src/glade/Score.glade +219 -0
- data/lib/Alert.rb +1 -0
- data/lib/vrlib.rb +2 -0
- data/src/version.rb +1 -1
- data/vr +3 -0
- metadata +11 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 471487097b28ac84f9b91f6cdbded31e11f871b7
|
4
|
+
data.tar.gz: 1b62e86d75a8be09a9b82c75138470b9a5c2865f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db3f477a72929229e187c0a06565c3bf697a2474705869be6a708a3d42010c95d58c3fc7157630d946b124db750ffa254f0bfd5dae670b37855374862ab2f320
|
7
|
+
data.tar.gz: 4ea888126ac4ba0b4a4c2ae7fd386db675a556e496078be5255719240f6c01bda83a1e467e1ff023d939996471373151be551ba28d452f21b1c1dd54963438b5
|
data/.vr_settings.yaml
CHANGED
@@ -14,16 +14,16 @@ open_files:
|
|
14
14
|
- "/home/eric/vrp/vr3/vr"
|
15
15
|
- "/home/eric/vrp/vr3/src/main/VR_Main.rb"
|
16
16
|
- "/home/eric/vrp/vr3/lib/GladeGUI.rb"
|
17
|
-
- "/home/eric/vrp/vr3/
|
18
|
-
- "/home/eric/vrp/vr3/
|
17
|
+
- "/home/eric/vrp/vr3/lib/vrlib.rb"
|
18
|
+
- "/home/eric/vrp/vr3/lib/ActLikeAHash.rb"
|
19
19
|
open_folders:
|
20
20
|
- "/home/eric/vrp/vr3"
|
21
|
+
- "/home/eric/vrp/vr3/lib"
|
21
22
|
- "/home/eric/vrp/vr3/site"
|
22
23
|
- "/home/eric/vrp/vr3/src"
|
23
|
-
- "/home/eric/vrp/vr3/src/editor"
|
24
24
|
- "/home/eric/vrp/vr3/src/main"
|
25
|
-
current_file: "/home/eric/vrp/vr3/
|
26
|
-
current_line:
|
25
|
+
current_file: "/home/eric/vrp/vr3/vr"
|
26
|
+
current_line: 17
|
27
27
|
rdoc_command_line: yardoc lib - site/*.*
|
28
28
|
builder: !ruby/object:Gtk::Builder {}
|
29
29
|
top_level_window: false
|
@@ -0,0 +1,26 @@
|
|
1
|
+
--- !ruby/object:VR_ENV
|
2
|
+
vr_yaml_file: "/home/eric/vrp/vr3/examples/golf_handicap/.vr_settings.yaml"
|
3
|
+
width: 1086
|
4
|
+
height: 600
|
5
|
+
panel_pos: 360
|
6
|
+
notebook_panel_position: 400
|
7
|
+
run_command_line: ruby golf_handicap eric
|
8
|
+
open_files:
|
9
|
+
- "/home/eric/vrp/vr3/examples/golf_handicap/golf_handicap"
|
10
|
+
- "/home/eric/vrp/vr3/examples/golf_handicap/src/Handicap.rb"
|
11
|
+
- "/home/eric/vrp/vr3/examples/golf_handicap/src/Score.rb"
|
12
|
+
- "/home/eric/vrp/vr3/examples/golf_handicap/golf_handicap.gemspec"
|
13
|
+
open_folders:
|
14
|
+
- "/home/eric/vrp/vr3/examples/golf_handicap"
|
15
|
+
- "/home/eric/vrp/vr3/examples/golf_handicap/src"
|
16
|
+
- "/home/eric/vrp/vr3/examples/golf_handicap/src/glade"
|
17
|
+
current_file: "/home/eric/vrp/vr3/examples/golf_handicap/golf_handicap.gemspec"
|
18
|
+
current_line: 4
|
19
|
+
rdoc_command_line: rdoc -x README
|
20
|
+
builder: !ruby/object:Gtk::Builder {}
|
21
|
+
top_level_window: false
|
22
|
+
browser: firefox
|
23
|
+
backup_path: "/home/eric"
|
24
|
+
tab_spaces: 2
|
25
|
+
glade_path: glade-3
|
26
|
+
font_name: Monospace 10
|
@@ -0,0 +1,112 @@
|
|
1
|
+
class Handicap
|
2
|
+
|
3
|
+
include GladeGUI
|
4
|
+
|
5
|
+
def initialize()
|
6
|
+
@scores = []
|
7
|
+
end
|
8
|
+
|
9
|
+
def before_show()
|
10
|
+
@view = VR::ListView.new(rnd: String, date: VR::Col::CalendarCol,
|
11
|
+
course: String, rating_slope: String, score: String, diff: Score,
|
12
|
+
hcp: String)
|
13
|
+
@view.col_xalign(diff: 1, hcp: 1, score: 1)
|
14
|
+
@view.col_sortable(date: true, course: true)
|
15
|
+
@view.show
|
16
|
+
golfer_file = File.basename(@vr_yaml_file, ".*")
|
17
|
+
golfer = golfer_file.split("_").map(&:capitalize).join(' ')
|
18
|
+
@builder[:name].label = "<big><big><big><big><big>#{golfer}</big></big></big></big></big>"
|
19
|
+
if File.exists?(golfer_file + ".jpg")
|
20
|
+
@builder[:image].file = golfer_file + ".jpg"
|
21
|
+
@builder[:image].visible = true
|
22
|
+
end
|
23
|
+
refresh()
|
24
|
+
end
|
25
|
+
|
26
|
+
def refresh()
|
27
|
+
update_handicaps
|
28
|
+
@view.model.clear
|
29
|
+
i = 1
|
30
|
+
@scores.each do |s|
|
31
|
+
row = @view.add_row()
|
32
|
+
row[:rnd] = "#{i}."
|
33
|
+
i += 1
|
34
|
+
row[:date] = VR::Col::CalendarCol.new(s.date, :format => "%d %b %Y ", :hide_time=>true, :hide_date => false)
|
35
|
+
row[:course] = s.course_name
|
36
|
+
row[:score] = s.score
|
37
|
+
row[:rating_slope] = "#{s.course_rating.to_s}/#{s.course_slope.to_s}"
|
38
|
+
row[:diff] = s
|
39
|
+
row[:hcp] = s.handicap
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def buttonChange__clicked(*a)
|
44
|
+
load_new_golfer
|
45
|
+
end
|
46
|
+
|
47
|
+
def buttonAdd__clicked(*a)
|
48
|
+
if row = @view.selected_rows.first
|
49
|
+
course = row[:course]
|
50
|
+
rating, slope = row[:rating_slope].split("/")
|
51
|
+
else
|
52
|
+
course = rating = slope = ""
|
53
|
+
end
|
54
|
+
score = Score.new(course, rating, slope)
|
55
|
+
score.show_glade
|
56
|
+
if !score.used.nil? and score.score.to_i > 50
|
57
|
+
@scores << score
|
58
|
+
@scores.sort! { |x,y| y.date <=> x.date }
|
59
|
+
refresh()
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def update_handicaps
|
64
|
+
@scores.each_index do |i|
|
65
|
+
fill_handicap(@scores[@scores.size-i-1..@scores.size-1])
|
66
|
+
end
|
67
|
+
@scores.each {|s| s.used = ""}
|
68
|
+
fill_handicap(@scores)
|
69
|
+
@builder[:handicap].label = "<big><big><big><big><big><big><big><big>#{@scores[0].handicap}</big></big></big></big></big></big></big></big>" if @scores[0]
|
70
|
+
end
|
71
|
+
|
72
|
+
def fill_handicap(score_array)
|
73
|
+
score_ar = score_array.size > 20 ? score_array[0..19] : score_array
|
74
|
+
count = use_count(score_ar) # number of scores to use for handicap
|
75
|
+
best_scores = score_ar.sort { |x,y| x.diff <=> y.diff }
|
76
|
+
best_scores = count > 0 ? best_scores[0..count-1] : []
|
77
|
+
best_scores.each {|s| s.used = "y"}
|
78
|
+
tot = best_scores.inject(0) { |sum, s| sum + s.diff }
|
79
|
+
x = (0.96*tot/count).to_s
|
80
|
+
score_array[0].handicap = count > 0 ? x[0..x.index(".")+1] : "n/a" if score_array[0]
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
def window1__delete_event(*)
|
85
|
+
@view = nil
|
86
|
+
VR::save_yaml(self)
|
87
|
+
return false #ok to close
|
88
|
+
end
|
89
|
+
|
90
|
+
def use_count(score_ar)
|
91
|
+
if score_ar.size > 20
|
92
|
+
return 10
|
93
|
+
else
|
94
|
+
return [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,8,9,10][score_ar.size-1]
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def buttonDelete__clicked(*a)
|
99
|
+
return unless row = @view.selected_rows.first
|
100
|
+
if alert("Are you sure you want to delete this score?", button_yes: "Delete", button_no: "Cancel")
|
101
|
+
@scores.delete(row[:diff])
|
102
|
+
refresh
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def buttonEditScore__clicked(*a)
|
107
|
+
return unless row = @view.selected_rows.first
|
108
|
+
row[:diff].show_glade
|
109
|
+
@scores.sort! { |x,y| y.date <=> x.date }
|
110
|
+
refresh
|
111
|
+
end
|
112
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
class Score
|
3
|
+
|
4
|
+
attr_accessor :date, :score, :course_name, :course_rating, :course_slope, :used, :handicap
|
5
|
+
|
6
|
+
include GladeGUI
|
7
|
+
|
8
|
+
def initialize(course, rating, slope)
|
9
|
+
@course_name = course
|
10
|
+
@course_rating = rating
|
11
|
+
@course_slope = slope
|
12
|
+
@date = DateTime.now
|
13
|
+
@score = "0"
|
14
|
+
@used = nil
|
15
|
+
@handicap = "0"
|
16
|
+
end
|
17
|
+
|
18
|
+
def buttonSave__clicked(*a)
|
19
|
+
get_glade_variables
|
20
|
+
@used = "n" # signals save occured
|
21
|
+
@builder[:window1].destroy
|
22
|
+
end
|
23
|
+
|
24
|
+
def diff()
|
25
|
+
(@score.to_f - @course_rating.to_f) * 113 / @course_slope.to_f
|
26
|
+
end
|
27
|
+
|
28
|
+
def to_s
|
29
|
+
(@used == "y" ? "*" : " ") + diff.round(1).to_s
|
30
|
+
end
|
31
|
+
|
32
|
+
def visual_attributes
|
33
|
+
# return @used == "y" ? {background: "#ABB" , weight: 600} : {background: "white", weight: 300 }
|
34
|
+
return @used == "y" ? { weight: 1200} : {weight: 400 }
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,191 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.16.1 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.0"/>
|
5
|
+
<object class="GtkWindow" id="window1">
|
6
|
+
<property name="width_request">670</property>
|
7
|
+
<property name="height_request">660</property>
|
8
|
+
<property name="can_focus">False</property>
|
9
|
+
<property name="title" translatable="yes">USGA Handicap Index Calculator</property>
|
10
|
+
<property name="modal">True</property>
|
11
|
+
<property name="type_hint">utility</property>
|
12
|
+
<child>
|
13
|
+
<object class="GtkBox" id="box1">
|
14
|
+
<property name="visible">True</property>
|
15
|
+
<property name="can_focus">False</property>
|
16
|
+
<property name="margin_left">10</property>
|
17
|
+
<property name="margin_right">10</property>
|
18
|
+
<property name="margin_top">10</property>
|
19
|
+
<property name="margin_bottom">10</property>
|
20
|
+
<property name="orientation">vertical</property>
|
21
|
+
<property name="spacing">10</property>
|
22
|
+
<child>
|
23
|
+
<object class="GtkBox" id="box2">
|
24
|
+
<property name="visible">True</property>
|
25
|
+
<property name="can_focus">False</property>
|
26
|
+
<property name="spacing">20</property>
|
27
|
+
<child>
|
28
|
+
<object class="GtkImage" id="image">
|
29
|
+
<property name="can_focus">False</property>
|
30
|
+
</object>
|
31
|
+
<packing>
|
32
|
+
<property name="expand">False</property>
|
33
|
+
<property name="fill">True</property>
|
34
|
+
<property name="position">0</property>
|
35
|
+
</packing>
|
36
|
+
</child>
|
37
|
+
<child>
|
38
|
+
<object class="GtkLabel" id="name">
|
39
|
+
<property name="visible">True</property>
|
40
|
+
<property name="can_focus">False</property>
|
41
|
+
<property name="label" translatable="yes"><big><big><big><big>Eric Cunningham</big></big></big></big></property>
|
42
|
+
<property name="use_markup">True</property>
|
43
|
+
</object>
|
44
|
+
<packing>
|
45
|
+
<property name="expand">True</property>
|
46
|
+
<property name="fill">True</property>
|
47
|
+
<property name="position">1</property>
|
48
|
+
</packing>
|
49
|
+
</child>
|
50
|
+
<child>
|
51
|
+
<object class="GtkButtonBox" id="buttonbox2">
|
52
|
+
<property name="visible">True</property>
|
53
|
+
<property name="can_focus">False</property>
|
54
|
+
<property name="orientation">vertical</property>
|
55
|
+
<property name="layout_style">center</property>
|
56
|
+
<child>
|
57
|
+
<object class="GtkButton" id="buttonChange">
|
58
|
+
<property name="label" translatable="yes">Change</property>
|
59
|
+
<property name="visible">True</property>
|
60
|
+
<property name="can_focus">True</property>
|
61
|
+
<property name="receives_default">True</property>
|
62
|
+
</object>
|
63
|
+
<packing>
|
64
|
+
<property name="expand">False</property>
|
65
|
+
<property name="fill">True</property>
|
66
|
+
<property name="position">0</property>
|
67
|
+
</packing>
|
68
|
+
</child>
|
69
|
+
</object>
|
70
|
+
<packing>
|
71
|
+
<property name="expand">False</property>
|
72
|
+
<property name="fill">True</property>
|
73
|
+
<property name="position">2</property>
|
74
|
+
</packing>
|
75
|
+
</child>
|
76
|
+
<child>
|
77
|
+
<object class="GtkFrame" id="frame1">
|
78
|
+
<property name="visible">True</property>
|
79
|
+
<property name="can_focus">False</property>
|
80
|
+
<property name="label_xalign">0</property>
|
81
|
+
<property name="shadow_type">in</property>
|
82
|
+
<child>
|
83
|
+
<object class="GtkAlignment" id="alignment1">
|
84
|
+
<property name="visible">True</property>
|
85
|
+
<property name="can_focus">False</property>
|
86
|
+
<property name="left_padding">12</property>
|
87
|
+
<child>
|
88
|
+
<object class="GtkLabel" id="handicap">
|
89
|
+
<property name="visible">True</property>
|
90
|
+
<property name="can_focus">False</property>
|
91
|
+
<property name="label" translatable="yes"><big><big><big><big><big><big><big><big>n/a</big></big></big></big></big></big></big></big></property>
|
92
|
+
<property name="use_markup">True</property>
|
93
|
+
</object>
|
94
|
+
</child>
|
95
|
+
</object>
|
96
|
+
</child>
|
97
|
+
<child type="label">
|
98
|
+
<object class="GtkLabel" id="label2">
|
99
|
+
<property name="visible">True</property>
|
100
|
+
<property name="can_focus">False</property>
|
101
|
+
<property name="label" translatable="yes">Handicap</property>
|
102
|
+
<property name="justify">center</property>
|
103
|
+
</object>
|
104
|
+
</child>
|
105
|
+
</object>
|
106
|
+
<packing>
|
107
|
+
<property name="expand">False</property>
|
108
|
+
<property name="fill">True</property>
|
109
|
+
<property name="position">3</property>
|
110
|
+
</packing>
|
111
|
+
</child>
|
112
|
+
</object>
|
113
|
+
<packing>
|
114
|
+
<property name="expand">False</property>
|
115
|
+
<property name="fill">True</property>
|
116
|
+
<property name="position">0</property>
|
117
|
+
</packing>
|
118
|
+
</child>
|
119
|
+
<child>
|
120
|
+
<object class="GtkScrolledWindow" id="view">
|
121
|
+
<property name="visible">True</property>
|
122
|
+
<property name="can_focus">True</property>
|
123
|
+
<property name="hexpand">True</property>
|
124
|
+
<property name="vexpand">True</property>
|
125
|
+
<property name="shadow_type">in</property>
|
126
|
+
<child>
|
127
|
+
<placeholder/>
|
128
|
+
</child>
|
129
|
+
</object>
|
130
|
+
<packing>
|
131
|
+
<property name="expand">False</property>
|
132
|
+
<property name="fill">True</property>
|
133
|
+
<property name="position">1</property>
|
134
|
+
</packing>
|
135
|
+
</child>
|
136
|
+
<child>
|
137
|
+
<object class="GtkButtonBox" id="buttonbox1">
|
138
|
+
<property name="visible">True</property>
|
139
|
+
<property name="can_focus">False</property>
|
140
|
+
<property name="spacing">5</property>
|
141
|
+
<property name="layout_style">end</property>
|
142
|
+
<child>
|
143
|
+
<object class="GtkButton" id="buttonAdd">
|
144
|
+
<property name="label" translatable="yes">Add Score</property>
|
145
|
+
<property name="visible">True</property>
|
146
|
+
<property name="can_focus">True</property>
|
147
|
+
<property name="receives_default">True</property>
|
148
|
+
</object>
|
149
|
+
<packing>
|
150
|
+
<property name="expand">False</property>
|
151
|
+
<property name="fill">True</property>
|
152
|
+
<property name="position">1</property>
|
153
|
+
</packing>
|
154
|
+
</child>
|
155
|
+
<child>
|
156
|
+
<object class="GtkButton" id="buttonEditScore">
|
157
|
+
<property name="label" translatable="yes">Edit Score</property>
|
158
|
+
<property name="visible">True</property>
|
159
|
+
<property name="can_focus">True</property>
|
160
|
+
<property name="receives_default">True</property>
|
161
|
+
</object>
|
162
|
+
<packing>
|
163
|
+
<property name="expand">False</property>
|
164
|
+
<property name="fill">True</property>
|
165
|
+
<property name="position">2</property>
|
166
|
+
</packing>
|
167
|
+
</child>
|
168
|
+
<child>
|
169
|
+
<object class="GtkButton" id="buttonDelete">
|
170
|
+
<property name="label" translatable="yes">Delete Score</property>
|
171
|
+
<property name="visible">True</property>
|
172
|
+
<property name="can_focus">True</property>
|
173
|
+
<property name="receives_default">True</property>
|
174
|
+
</object>
|
175
|
+
<packing>
|
176
|
+
<property name="expand">False</property>
|
177
|
+
<property name="fill">True</property>
|
178
|
+
<property name="position">3</property>
|
179
|
+
</packing>
|
180
|
+
</child>
|
181
|
+
</object>
|
182
|
+
<packing>
|
183
|
+
<property name="expand">False</property>
|
184
|
+
<property name="fill">True</property>
|
185
|
+
<property name="position">2</property>
|
186
|
+
</packing>
|
187
|
+
</child>
|
188
|
+
</object>
|
189
|
+
</child>
|
190
|
+
</object>
|
191
|
+
</interface>
|
@@ -0,0 +1,219 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.16.1 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.0"/>
|
5
|
+
<object class="GtkWindow" id="window1">
|
6
|
+
<property name="can_focus">False</property>
|
7
|
+
<property name="modal">True</property>
|
8
|
+
<child>
|
9
|
+
<object class="GtkBox" id="box1">
|
10
|
+
<property name="visible">True</property>
|
11
|
+
<property name="can_focus">False</property>
|
12
|
+
<property name="margin_left">10</property>
|
13
|
+
<property name="margin_right">10</property>
|
14
|
+
<property name="margin_top">10</property>
|
15
|
+
<property name="margin_bottom">10</property>
|
16
|
+
<property name="orientation">vertical</property>
|
17
|
+
<property name="spacing">10</property>
|
18
|
+
<child>
|
19
|
+
<object class="GtkLabel" id="label6">
|
20
|
+
<property name="visible">True</property>
|
21
|
+
<property name="can_focus">False</property>
|
22
|
+
<property name="label" translatable="yes"><big><big>Enter Score</big></big></property>
|
23
|
+
<property name="use_markup">True</property>
|
24
|
+
</object>
|
25
|
+
<packing>
|
26
|
+
<property name="expand">False</property>
|
27
|
+
<property name="fill">True</property>
|
28
|
+
<property name="position">0</property>
|
29
|
+
</packing>
|
30
|
+
</child>
|
31
|
+
<child>
|
32
|
+
<object class="GtkGrid" id="grid1">
|
33
|
+
<property name="visible">True</property>
|
34
|
+
<property name="can_focus">False</property>
|
35
|
+
<property name="row_spacing">2</property>
|
36
|
+
<property name="column_spacing">5</property>
|
37
|
+
<child>
|
38
|
+
<object class="GtkLabel" id="label4">
|
39
|
+
<property name="visible">True</property>
|
40
|
+
<property name="can_focus">False</property>
|
41
|
+
<property name="xalign">1</property>
|
42
|
+
<property name="label" translatable="yes">Score:</property>
|
43
|
+
</object>
|
44
|
+
<packing>
|
45
|
+
<property name="left_attach">0</property>
|
46
|
+
<property name="top_attach">4</property>
|
47
|
+
<property name="width">1</property>
|
48
|
+
<property name="height">1</property>
|
49
|
+
</packing>
|
50
|
+
</child>
|
51
|
+
<child>
|
52
|
+
<object class="GtkLabel" id="label3">
|
53
|
+
<property name="visible">True</property>
|
54
|
+
<property name="can_focus">False</property>
|
55
|
+
<property name="xalign">1</property>
|
56
|
+
<property name="label" translatable="yes">Course Slope:</property>
|
57
|
+
</object>
|
58
|
+
<packing>
|
59
|
+
<property name="left_attach">0</property>
|
60
|
+
<property name="top_attach">3</property>
|
61
|
+
<property name="width">1</property>
|
62
|
+
<property name="height">1</property>
|
63
|
+
</packing>
|
64
|
+
</child>
|
65
|
+
<child>
|
66
|
+
<object class="GtkLabel" id="label2">
|
67
|
+
<property name="visible">True</property>
|
68
|
+
<property name="can_focus">False</property>
|
69
|
+
<property name="xalign">1</property>
|
70
|
+
<property name="label" translatable="yes">Course Rating:</property>
|
71
|
+
</object>
|
72
|
+
<packing>
|
73
|
+
<property name="left_attach">0</property>
|
74
|
+
<property name="top_attach">2</property>
|
75
|
+
<property name="width">1</property>
|
76
|
+
<property name="height">1</property>
|
77
|
+
</packing>
|
78
|
+
</child>
|
79
|
+
<child>
|
80
|
+
<object class="GtkLabel" id="label1">
|
81
|
+
<property name="visible">True</property>
|
82
|
+
<property name="can_focus">False</property>
|
83
|
+
<property name="xalign">1</property>
|
84
|
+
<property name="label" translatable="yes">Course Name:</property>
|
85
|
+
</object>
|
86
|
+
<packing>
|
87
|
+
<property name="left_attach">0</property>
|
88
|
+
<property name="top_attach">1</property>
|
89
|
+
<property name="width">1</property>
|
90
|
+
<property name="height">1</property>
|
91
|
+
</packing>
|
92
|
+
</child>
|
93
|
+
<child>
|
94
|
+
<object class="GtkLabel" id="label5">
|
95
|
+
<property name="visible">True</property>
|
96
|
+
<property name="can_focus">False</property>
|
97
|
+
<property name="xalign">1</property>
|
98
|
+
<property name="label" translatable="yes">Date:</property>
|
99
|
+
</object>
|
100
|
+
<packing>
|
101
|
+
<property name="left_attach">0</property>
|
102
|
+
<property name="top_attach">0</property>
|
103
|
+
<property name="width">1</property>
|
104
|
+
<property name="height">1</property>
|
105
|
+
</packing>
|
106
|
+
</child>
|
107
|
+
<child>
|
108
|
+
<object class="GtkEntry" id="course_rating">
|
109
|
+
<property name="visible">True</property>
|
110
|
+
<property name="can_focus">True</property>
|
111
|
+
</object>
|
112
|
+
<packing>
|
113
|
+
<property name="left_attach">1</property>
|
114
|
+
<property name="top_attach">2</property>
|
115
|
+
<property name="width">1</property>
|
116
|
+
<property name="height">1</property>
|
117
|
+
</packing>
|
118
|
+
</child>
|
119
|
+
<child>
|
120
|
+
<object class="GtkEntry" id="course_slope">
|
121
|
+
<property name="visible">True</property>
|
122
|
+
<property name="can_focus">True</property>
|
123
|
+
</object>
|
124
|
+
<packing>
|
125
|
+
<property name="left_attach">1</property>
|
126
|
+
<property name="top_attach">3</property>
|
127
|
+
<property name="width">1</property>
|
128
|
+
<property name="height">1</property>
|
129
|
+
</packing>
|
130
|
+
</child>
|
131
|
+
<child>
|
132
|
+
<object class="GtkEntry" id="score">
|
133
|
+
<property name="visible">True</property>
|
134
|
+
<property name="can_focus">True</property>
|
135
|
+
</object>
|
136
|
+
<packing>
|
137
|
+
<property name="left_attach">1</property>
|
138
|
+
<property name="top_attach">4</property>
|
139
|
+
<property name="width">1</property>
|
140
|
+
<property name="height">1</property>
|
141
|
+
</packing>
|
142
|
+
</child>
|
143
|
+
<child>
|
144
|
+
<object class="GtkCalendar" id="date">
|
145
|
+
<property name="visible">True</property>
|
146
|
+
<property name="can_focus">True</property>
|
147
|
+
<property name="year">2017</property>
|
148
|
+
<property name="month">8</property>
|
149
|
+
<property name="day">4</property>
|
150
|
+
</object>
|
151
|
+
<packing>
|
152
|
+
<property name="left_attach">1</property>
|
153
|
+
<property name="top_attach">0</property>
|
154
|
+
<property name="width">1</property>
|
155
|
+
<property name="height">1</property>
|
156
|
+
</packing>
|
157
|
+
</child>
|
158
|
+
<child>
|
159
|
+
<object class="GtkEntry" id="course_name">
|
160
|
+
<property name="visible">True</property>
|
161
|
+
<property name="can_focus">True</property>
|
162
|
+
</object>
|
163
|
+
<packing>
|
164
|
+
<property name="left_attach">1</property>
|
165
|
+
<property name="top_attach">1</property>
|
166
|
+
<property name="width">1</property>
|
167
|
+
<property name="height">1</property>
|
168
|
+
</packing>
|
169
|
+
</child>
|
170
|
+
</object>
|
171
|
+
<packing>
|
172
|
+
<property name="expand">False</property>
|
173
|
+
<property name="fill">True</property>
|
174
|
+
<property name="position">1</property>
|
175
|
+
</packing>
|
176
|
+
</child>
|
177
|
+
<child>
|
178
|
+
<object class="GtkButtonBox" id="buttonbox1">
|
179
|
+
<property name="visible">True</property>
|
180
|
+
<property name="can_focus">False</property>
|
181
|
+
<property name="spacing">5</property>
|
182
|
+
<property name="layout_style">end</property>
|
183
|
+
<child>
|
184
|
+
<object class="GtkButton" id="buttonSave">
|
185
|
+
<property name="label" translatable="yes">Save</property>
|
186
|
+
<property name="visible">True</property>
|
187
|
+
<property name="can_focus">True</property>
|
188
|
+
<property name="receives_default">True</property>
|
189
|
+
</object>
|
190
|
+
<packing>
|
191
|
+
<property name="expand">False</property>
|
192
|
+
<property name="fill">True</property>
|
193
|
+
<property name="position">0</property>
|
194
|
+
</packing>
|
195
|
+
</child>
|
196
|
+
<child>
|
197
|
+
<object class="GtkButton" id="buttonCancel">
|
198
|
+
<property name="label" translatable="yes">Cancel</property>
|
199
|
+
<property name="visible">True</property>
|
200
|
+
<property name="can_focus">True</property>
|
201
|
+
<property name="receives_default">True</property>
|
202
|
+
</object>
|
203
|
+
<packing>
|
204
|
+
<property name="expand">False</property>
|
205
|
+
<property name="fill">True</property>
|
206
|
+
<property name="position">1</property>
|
207
|
+
</packing>
|
208
|
+
</child>
|
209
|
+
</object>
|
210
|
+
<packing>
|
211
|
+
<property name="expand">False</property>
|
212
|
+
<property name="fill">True</property>
|
213
|
+
<property name="position">2</property>
|
214
|
+
</packing>
|
215
|
+
</child>
|
216
|
+
</object>
|
217
|
+
</child>
|
218
|
+
</object>
|
219
|
+
</interface>
|
data/lib/Alert.rb
CHANGED
data/lib/vrlib.rb
CHANGED
data/src/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION = "3.2.
|
1
|
+
VERSION = "3.2.2"
|
data/vr
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: visualruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Cunningham
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir:
|
10
10
|
- "."
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gtk3
|
@@ -25,20 +25,6 @@ dependencies:
|
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 3.2.4
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: cairo
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - '='
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: 1.15.12
|
35
|
-
type: :runtime
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - '='
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: 1.15.12
|
42
28
|
- !ruby/object:Gem::Dependency
|
43
29
|
name: gtksourceview3
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -57,16 +43,16 @@ dependencies:
|
|
57
43
|
name: require_all
|
58
44
|
requirement: !ruby/object:Gem::Requirement
|
59
45
|
requirements:
|
60
|
-
- -
|
46
|
+
- - '='
|
61
47
|
- !ruby/object:Gem::Version
|
62
|
-
version: '1.
|
48
|
+
version: '1.4'
|
63
49
|
type: :runtime
|
64
50
|
prerelease: false
|
65
51
|
version_requirements: !ruby/object:Gem::Requirement
|
66
52
|
requirements:
|
67
|
-
- -
|
53
|
+
- - '='
|
68
54
|
- !ruby/object:Gem::Version
|
69
|
-
version: '1.
|
55
|
+
version: '1.4'
|
70
56
|
description: |-
|
71
57
|
Visualruby is a complete IDE for making graphical user interfaces with ruby. It utilizes glade interface designer to create windows, and uses a library of GUI helpers to make coding GTK+ programs easy. The IDE really helps you organize your files and your thoughts because it names your ruby files and glade files by a naming convention. You files take on the names MyClass.rb, and MyClass.glade. Then you can easily edit the GUI (glade file) by right clicking on your class's file.
|
72
58
|
It also creates .gemspec files for you, then you can right-click on the .gemspec file to install it, or upload it to rubygems.org. You can also yank your gems with one click.
|
@@ -145,6 +131,11 @@ files:
|
|
145
131
|
- "./examples/filetreeview/img/rb.png"
|
146
132
|
- "./examples/filetreeview/img/unknown.png"
|
147
133
|
- "./examples/filetreeview/main.rb"
|
134
|
+
- "./examples/golf_handicap/.vr_settings.yaml"
|
135
|
+
- "./examples/golf_handicap/src/Handicap.rb"
|
136
|
+
- "./examples/golf_handicap/src/Score.rb"
|
137
|
+
- "./examples/golf_handicap/src/glade/Handicap.glade"
|
138
|
+
- "./examples/golf_handicap/src/glade/Score.glade"
|
148
139
|
- "./examples/listview/.vr_settings.yaml"
|
149
140
|
- "./examples/listview/bin/SongListView.rb"
|
150
141
|
- "./examples/listview/bin/SongListViewGUI.rb"
|