kita 0.6.0 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddc231f376bc9f90a03aea5a93c459b69ada02a0633400419e20a7ce3887bcde
4
- data.tar.gz: df3c096cdbbc3570d834d6393d623c8a5548872344114ec55ae7c56c21e730a5
3
+ metadata.gz: 9711a0da8f810049a096344ec961730fd5dd80f65c5cf651c5af7921c3a13fd3
4
+ data.tar.gz: d3edfe79eedc16dc3fb35d5758c9476d3a71e5e102c68e6ed09be906d4ee3587
5
5
  SHA512:
6
- metadata.gz: 4abaf6436175474903db12f872fda3474df6446419c39f68b198f6059150b179b292cbbc96f37fe0eca3c2607cd1210f97ffe5a0460776b5178f9d016d66d16a
7
- data.tar.gz: d5973d6b46e3f3fbaf0c1f22e548eafc56a0e8a6941d3eeaa55df4d272afaee9792c67e1d869c2262861531654613af102b451ba3caaae73c679df2817b076db
6
+ metadata.gz: b342a9ba97d484c52b2ab8500f21560be2be295868784d5e5dc015f37af2a9f466e3a2966ddae4c69572bb035fc7b0575918f22701a0b687412ba0463e23ba1e
7
+ data.tar.gz: d1024783d109e846e817d7c8a55ab0812062fd0f6c2171d83a0e2b4931d6a3867e0ad9617aaf2021053443a5465f799d903e5af7e708c9f61e46af5f688c6ac2
@@ -1,7 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kita (0.5.8)
4
+ <<<<<<< Updated upstream
5
+ kita (0.6.0)
6
+ =======
7
+ kita (0.6.1)
8
+ >>>>>>> Stashed changes
5
9
  config (~> 2.2)
6
10
  gir_ffi (~> 0.15.2)
7
11
  gstreamer (~> 3.4)
data/README.md CHANGED
@@ -1 +1,3 @@
1
- # Kita
1
+ # <img width="60" height="60" alt="Kita Logo" src="https://raw.githubusercontent.com/danbishop/kita/master/ui/kita-bordered.svg?sanitize=true"> Kita
2
+
3
+ A small GTK app to help learn the Japanese kana systems.
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.version = Kita::VERSION
8
8
  spec.authors = ['Dan Bishop']
9
9
  spec.email = ['d@nbishop.uk']
10
- spec.license = 'GPLv3+'
10
+ spec.license = 'GPL-3.0+'
11
11
 
12
12
  spec.summary = 'A Japanese kana learning tool.'
13
13
  spec.description = <<-DESC
@@ -19,15 +19,8 @@ module Kita
19
19
  @button_signals = {}
20
20
  @sound = Audio.new
21
21
  new_question
22
- menu_setup
23
- build_main_window
24
- end
25
-
26
- def menu_setup
27
- setup_hiragana_switch
28
- setup_katakana_switch
29
- setup_sound_switch
30
22
  setup_about_box
23
+ build_main_window
31
24
  end
32
25
 
33
26
  def setup_about_box
@@ -44,24 +37,6 @@ module Kita
44
37
  @sound.repeat
45
38
  end
46
39
 
47
- def setup_hiragana_switch
48
- @builder['hiragana_switch'].signal_connect('notify::active') do
49
- toggle_hiragana
50
- end
51
- end
52
-
53
- def setup_katakana_switch
54
- @builder['katakana_switch'].signal_connect('notify::active') do
55
- toggle_katakana
56
- end
57
- end
58
-
59
- def setup_sound_switch
60
- @builder['sound_switch'].signal_connect('notify::active') do
61
- toggle_sound
62
- end
63
- end
64
-
65
40
  def toggle_katakana
66
41
  Settings.katakana = !Settings.katakana
67
42
  (@builder['hiragana_switch'].set_active(true) && Settings.hiragana = true) if !Settings.katakana && !Settings.hiragana
@@ -1,8 +1,26 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'config'
4
+ require 'fileutils'
4
5
 
