golf_handicap 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/golf_handicap +15 -0
- data/src/Handicap.rb +106 -0
- data/src/MyClass.rb +15 -0
- data/src/Score.rb +37 -0
- data/src/glade/Handicap.glade +167 -0
- data/src/glade/MyClass.glade +36 -0
- data/src/glade/Score.glade +219 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e4700b1ee0e264213b81eef94737d773012f5e12
|
4
|
+
data.tar.gz: b3bfc7a01beb13d00c2eb01db06f1467fce4bd96
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6061fe78d5e68648e6a3178df786932ed105069e67f1172b83e2acc63a0ddab3c046e35d052bddd7ba086544fe0eb08da2435642ac23090e4553ead8a9ecdf75
|
7
|
+
data.tar.gz: 5e193c9f48891eb56ac5df734a786e17d98f0950b531273569494a21fb31c9385b8091166d32e4dc6d4503ba88c8487c6b6614619b849a3d2cadb0aeeb655aeb
|
data/golf_handicap
ADDED
data/src/Handicap.rb
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
class Handicap
|
2
|
+
|
3
|
+
include GladeGUI
|
4
|
+
|
5
|
+
def initialize()
|
6
|
+
@scores = []
|
7
|
+
@name = "<big><big><big><big><big>Your Name Here</big></big></big></big></big>"
|
8
|
+
end
|
9
|
+
|
10
|
+
def buttonEnterName__clicked(*a)
|
11
|
+
if name = alert("Enter Your Name", input_text: "")
|
12
|
+
@name = @builder[:name].label = "<big><big><big><big><big>#{name}</big></big></big></big></big>"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def before_show()
|
17
|
+
@view = VR::ListView.new(rnd: String, date: VR::Col::CalendarCol,
|
18
|
+
course: String, rating_slope: String, score: String, diff: Score,
|
19
|
+
handicap: String)
|
20
|
+
@view.col_xalign(diff: 1, handicap: 1, score: 1)
|
21
|
+
@view.show
|
22
|
+
refresh()
|
23
|
+
end
|
24
|
+
|
25
|
+
def refresh()
|
26
|
+
update_handicaps
|
27
|
+
@view.model.clear
|
28
|
+
i = 1
|
29
|
+
@scores.each do |s|
|
30
|
+
row = @view.add_row()
|
31
|
+
row[:rnd] = "#{i}."
|
32
|
+
i += 1
|
33
|
+
row[:date] = VR::Col::CalendarCol.new(s.date, :format => "%d %b %Y ", :hide_time=>true, :hide_date => false)
|
34
|
+
row[:course] = s.course_name
|
35
|
+
row[:score] = s.score
|
36
|
+
row[:rating_slope] = "#{s.course_rating.to_s}/#{s.course_slope.to_s}"
|
37
|
+
row[:diff] = s
|
38
|
+
row[:handicap] = s.handicap
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def buttonAdd__clicked(*a)
|
43
|
+
if row = @view.selected_rows.first
|
44
|
+
course = row[:course]
|
45
|
+
rating, slope = row[:rating_slope].split("/")
|
46
|
+
else
|
47
|
+
course = rating = slope = ""
|
48
|
+
end
|
49
|
+
score = Score.new(course, rating, slope)
|
50
|
+
score.show_glade
|
51
|
+
if !score.used.nil? and score.score.to_i > 50
|
52
|
+
@scores << score
|
53
|
+
@scores.sort! { |x,y| y.date <=> x.date }
|
54
|
+
refresh()
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def update_handicaps
|
59
|
+
@scores.each_index do |i|
|
60
|
+
fill_handicap(@scores[@scores.size-i-1..@scores.size-1])
|
61
|
+
end
|
62
|
+
@scores.each {|s| s.used = ""}
|
63
|
+
fill_handicap(@scores)
|
64
|
+
@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]
|
65
|
+
end
|
66
|
+
|
67
|
+
def fill_handicap(score_array)
|
68
|
+
score_ar = score_array.size > 20 ? score_array[0..19] : score_array
|
69
|
+
count = use_count(score_ar) # number of scores to use for handicap
|
70
|
+
best_scores = score_ar.sort { |x,y| x.diff <=> y.diff }
|
71
|
+
best_scores = count > 0 ? best_scores[0..count-1] : []
|
72
|
+
best_scores.each {|s| s.used = "y"}
|
73
|
+
tot = best_scores.inject(0) { |sum, s| sum + s.diff }
|
74
|
+
x = (0.96*tot/count).to_s
|
75
|
+
score_array[0].handicap = count > 0 ? x[0..x.index(".")+1] : "n/a" if score_array[0]
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
def window1__delete_event(*)
|
80
|
+
@view = nil
|
81
|
+
VR::save_yaml(self)
|
82
|
+
return false #ok to close
|
83
|
+
end
|
84
|
+
|
85
|
+
def use_count(score_ar)
|
86
|
+
if score_ar.size > 20
|
87
|
+
return 10
|
88
|
+
else
|
89
|
+
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]
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def buttonDelete__clicked(*a)
|
94
|
+
return unless row = @view.selected_rows.first
|
95
|
+
if alert("Are you sure you want to delete this score?", button_yes: "Delete", button_no: "Cancel")
|
96
|
+
@scores.delete(row[:diff])
|
97
|
+
refresh
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
def buttonEditScore__clicked(*a)
|
102
|
+
return unless row = @view.selected_rows.first
|
103
|
+
row[:diff].show_glade
|
104
|
+
refresh
|
105
|
+
end
|
106
|
+
end
|
data/src/MyClass.rb
ADDED
data/src/Score.rb
ADDED
@@ -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,167 @@
|
|
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">600</property>
|
7
|
+
<property name="height_request">660</property>
|
8
|
+
<property name="can_focus">False</property>
|
9
|
+
<property name="title" translatable="yes">Dudemen Handicap-O-Matic</property>
|
10
|
+
<property name="modal">True</property>
|
11
|
+
<child>
|
12
|
+
<object class="GtkBox" id="box1">
|
13
|
+
<property name="visible">True</property>
|
14
|
+
<property name="can_focus">False</property>
|
15
|
+
<property name="margin_left">10</property>
|
16
|
+
<property name="margin_right">10</property>
|
17
|
+
<property name="margin_top">10</property>
|
18
|
+
<property name="margin_bottom">10</property>
|
19
|
+
<property name="orientation">vertical</property>
|
20
|
+
<property name="spacing">10</property>
|
21
|
+
<child>
|
22
|
+
<object class="GtkBox" id="box2">
|
23
|
+
<property name="visible">True</property>
|
24
|
+
<property name="can_focus">False</property>
|
25
|
+
<property name="spacing">20</property>
|
26
|
+
<child>
|
27
|
+
<object class="GtkLabel" id="name">
|
28
|
+
<property name="visible">True</property>
|
29
|
+
<property name="can_focus">False</property>
|
30
|
+
<property name="label" translatable="yes"><big><big><big><big>Eric Cunningham</big></big></big></big></property>
|
31
|
+
<property name="use_markup">True</property>
|
32
|
+
</object>
|
33
|
+
<packing>
|
34
|
+
<property name="expand">True</property>
|
35
|
+
<property name="fill">True</property>
|
36
|
+
<property name="position">0</property>
|
37
|
+
</packing>
|
38
|
+
</child>
|
39
|
+
<child>
|
40
|
+
<object class="GtkFrame" id="frame1">
|
41
|
+
<property name="visible">True</property>
|
42
|
+
<property name="can_focus">False</property>
|
43
|
+
<property name="label_xalign">0</property>
|
44
|
+
<property name="shadow_type">in</property>
|
45
|
+
<child>
|
46
|
+
<object class="GtkAlignment" id="alignment1">
|
47
|
+
<property name="visible">True</property>
|
48
|
+
<property name="can_focus">False</property>
|
49
|
+
<property name="left_padding">12</property>
|
50
|
+
<child>
|
51
|
+
<object class="GtkLabel" id="handicap">
|
52
|
+
<property name="visible">True</property>
|
53
|
+
<property name="can_focus">False</property>
|
54
|
+
<property name="label" translatable="yes"><big><big><big><big><big><big><big><big>18.1</big></big></big></big></big></big></big></big></property>
|
55
|
+
<property name="use_markup">True</property>
|
56
|
+
</object>
|
57
|
+
</child>
|
58
|
+
</object>
|
59
|
+
</child>
|
60
|
+
<child type="label">
|
61
|
+
<object class="GtkLabel" id="label2">
|
62
|
+
<property name="visible">True</property>
|
63
|
+
<property name="can_focus">False</property>
|
64
|
+
<property name="label" translatable="yes">Handicap</property>
|
65
|
+
<property name="justify">center</property>
|
66
|
+
</object>
|
67
|
+
</child>
|
68
|
+
</object>
|
69
|
+
<packing>
|
70
|
+
<property name="expand">False</property>
|
71
|
+
<property name="fill">True</property>
|
72
|
+
<property name="position">1</property>
|
73
|
+
</packing>
|
74
|
+
</child>
|
75
|
+
</object>
|
76
|
+
<packing>
|
77
|
+
<property name="expand">False</property>
|
78
|
+
<property name="fill">True</property>
|
79
|
+
<property name="position">0</property>
|
80
|
+
</packing>
|
81
|
+
</child>
|
82
|
+
<child>
|
83
|
+
<object class="GtkScrolledWindow" id="view">
|
84
|
+
<property name="visible">True</property>
|
85
|
+
<property name="can_focus">True</property>
|
86
|
+
<property name="hexpand">True</property>
|
87
|
+
<property name="vexpand">True</property>
|
88
|
+
<property name="shadow_type">in</property>
|
89
|
+
<child>
|
90
|
+
<placeholder/>
|
91
|
+
</child>
|
92
|
+
</object>
|
93
|
+
<packing>
|
94
|
+
<property name="expand">False</property>
|
95
|
+
<property name="fill">True</property>
|
96
|
+
<property name="position">1</property>
|
97
|
+
</packing>
|
98
|
+
</child>
|
99
|
+
<child>
|
100
|
+
<object class="GtkButtonBox" id="buttonbox1">
|
101
|
+
<property name="visible">True</property>
|
102
|
+
<property name="can_focus">False</property>
|
103
|
+
<property name="spacing">5</property>
|
104
|
+
<property name="layout_style">end</property>
|
105
|
+
<child>
|
106
|
+
<object class="GtkButton" id="buttonEnterName">
|
107
|
+
<property name="label" translatable="yes">Enter Name</property>
|
108
|
+
<property name="visible">True</property>
|
109
|
+
<property name="can_focus">True</property>
|
110
|
+
<property name="receives_default">True</property>
|
111
|
+
</object>
|
112
|
+
<packing>
|
113
|
+
<property name="expand">False</property>
|
114
|
+
<property name="fill">True</property>
|
115
|
+
<property name="position">0</property>
|
116
|
+
</packing>
|
117
|
+
</child>
|
118
|
+
<child>
|
119
|
+
<object class="GtkButton" id="buttonAdd">
|
120
|
+
<property name="label" translatable="yes">Add Score</property>
|
121
|
+
<property name="visible">True</property>
|
122
|
+
<property name="can_focus">True</property>
|
123
|
+
<property name="receives_default">True</property>
|
124
|
+
</object>
|
125
|
+
<packing>
|
126
|
+
<property name="expand">False</property>
|
127
|
+
<property name="fill">True</property>
|
128
|
+
<property name="position">1</property>
|
129
|
+
</packing>
|
130
|
+
</child>
|
131
|
+
<child>
|
132
|
+
<object class="GtkButton" id="buttonEditScore">
|
133
|
+
<property name="label" translatable="yes">Edit Score</property>
|
134
|
+
<property name="visible">True</property>
|
135
|
+
<property name="can_focus">True</property>
|
136
|
+
<property name="receives_default">True</property>
|
137
|
+
</object>
|
138
|
+
<packing>
|
139
|
+
<property name="expand">False</property>
|
140
|
+
<property name="fill">True</property>
|
141
|
+
<property name="position">2</property>
|
142
|
+
</packing>
|
143
|
+
</child>
|
144
|
+
<child>
|
145
|
+
<object class="GtkButton" id="buttonDelete">
|
146
|
+
<property name="label" translatable="yes">Delete Score</property>
|
147
|
+
<property name="visible">True</property>
|
148
|
+
<property name="can_focus">True</property>
|
149
|
+
<property name="receives_default">True</property>
|
150
|
+
</object>
|
151
|
+
<packing>
|
152
|
+
<property name="expand">False</property>
|
153
|
+
<property name="fill">True</property>
|
154
|
+
<property name="position">3</property>
|
155
|
+
</packing>
|
156
|
+
</child>
|
157
|
+
</object>
|
158
|
+
<packing>
|
159
|
+
<property name="expand">False</property>
|
160
|
+
<property name="fill">True</property>
|
161
|
+
<property name="position">2</property>
|
162
|
+
</packing>
|
163
|
+
</child>
|
164
|
+
</object>
|
165
|
+
</child>
|
166
|
+
</object>
|
167
|
+
</interface>
|
@@ -0,0 +1,36 @@
|
|
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="window_position">center</property>
|
8
|
+
<child>
|
9
|
+
<object class="GtkButtonBox" id="buttonbox1">
|
10
|
+
<property name="visible">True</property>
|
11
|
+
<property name="can_focus">False</property>
|
12
|
+
<property name="halign">center</property>
|
13
|
+
<property name="valign">center</property>
|
14
|
+
<property name="margin_left">50</property>
|
15
|
+
<property name="margin_right">50</property>
|
16
|
+
<property name="margin_top">50</property>
|
17
|
+
<property name="margin_bottom">50</property>
|
18
|
+
<property name="orientation">vertical</property>
|
19
|
+
<property name="layout_style">start</property>
|
20
|
+
<child>
|
21
|
+
<object class="GtkButton" id="button1">
|
22
|
+
<property name="label" translatable="yes">button</property>
|
23
|
+
<property name="visible">True</property>
|
24
|
+
<property name="can_focus">True</property>
|
25
|
+
<property name="receives_default">True</property>
|
26
|
+
</object>
|
27
|
+
<packing>
|
28
|
+
<property name="expand">True</property>
|
29
|
+
<property name="fill">True</property>
|
30
|
+
<property name="position">0</property>
|
31
|
+
</packing>
|
32
|
+
</child>
|
33
|
+
</object>
|
34
|
+
</child>
|
35
|
+
</object>
|
36
|
+
</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>
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: golf_handicap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Eric Cunningham
|
8
|
+
autorequire:
|
9
|
+
bindir:
|
10
|
+
- "."
|
11
|
+
cert_chain: []
|
12
|
+
date: 2017-09-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: visualruby
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 3.0.18
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 3.0.18
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: require_all
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.2.0
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.2.0
|
42
|
+
description: Calculates your USGA handicap. Just enter your scores, and this calculator
|
43
|
+
will calculate your golf handicap index using the exact formula that the USGA uses.
|
44
|
+
email: you@yoursite.com
|
45
|
+
executables:
|
46
|
+
- golf_handicap
|
47
|
+
extensions: []
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- "./golf_handicap"
|
51
|
+
- src/Handicap.rb
|
52
|
+
- src/MyClass.rb
|
53
|
+
- src/Score.rb
|
54
|
+
- src/glade/Handicap.glade
|
55
|
+
- src/glade/MyClass.glade
|
56
|
+
- src/glade/Score.glade
|
57
|
+
homepage: http://visualruby.net/
|
58
|
+
licenses: []
|
59
|
+
metadata: {}
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options: []
|
62
|
+
require_paths:
|
63
|
+
- lib
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
requirements: []
|
75
|
+
rubyforge_project: nowarning
|
76
|
+
rubygems_version: 2.5.1
|
77
|
+
signing_key:
|
78
|
+
specification_version: 4
|
79
|
+
summary: Calculates your USGA handicap.
|
80
|
+
test_files: []
|