5
- Config.load_and_set_settings(Config.setting_files('~/kita.yaml', 'kita'))
6
- Settings.speak = true
7
- Settings.hiragana = true
8
- Settings.katakana = false
6
+ # Set config directory and create it if it doesn't exist
7
+ CONF_DIR = "#{ENV['HOME']}/.config/kita"
8
+ CONF_FILE = "#{CONF_DIR}/config.yaml"
9
+ FileUtils.mkdir_p(CONF_DIR) unless File.exist?(CONF_DIR)
10
+
11
+ def save_settings
12
+ puts 'Saved settings'
13
+ File.open(CONF_FILE, 'w') { |file| file.write(Settings.to_hash.to_yaml) }
14
+ end
15
+
16
+ if File.exist?(CONF_FILE)
17
+ puts 'Loaded settings'
18
+ Config.load_and_set_settings(CONF_FILE)
19
+ else
20
+ puts 'No settings detected, first run? Using defaults.'
21
+ Config.load_and_set_settings(CONF_FILE)
22
+ Settings.speak = true
23
+ Settings.hiragana = true
24
+ Settings.katakana = false
25
+ save_settings
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kita
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
@@ -1,5 +1,5 @@
1
1
  name: kita
2
- version: '0.6.0'
2
+ version: '0.6.1'
3
3
  summary: Japanese learning tool
4
4
  description: |
5
5
  A simple tool to help Japanese language learners.
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- Generated with glade 3.22.2
2
+ <!-- Generated with glade 3.22.2
3
3
 
4
4
  Copyright (C)
5
5
 
@@ -99,6 +99,7 @@ Author: Dan Bishop
99
99
  <property name="margin_top">5</property>
100
100
  <property name="margin_bottom">5</property>
101
101
  <property name="active">True</property>
102
+ <signal name="notify::active" handler="toggle_hiragana" swapped="no"/>
102
103
  </object>
103
104
  <packing>
104
105
  <property name="expand">False</property>
@@ -142,6 +143,7 @@ Author: Dan Bishop
142
143
  <property name="margin_left">10</property>
143
144
  <property name="margin_top">5</property>
144
145
  <property name="margin_bottom">5</property>
146
+ <signal name="notify::active" handler="toggle_katakana" swapped="no"/>
145
147
  </object>
146
148
  <packing>
147
149
  <property name="expand">False</property>
@@ -186,6 +188,7 @@ Author: Dan Bishop
186
188
  <property name="margin_top">5</property>
187
189
  <property name="margin_bottom">5</property>
188
190
  <property name="active">True</property>
191
+ <signal name="notify::active" handler="toggle_sound" swapped="no"/>
189
192
  </object>
190
193
  <packing>
191
194
  <property name="expand">False</property>
@@ -314,60 +317,60 @@ Author: Dan Bishop
314
317
  <property name="visible">True</property>
315
318
  <property name="can_focus">False</property>
316
319
  <child>
317
- <object class="GtkButton" id="answer_d">
318
- <property name="label">d</property>
320
+ <object class="GtkButton" id="answer_a">
321
+ <property name="label">a</property>
319
322
  <property name="visible">True</property>
320
323
  <property name="can_focus">False</property>
321
324
  <property name="receives_default">True</property>
322
325
  <property name="hexpand">True</property>
323
- <accelerator key="4" signal="clicked"/>
324
- <accelerator key="KP_4" signal="clicked"/>
325
- <accelerator key="f" signal="clicked"/>
326
+ <accelerator key="a" signal="clicked"/>
327
+ <accelerator key="KP_1" signal="clicked"/>
328
+ <accelerator key="1" signal="clicked"/>
326
329
  </object>
327
330
  <packing>
328
331
  <property name="position">0</property>
329
332
  </packing>
330
333
  </child>
331
334
  <child>
332
- <object class="GtkButton" id="answer_c">
333
- <property name="label">c</property>
335
+ <object class="GtkButton" id="answer_b">
336
+ <property name="label">b</property>
334
337
  <property name="visible">True</property>
335
338
  <property name="can_focus">False</property>
336
339
  <property name="receives_default">True</property>
337
340
  <property name="hexpand">True</property>
338
- <accelerator key="3" signal="clicked"/>
339
- <accelerator key="KP_3" signal="clicked"/>
340
- <accelerator key="d" signal="clicked"/>
341
+ <accelerator key="s" signal="clicked"/>
342
+ <accelerator key="KP_2" signal="clicked"/>
343
+ <accelerator key="2" signal="clicked"/>
341
344
  </object>
342
345
  <packing>
343
346
  <property name="position">0</property>
344
347
  </packing>
345
348
  </child>
346
349
  <child>
347
- <object class="GtkButton" id="answer_b">
348
- <property name="label">b</property>
350
+ <object class="GtkButton" id="answer_c">
351
+ <property name="label">c</property>
349
352
  <property name="visible">True</property>
350
353
  <property name="can_focus">False</property>
351
354
  <property name="receives_default">True</property>
352
355
  <property name="hexpand">True</property>
353
- <accelerator key="2" signal="clicked"/>
354
- <accelerator key="KP_2" signal="clicked"/>
355
- <accelerator key="s" signal="clicked"/>
356
+ <accelerator key="d" signal="clicked"/>
357
+ <accelerator key="KP_3" signal="clicked"/>
358
+ <accelerator key="3" signal="clicked"/>
356
359
  </object>
357
360
  <packing>
358
361
  <property name="position">0</property>
359
362
  </packing>
360
363
  </child>
361
364
  <child>
362
- <object class="GtkButton" id="answer_a">
363
- <property name="label">a</property>
365
+ <object class="GtkButton" id="answer_d">
366
+ <property name="label">d</property>
364
367
  <property name="visible">True</property>
365
368
  <property name="can_focus">False</property>
366
369
  <property name="receives_default">True</property>
367
370
  <property name="hexpand">True</property>
368
- <accelerator key="1" signal="clicked"/>
369
- <accelerator key="KP_1" signal="clicked"/>
370
- <accelerator key="a" signal="clicked"/>
371
+ <accelerator key="f" signal="clicked"/>
372
+ <accelerator key="KP_4" signal="clicked"/>
373
+ <accelerator key="4" signal="clicked"/>
371
374
  </object>
372
375
  <packing>
373
376
  <property name="position">0</property>
@@ -0,0 +1,141 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ width="50mm"
13
+ height="50mm"
14
+ viewBox="0 0 50 50"
15
+ version="1.1"
16
+ id="svg8"
17
+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18
+ sodipodi:docname="kita-bordered.svg">
19
+ <defs
20
+ id="defs2">
21
+ <filter
22
+ style="color-interpolation-filters:sRGB"
23
+ id="filter987"
24
+ inkscape:label="filter0" />
25
+ <filter
26
+ style="color-interpolation-filters:sRGB"
27
+ inkscape:label="Noise Fill"
28
+ id="filter1667">
29
+ <feTurbulence
30
+ type="fractalNoise"
31
+ baseFrequency="0.02 0.04"
32
+ numOctaves="5"
33
+ seed="1"
34
+ result="turbulence"
35
+ id="feTurbulence1651" />
36
+ <feComposite
37
+ in="SourceGraphic"
38
+ in2="turbulence"
39
+ operator="in"
40
+ result="composite1"
41
+ id="feComposite1653" />
42
+ <feColorMatrix
43
+ values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 3 -1 "
44
+ result="color"
45
+ id="feColorMatrix1655" />
46
+ <feFlood
47
+ flood-opacity="1"
48
+ flood-color="rgb(21,40,57)"
49
+ result="flood"
50
+ id="feFlood1657" />
51
+ <feMerge
52
+ result="merge"
53
+ id="feMerge1663">
54
+ <feMergeNode
55
+ in="flood"
56
+ id="feMergeNode1659" />
57
+ <feMergeNode
58
+ in="color"
59
+ id="feMergeNode1661" />
60
+ </feMerge>
61
+ <feComposite
62
+ in2="SourceGraphic"
63
+ operator="in"
64
+ result="composite2"
65
+ id="feComposite1665" />
66
+ </filter>
67
+ </defs>
68
+ <sodipodi:namedview
69
+ id="base"
70
+ pagecolor="#000000"
71
+ bordercolor="#666666"
72
+ borderopacity="1.0"
73
+ inkscape:pageopacity="0"
74
+ inkscape:pageshadow="2"
75
+ inkscape:zoom="3.959798"
76
+ inkscape:cx="167.12072"
77
+ inkscape:cy="67.639258"
78
+ inkscape:document-units="mm"
79
+ inkscape:current-layer="layer1"
80
+ showgrid="false"
81
+ inkscape:window-width="3368"
82
+ inkscape:window-height="1376"
83
+ inkscape:window-x="72"
84
+ inkscape:window-y="27"
85
+ inkscape:window-maximized="1"
86
+ fit-margin-top="0"
87
+ fit-margin-left="0"
88
+ fit-margin-right="0"
89
+ fit-margin-bottom="0"
90
+ inkscape:pagecheckerboard="true" />
91
+ <metadata
92
+ id="metadata5">
93
+ <rdf:RDF>
94
+ <cc:Work
95
+ rdf:about="">
96
+ <dc:format>image/svg+xml</dc:format>
97
+ <dc:type
98
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
99
+ <dc:title />
100
+ </cc:Work>
101
+ </rdf:RDF>
102
+ </metadata>
103
+ <g
104
+ inkscape:label="Layer 1"
105
+ inkscape:groupmode="layer"
106
+ id="layer1"
107
+ transform="translate(-25.905403,-105.02035)">
108
+ <text
109
+ xml:space="preserve"
110
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:Ubuntu;-inkscape-font-specification:Ubuntu;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
111
+ x="46.869045"
112
+ y="115.57143"
113
+ id="text817"><tspan
114
+ sodipodi:role="line"
115
+ id="tspan815"
116
+ x="46.869045"
117
+ y="125.4403"
118
+ style="stroke-width:0.26458332" /></text>
119
+ <circle
120
+ style="opacity:1;fill:#808080;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill"
121
+ id="path3017"
122
+ cx="50.905403"
123
+ cy="130.02036"
124
+ r="25" />
125
+ <circle
126
+ cy="130.02036"
127
+ cx="50.905403"
128
+ id="circle827"
129
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.49000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill"
130
+ r="24.5" />
131
+ <g
132
+ aria-label="北"
133
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.4786377px;line-height:1.25;font-family:Ubuntu;-inkscape-font-specification:Ubuntu;letter-spacing:0px;word-spacing:0px;fill:#d40000;fill-opacity:1;stroke:none;stroke-width:0.96196598"
134
+ id="text2913">
135
+ <path
136
+ d="m 42.82489,120.95864 h -9.080958 v 4.57896 h 9.080958 v 9.31183 c -3.886342,1.38523 -7.811163,2.73198 -10.427711,3.50155 l 2.039368,4.6944 c 2.501112,-1.03893 5.463967,-2.27024 8.388343,-3.54004 v 7.88812 h 4.80983 v -34.90012 h -4.80983 z m 16.007114,21.58651 c -1.385231,0 -1.616103,-0.26935 -1.616103,-2.42415 v -11.23576 c 3.770906,-1.96241 7.811163,-4.23265 11.197283,-6.54137 l -3.309163,-4.11722 c -2.116325,1.8085 -4.963744,3.9633 -7.88812,5.84876 v -11.54359 h -4.732873 v 27.51222 c 0,5.42549 1.269795,7.04159 5.65636,7.04159 h 5.156138 c 4.309607,0 5.425487,-2.84742 5.887231,-10.19684 -1.269795,-0.26935 -3.270684,-1.19283 -4.386565,-2.07784 -0.26935,6.19506 -0.500222,7.7342 -1.96241,7.7342 z"
137
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu Bold';fill:#d40000;stroke-width:0.96196598"
138
+ id="path827" />
139
+ </g>
140
+ </g>
141
+ </svg>
@@ -73,10 +73,10 @@
73
73
  inkscape:pageopacity="0"
74
74
  inkscape:pageshadow="2"
75
75
  inkscape:zoom="0.7"
76
- inkscape:cx="337.63766"
77
- inkscape:cy="-256.1795"
76
+ inkscape:cx="72.63766"
77
+ inkscape:cy="-261.89379"
78
78
  inkscape:document-units="mm"
79
- inkscape:current-layer="layer1"
79
+ inkscape:current-layer="text2913"
80
80
  showgrid="false"
81
81
  inkscape:window-width="3368"
82
82
  inkscape:window-height="1376"
@@ -96,7 +96,7 @@
96
96
  <dc:format>image/svg+xml</dc:format>
97
97
  <dc:type
98
98
  rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
99
- <dc:title></dc:title>
99
+ <dc:title />
100
100
  </cc:Work>
101
101
  </rdf:RDF>
102
102
  </metadata>
@@ -122,16 +122,14 @@
122
122
  cx="50.905403"
123
123
  cy="130.02036"
124
124
  r="25" />
125
- <text
126
- xml:space="preserve"
125
+ <g
126
+ aria-label=""
127
127
  style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.4786377px;line-height:1.25;font-family:Ubuntu;-inkscape-font-specification:Ubuntu;letter-spacing:0px;word-spacing:0px;fill:#d40000;fill-opacity:1;stroke:none;stroke-width:0.96196598"
128
- x="31.512171"
129
- y="144.46909"
130
- id="text2913"><tspan
131
- sodipodi:role="line"
132
- id="tspan2911"
133
- x="31.512171"
134
- y="144.46909"
135
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu Bold';fill:#d40000;stroke-width:0.96196598">北</tspan></text>
128
+ id="text2913">
129
+ <path
130
+ d="m 42.82489,120.95864 h -9.080958 v 4.57896 h 9.080958 v 9.31183 c -3.886342,1.38523 -7.811163,2.73198 -10.427711,3.50155 l 2.039368,4.6944 c 2.501112,-1.03893 5.463967,-2.27024 8.388343,-3.54004 v 7.88812 h 4.80983 v -34.90012 h -4.80983 z m 16.007114,21.58651 c -1.385231,0 -1.616103,-0.26935 -1.616103,-2.42415 v -11.23576 c 3.770906,-1.96241 7.811163,-4.23265 11.197283,-6.54137 l -3.309163,-4.11722 c -2.116325,1.8085 -4.963744,3.9633 -7.88812,5.84876 v -11.54359 h -4.732873 v 27.51222 c 0,5.42549 1.269795,7.04159 5.65636,7.04159 h 5.156138 c 4.309607,0 5.425487,-2.84742 5.887231,-10.19684 -1.269795,-0.26935 -3.270684,-1.19283 -4.386565,-2.07784 -0.26935,6.19506 -0.500222,7.7342 -1.96241,7.7342 z"
131
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu Bold';fill:#d40000;stroke-width:0.96196598"
132
+ id="path827" />
133
+ </g>
136
134
  </g>
137
135
  </svg>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kita
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Bishop
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-03 00:00:00.000000000 Z
11
+ date: 2020-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: config
@@ -270,10 +270,11 @@ files:
270
270
  - sounds/ん2.ogg
271
271
  - test-notify.rb
272
272
  - ui/builder.ui
273
+ - ui/kita-bordered.svg
273
274
  - ui/kita.svg
274
275
  homepage: https://www.danbishop.org
275
276
  licenses:
276
- - GPLv3+
277
+ - GPL-3.0+
277
278
  metadata:
278
279
  homepage_uri: https://www.danbishop.org
279
280
  source_code_uri: https://github.com/danbishop/kita