kita 0.5.6 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +5 -1
  5. data/kita.gemspec +7 -3
  6. data/lib/kita.rb +42 -76
  7. data/lib/kita/config.rb +22 -4
  8. data/lib/kita/hiragana.rb +1 -0
  9. data/lib/kita/katakana.rb +1 -0
  10. data/lib/kita/menu.rb +11 -0
  11. data/lib/kita/question.rb +23 -0
  12. data/lib/kita/version.rb +1 -1
  13. data/snap/snapcraft.yaml +3 -27
  14. data/sounds//343/201/{202.ogg → 2021.ogg} +0 -0
  15. data/sounds//343/201/{204.ogg → 2041.ogg} +0 -0
  16. data/sounds//343/201/{206.ogg → 2061.ogg} +0 -0
  17. data/sounds//343/201/{210.ogg → 2101.ogg} +0 -0
  18. data/sounds//343/201/{212.ogg → 2121.ogg} +0 -0
  19. data/sounds//343/201/{213.ogg → 2131.ogg} +0 -0
  20. data/sounds//343/201/{214.ogg → 2141.ogg} +0 -0
  21. data/sounds//343/201/{215.ogg → 2151.ogg} +0 -0
  22. data/sounds//343/201/{216.ogg → 2161.ogg} +0 -0
  23. data/sounds//343/201/{217.ogg → 2171.ogg} +0 -0
  24. data/sounds//343/201/{220.ogg → 2201.ogg} +0 -0
  25. data/sounds//343/201/{221.ogg → 2211.ogg} +0 -0
  26. data/sounds//343/201/{222.ogg → 2221.ogg} +0 -0
  27. data/sounds//343/201/{223.ogg → 2231.ogg} +0 -0
  28. data/sounds//343/201/{224.ogg → 2241.ogg} +0 -0
  29. data/sounds//343/201/{225.ogg → 2251.ogg} +0 -0
  30. data/sounds//343/201/{226.ogg → 2261.ogg} +0 -0
  31. data/sounds//343/201/{227.ogg → 2271.ogg} +0 -0
  32. data/sounds//343/201/{230.ogg → 2301.ogg} +0 -0
  33. data/sounds//343/201/{231.ogg → 2311.ogg} +0 -0
  34. data/sounds//343/201/{232.ogg → 2321.ogg} +0 -0
  35. data/sounds//343/201/{233.ogg → 2331.ogg} +0 -0
  36. data/sounds//343/201/{234.ogg → 2341.ogg} +0 -0
  37. data/sounds//343/201/{235.ogg → 2351.ogg} +0 -0
  38. data/sounds//343/201/{236.ogg → 2361.ogg} +0 -0
  39. data/sounds//343/201/{237.ogg → 2371.ogg} +0 -0
  40. data/sounds//343/201/{240.ogg → 2401.ogg} +0 -0
  41. data/sounds//343/201/{241.ogg → 2411.ogg} +0 -0
  42. data/sounds//343/201/{242.ogg → 2421.ogg} +0 -0
  43. data/sounds//343/201/{244.ogg → 2441.ogg} +0 -0
  44. data/sounds//343/201/{245.ogg → 2451.ogg} +0 -0
  45. data/sounds//343/201/{246.ogg → 2461.ogg} +0 -0
  46. data/sounds//343/201/{247.ogg → 2471.ogg} +0 -0
  47. data/sounds//343/201/{250.ogg → 2501.ogg} +0 -0
  48. data/sounds//343/201/{251.ogg → 2511.ogg} +0 -0
  49. data/sounds//343/201/{252.ogg → 2521.ogg} +0 -0
  50. data/sounds//343/201/{253.ogg → 2531.ogg} +0 -0
  51. data/sounds//343/201/{254.ogg → 2541.ogg} +0 -0
  52. data/sounds//343/201/{255.ogg → 2551.ogg} +0 -0
  53. data/sounds//343/201/{256.ogg → 2561.ogg} +0 -0
  54. data/sounds//343/201/{257.ogg → 2571.ogg} +0 -0
  55. data/sounds//343/201/{260.ogg → 2601.ogg} +0 -0
  56. data/sounds//343/201/{261.ogg → 2611.ogg} +0 -0
  57. data/sounds//343/201/{262.ogg → 2621.ogg} +0 -0
  58. data/sounds//343/201/{263.ogg → 2631.ogg} +0 -0
  59. data/sounds//343/201/{264.ogg → 2641.ogg} +0 -0
  60. data/sounds//343/201/{265.ogg → 2651.ogg} +0 -0
  61. data/sounds//343/201/{266.ogg → 2661.ogg} +0 -0
  62. data/sounds//343/201/{267.ogg → 2671.ogg} +0 -0
  63. data/sounds//343/201/{270.ogg → 2701.ogg} +0 -0
  64. data/sounds//343/201/{271.ogg → 2711.ogg} +0 -0
  65. data/sounds//343/201/{272.ogg → 2721.ogg} +0 -0
  66. data/sounds//343/201/{273.ogg → 2731.ogg} +0 -0
  67. data/sounds//343/201/{274.ogg → 2741.ogg} +0 -0
  68. data/sounds//343/201/{275.ogg → 2751.ogg} +0 -0
  69. data/sounds//343/201/{276.ogg → 2761.ogg} +0 -0
  70. data/sounds//343/201/{277.ogg → 2771.ogg} +0 -0
  71. data/sounds//343/202/{200.ogg → 2001.ogg} +0 -0
  72. data/sounds//343/202/{201.ogg → 2011.ogg} +0 -0
  73. data/sounds//343/202/{202.ogg → 2021.ogg} +0 -0
  74. data/sounds//343/202/{204.ogg → 2041.ogg} +0 -0
  75. data/sounds//343/202/{206.ogg → 2061.ogg} +0 -0
  76. data/sounds//343/202/{210.ogg → 2101.ogg} +0 -0
  77. data/sounds//343/202/{211.ogg → 2111.ogg} +0 -0
  78. data/sounds//343/202/{212.ogg → 2121.ogg} +0 -0
  79. data/sounds//343/202/{213.ogg → 2131.ogg} +0 -0
  80. data/sounds//343/202/{214.ogg → 2141.ogg} +0 -0
  81. data/sounds//343/202/{215.ogg → 2151.ogg} +0 -0
  82. data/sounds//343/202/{217.ogg → 2171.ogg} +0 -0
  83. data/sounds//343/202/{222.ogg → 2221.ogg} +0 -0
  84. data/sounds//343/202/{223.ogg → 2231.ogg} +0 -0
  85. data/ui/builder.ui +6 -1
  86. data/ui/kita-bordered.svg +141 -0
  87. data/ui/kita.svg +12 -14
  88. metadata +81 -76
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65792a880b15d5034614c329d66ffd741f76af6cec3d8b70079675296b911170
4
- data.tar.gz: facfc0980b75a217513991ae019cba86a21185389f832b52e7f78ea37a1f1b98
3
+ metadata.gz: 374e9343d1932d06ba3aaf1c3fad9aa24a198ac091df0d18578b9c2abc2c67ee
4
+ data.tar.gz: e8be7430c81d1a69ded809b65f0d9ceda82700a101ba27b789d8f2fe914900cf
5
5
  SHA512:
6
- metadata.gz: 711858ba735bf5c14e7ef006598d3957205cf04752138edd487af4a8432f2f843532b1de83d78c358769ce3e0aa6623b03a7d1405359890d44084f01ff8514ef
7
- data.tar.gz: 95a46563053e6e80955b92b61f095e11bd5d7e1197000c2455ba62264170370a673d61381279f3d900a9b5c161b0ac31fe72049951027d9a6d7c69fa70005d86
6
+ metadata.gz: dc77d4e0d1141c774462a6dce08a47150b8ae6615db8ed538bbc539bb645a665f77aff07070a9b8f740c225cdce197c23d30bcafe9bde91040153bc8ee48c082
7
+ data.tar.gz: 3d4c9c5907482bf6347cd6e972a56b463af6dc40bd59b67a33fc5dc8d3dd55e7aa076137bd7f7764b3246bf52d53bf9491b8d507825a72ba4e967b288a0d12e3
@@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
9
9
 
10
10
  ### Changed
11
11
 
12
+ ## 2020-06-02
13
+ ### Added
14
+ - Kita randomly selects between two different recordings for each kana
15
+
16
+ ## 2020-05-27
17
+ ### Changed
18
+ - Selecting an incorrect answer for a Katakana question, shows the correct Katakana, rather than
19
+ just repeating the Hiragana
20
+
12
21
  ## 2020-05-25
13
22
  ### Changed
14
23
  - Improved sounds, neither へ nor は are pronounced in their particle form (e and wa).
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kita (0.5.5)
4
+ kita (0.6.1)
5
5
  config (~> 2.2)
6
6
  gir_ffi (~> 0.15.2)
7
7
  gstreamer (~> 3.4)
data/README.md CHANGED
@@ -1 +1,5 @@
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.
4
+
5
+ [![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/kita)
@@ -7,12 +7,16 @@ 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
- spec.description = 'A simple tool to help Japanese language learners with hiragana and katakana.'
13
+ spec.description = <<-DESC
14
+ A simple GTK3 app to help Japanese language learners with Hiragana and Katakana. It introduces
15
+ users to the sounds of the kana and teaches basic recognition of both writing systems.
16
+ DESC
17
+
14
18
  spec.homepage = 'https://www.danbishop.org'
15
- spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
19
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
16
20
 
17
21
  spec.metadata['homepage_uri'] = spec.homepage
18
22
  spec.metadata['source_code_uri'] = 'https://github.com/danbishop/kita'
@@ -1,109 +1,74 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'gtk3'
3
4
  require_relative 'kita/audio'
4
5
  require_relative 'kita/config'
5
- require_relative 'kita/hiragana'
6
- require_relative 'kita/katakana'
6
+ require_relative 'kita/menu'
7
+ require_relative 'kita/question'
7
8
  require_relative 'kita/version'
8
9
 
9
10
  module Kita
10
11
  # Main application class
11
12
  class Application < Gtk::Application
13
+ include Menu
14
+
12
15
  def initialize
13
16
  super 'uk.danbishop.kita', :handles_open
14
- builder_file = "#{File.expand_path(File.dirname(__dir__))}/ui/builder.ui"
15
- # Construct a Gtk::Builder instance and load our UI description
16
- @builder = Gtk::Builder.new(file: builder_file)
17
- # Initiate Hiragana class
18
- @hiragana = Hiragana.new
19
- # Initiate Katakana class
20
- @katakana = Katakana.new
21
- @types = [@hiragana]
17
+ # Construct a Gtk::Builder instance
18
+ @builder = Gtk::Builder.new(file: "#{File.expand_path(File.dirname(__dir__))}/ui/builder.ui")
19
+ # Set menu toggles to match settings
20
+ menu_load
21
+ # Now connect signals
22
+ @builder.connect_signals { |handler| method(handler) }
23
+ # Initiate Question class
24
+ @question = Question.new
22
25
  @button_signals = {}
23
26
  @sound = Audio.new
24
27
  new_question
25
- menu_setup
26
- setup_new_question_button
27
- setup_repeat_button
28
- build_main_window
29
- end
30
-
31
- def menu_setup
32
- setup_hiragana_switch
33
- setup_katakana_switch
34
- setup_sound_switch
35
28
  setup_about_box
29
+ build_main_window
36
30
  end
37
31
 
38
32
  def setup_about_box
39
- about_box = @builder.get_object('about_box')
33
+ @ee = 0
34
+ about_box = @builder['about_box']
40
35
  about_box.version = VERSION
41
- about_button = @builder.get_object('menu_about')
42
- about_button.signal_connect('clicked') do
36
+ @builder['menu_about'].signal_connect('clicked') do
43
37
  about_box.run
44
38
  about_box.hide
45
39
  end
46
40
  end
47
41
 
48
- def setup_new_question_button
49
- new_question_button = @builder.get_object('new_question')
50
- new_question_button.signal_connect('clicked') do
51
- new_question
52
- end
53
- end
54
-
55
- def setup_repeat_button
56
- new_question_button = @builder.get_object('speak')
57
- new_question_button.signal_connect('clicked') do
58
- @sound.repeat
59
- end
60
- end
61
-
62
- def setup_hiragana_switch
63
- @hiragana_switch = @builder.get_object('hiragana_switch')
64
- @hiragana_switch.signal_connect('notify::active') do
65
- toggle_hiragana
66
- end
67
- end
68
-
69
- def setup_katakana_switch
70
- @katakana_switch = @builder.get_object('katakana_switch')
71
- @katakana_switch.signal_connect('notify::active') do
72
- toggle_katakana
73
- end
74
- end
75
-
76
- def setup_sound_switch
77
- @sound_switch = @builder.get_object('sound_switch')
78
- @sound_switch.signal_connect('notify::active') do
79
- toggle_sound
80
- end
42
+ def repeat_button_click
43
+ @sound.repeat
81
44
  end
82
45
 
83
46
  def toggle_katakana
84
- # TODO: Switch this to using Settings
85
- @types = []
86
- @types << @hiragana if @hiragana_switch.active?
87
- @types << @katakana if @katakana_switch.active?
88
- (@hiragana_switch.set_active(true) && @types = [@hiragana]) if @types.empty?
47
+ Settings.katakana = !Settings.katakana
48
+ (@builder['hiragana_switch'].set_active(true) && Settings.hiragana = true) if !Settings.katakana && !Settings.hiragana
49
+ save_settings
89
50
  end
90
51
 
91
52
  def toggle_hiragana
92
- # TODO: Switch this to using Settings
93
- @types = []
94
- @types << @hiragana if @hiragana_switch.active?
95
- @types << @katakana if @katakana_switch.active?
96
- (@katakana_switch.set_active(true) && @types = [@katakana]) if @types.empty?
53
+ Settings.hiragana = !Settings.hiragana
54
+ (@builder['katakana_switch'].set_active(true) && Settings.katakana = true) if !Settings.katakana && !Settings.hiragana
55
+ save_settings
97
56
  end
98
57
 
99
58
  def toggle_sound
100
- Settings.speak = !Settings.speak
59
+ Settings.sound = !Settings.sound
60
+ save_settings
61
+ end
62
+
63
+ def ee
64
+ @ee += 1
65
+ @sound.play('これは北です') if @ee == 3
101
66
  end
102
67
 
103
68
  def build_main_window
104
69
  signal_connect :activate do
105
70
  # Connect signal handlers to the constructed widgets
106
- window = @builder.get_object('window')
71
+ window = @builder['window']
107
72
  window.signal_connect('destroy') { Gtk.main_quit }
108
73
  window.present
109
74
  end
@@ -111,20 +76,18 @@ module Kita
111
76
 
112
77
  def new_question
113
78
  reset_buttons
114
- question = @types.sample.question
115
- question_label = @builder.get_object('question')
116
- question_label.set_markup("<span font='72'>#{question[:question]}</span>")
79
+ question = @question.new_question
80
+ @builder['question'].set_markup("<span font='72'>#{question[:question]}</span>")
117
81
  buttons = %w[a b c d]
118
82
  correct_button(buttons, question)
119
83
  wrong_buttons(buttons, question)
120
- puts "Playing: #{question[:question].hiragana}"
121
- @sound.play(question[:question].hiragana) if Settings.speak
84
+ @sound.play("#{question[:question].hiragana}#{[1, 2].sample}") if Settings.sound
122
85
  end
123
86
 
124
87
  def correct_button(buttons, question)
125
88
  # Choose random letter and remove it from array
126
89
  correct = buttons.delete(buttons.sample)
127
- correct_button = @builder.get_object("answer_#{correct}")
90
+ correct_button = @builder["answer_#{correct}"]
128
91
  correct_button.set_label(question[:answer])
129
92
  correct_signal = correct_button.signal_connect('clicked') do
130
93
  new_question
@@ -144,14 +107,17 @@ module Kita
144
107
  def wrong_button_click(button)
145
108
  button.set_sensitive(false)
146
109
  label = button.child
147
- label.set_markup("<span color='#d40000'>#{button.label} #{button.label.hiragana}</span>")
110
+ correction = @question.type == 'hiragana' ? button.label.hiragana : button.label.katakana
111
+ label.set_markup(
112
+ "<span color='#d40000'>#{button.label} #{correction}</span>"
113
+ )
148
114
  end
149
115
 
150
116
  def reset_buttons
151
117
  return nil if @button_signals.empty?
152
118
 
153
119
  @button_signals.each do |letter, signal|
154
- button = @builder.get_object("answer_#{letter}")
120
+ button = @builder["answer_#{letter}"]
155
121
  button.signal_handler_disconnect(signal)
156
122
  button.set_sensitive(true)
157
123
  end
@@ -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
@@ -48,6 +48,7 @@ class Hiragana
48
48
  def build_question(chars)
49
49
  {
50
50
  question: chars[0],
51
+ type: 'hiragana',
51
52
  answer: chars[0].romaji,
52
53
  choices: [
53
54
  chars[1].romaji,
@@ -48,6 +48,7 @@ class Katakana
48
48
  def build_question(chars)
49
49
  {
50
50
  question: chars[0],
51
+ type: 'katakana',
51
52
  answer: chars[0].hiragana,
52
53
  choices: [
53
54
  chars[1].hiragana,
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Menu Related Functions
4
+ module Menu
5
+ def menu_load
6
+ puts 'Setting up menu'
7
+ @builder['hiragana_switch'].set_active(Settings.hiragana)
8
+ @builder['katakana_switch'].set_active(Settings.katakana)
9
+ @builder['sound_switch'].set_active(Settings.sound)
10
+ end
11
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'hiragana'
4
+ require_relative 'katakana'
5
+
6
+ # Question Class
7
+ class Question
8
+ attr_accessor :type
9
+
10
+ def initialize
11
+ @hiragana = Hiragana.new
12
+ @katakana = Katakana.new
13
+ end
14
+
15
+ def new_question
16
+ question_types = []
17
+ question_types.push @hiragana if Settings.hiragana
18
+ question_types.push @katakana if Settings.katakana
19
+ question = question_types.sample.question
20
+ @type = question[:type]
21
+ question
22
+ end
23
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kita
4
- VERSION = '0.5.6'
4
+ VERSION = '0.9.0'
5
5
  end
@@ -1,5 +1,5 @@
1
1
  name: kita
2
- version: '0.5.5'
2
+ version: '0.9.0'
3
3
  summary: Japanese learning tool
4
4
  description: |
5
5
  A simple tool to help Japanese language learners.
@@ -15,43 +15,19 @@ parts:
15
15
  plugin: ruby
16
16
  gems:
17
17
  - kita
18
- ruby-version: 2.7.0
18
+ ruby-version: 2.7.1
19
19
  stage-packages:
20
- - gobject-introspection
21
- - gir1.2-atk-1.0
22
- - gir1.2-atspi-2.0
23
- - gir1.2-freedesktop
24
- - gir1.2-gdkpixbuf-2.0
25
- - gir1.2-glib-2.0
26
- - gir1.2-gtk-3.0
27
- - gir1.2-pango-1.0
28
- - libcanberra-gtk3-0
29
20
  - libgstreamer1.0-0
30
- - libglib2.0-0
21
+ - gstreamer1.0-plugins-base
31
22
  - libgirepository-1.0-1
32
23
  - gir1.2-gstreamer-1.0
33
- - gstreamer1.0-plugins-base
34
- # Just trying these to see if it makes sound work
35
- - libpulse0
36
- - libpulse-mainloop-glib0
37
- - libslang2
38
- - libgpm2
39
- - libasound2
40
24
 
41
25
  apps:
42
26
  kita:
43
27
  command: bin/kita
44
28
  extensions: [gnome-3-28]
45
- environment:
46
- LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio
47
29
  plugs:
48
- - desktop
49
- - desktop-legacy
50
- - gsettings
51
- - wayland
52
- - x11
53
30
  - audio-playback
54
- - home
55
31
  slots:
56
32
  - dbus-daemon
57
33
  common-id: uk.danbishop.kita
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -30,7 +30,6 @@ Author: Dan Bishop
30
30
  <property name="can_focus">False</property>
31
31
  <property name="type_hint">dialog</property>
32
32
  <property name="program_name">Kita</property>
33
- <property name="version"></property>
34
33
  <property name="copyright" translatable="yes">© 2020 Dan Bishop</property>
35
34
  <property name="comments" translatable="yes">A simple tool to help Japanese language learners.</property>
36
35
  <property name="website">danbishop.uk</property>
@@ -39,6 +38,7 @@ Author: Dan Bishop
39
38
  <property name="artists">Dan Bishop &lt;d@nbishop.uk&gt;</property>
40
39
  <property name="logo">kita.svg</property>
41
40
  <property name="license_type">gpl-3-0</property>
41
+ <signal name="show" handler="ee" swapped="no"/>
42
42
  <child type="titlebar">
43
43
  <placeholder/>
44
44
  </child>
@@ -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>
@@ -245,6 +248,7 @@ Author: Dan Bishop
245
248
  <property name="can_focus">True</property>
246
249
  <property name="receives_default">True</property>
247
250
  <property name="always_show_image">True</property>
251
+ <signal name="clicked" handler="new_question" swapped="no"/>
248
252
  </object>
249
253
  </child>
250
254
  <child>
@@ -252,6 +256,7 @@ Author: Dan Bishop
252
256
  <property name="visible">True</property>
253
257
  <property name="can_focus">True</property>
254
258
  <property name="receives_default">True</property>
259
+ <signal name="clicked" handler="repeat_button_click" swapped="no"/>
255
260
  <child>
256
261
  <object class="GtkImage">
257
262
  <property name="visible">True</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.5.6
4
+ version: 0.9.0
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-05-25 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
@@ -94,7 +94,9 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3.4'
97
- description: A simple tool to help Japanese language learners with hiragana and katakana.
97
+ description: |2
98
+ A simple GTK3 app to help Japanese language learners with Hiragana and Katakana. It introduces
99
+ users to the sounds of the kana and teaches basic recognition of both writing systems.
98
100
  email:
99
101
  - d@nbishop.uk
100
102
  executables:
@@ -118,159 +120,162 @@ files:
118
120
  - lib/kita/config.rb
119
121
  - lib/kita/hiragana.rb
120
122
  - lib/kita/katakana.rb
123
+ - lib/kita/menu.rb
124
+ - lib/kita/question.rb
121
125
  - lib/kita/version.rb
122
126
  - snap/gui/kita.desktop
123
127
  - snap/gui/kita.svg
124
128
  - snap/snapcraft.yaml
125
- - sounds/あ.ogg
129
+ - sounds/あ1.ogg
126
130
  - sounds/あ2.ogg
127
- - sounds/い.ogg
131
+ - sounds/い1.ogg
128
132
  - sounds/い2.ogg
129
- - sounds/う.ogg
133
+ - sounds/う1.ogg
130
134
  - sounds/う2.ogg
131
- - sounds/え.ogg
135
+ - sounds/え1.ogg
132
136
  - sounds/え2.ogg
133
- - sounds/お.ogg
137
+ - sounds/お1.ogg
134
138
  - sounds/お2.ogg
135
- - sounds/か.ogg
139
+ - sounds/か1.ogg
136
140
  - sounds/か2.ogg
137
- - sounds/が.ogg
141
+ - sounds/が1.ogg
138
142
  - sounds/が2.ogg
139
- - sounds/き.ogg
143
+ - sounds/き1.ogg
140
144
  - sounds/き2.ogg
141
- - sounds/ぎ.ogg
145
+ - sounds/ぎ1.ogg
142
146
  - sounds/ぎ2.ogg
143
- - sounds/く.ogg
147
+ - sounds/く1.ogg
144
148
  - sounds/く2.ogg
145
- - sounds/ぐ.ogg
149
+ - sounds/ぐ1.ogg
146
150
  - sounds/ぐ2.ogg
147
- - sounds/け.ogg
151
+ - sounds/け1.ogg
148
152
  - sounds/け2.ogg
149
- - sounds/げ.ogg
153
+ - sounds/げ1.ogg
150
154
  - sounds/げ2.ogg
151
- - sounds/こ.ogg
155
+ - sounds/こ1.ogg
152
156
  - sounds/こ2.ogg
153
157
  - sounds/これは北です.ogg
154
- - sounds/ご.ogg
158
+ - sounds/ご1.ogg
155
159
  - sounds/ご2.ogg
156
- - sounds/さ.ogg
160
+ - sounds/さ1.ogg
157
161
  - sounds/さ2.ogg
158
- - sounds/ざ.ogg
162
+ - sounds/ざ1.ogg
159
163
  - sounds/ざ2.ogg
160
- - sounds/し.ogg
164
+ - sounds/し1.ogg
161
165
  - sounds/し2.ogg
162
- - sounds/じ.ogg
166
+ - sounds/じ1.ogg
163
167
  - sounds/じ2.ogg
164
- - sounds/す.ogg
168
+ - sounds/す1.ogg
165
169
  - sounds/す2.ogg
166
- - sounds/ず.ogg
170
+ - sounds/ず1.ogg
167
171
  - sounds/ず2.ogg
168
- - sounds/せ.ogg
172
+ - sounds/せ1.ogg
169
173
  - sounds/せ2.ogg
170
- - sounds/ぜ.ogg
174
+ - sounds/ぜ1.ogg
171
175
  - sounds/ぜ2.ogg
172
- - sounds/そ.ogg
176
+ - sounds/そ1.ogg
173
177
  - sounds/そ2.ogg
174
- - sounds/ぞ.ogg
178
+ - sounds/ぞ1.ogg
175
179
  - sounds/ぞ2.ogg
176
- - sounds/た.ogg
180
+ - sounds/た1.ogg
177
181
  - sounds/た2.ogg
178
- - sounds/だ.ogg
182
+ - sounds/だ1.ogg
179
183
  - sounds/だ2.ogg
180
- - sounds/ち.ogg
184
+ - sounds/ち1.ogg
181
185
  - sounds/ち2.ogg
182
- - sounds/ぢ.ogg
186
+ - sounds/ぢ1.ogg
183
187
  - sounds/ぢ2.ogg
184
- - sounds/つ.ogg
188
+ - sounds/つ1.ogg
185
189
  - sounds/つ2.ogg
186
- - sounds/づ.ogg
190
+ - sounds/づ1.ogg
187
191
  - sounds/づ2.ogg
188
- - sounds/て.ogg
192
+ - sounds/て1.ogg
189
193
  - sounds/て2.ogg
190
- - sounds/で.ogg
194
+ - sounds/で1.ogg
191
195
  - sounds/で2.ogg
192
- - sounds/と.ogg
196
+ - sounds/と1.ogg
193
197
  - sounds/と2.ogg
194
- - sounds/ど.ogg
198
+ - sounds/ど1.ogg
195
199
  - sounds/ど2.ogg
196
- - sounds/な.ogg
200
+ - sounds/な1.ogg
197
201
  - sounds/な2.ogg
198
- - sounds/に.ogg
202
+ - sounds/に1.ogg
199
203
  - sounds/に2.ogg
200
- - sounds/ぬ.ogg
204
+ - sounds/ぬ1.ogg
201
205
  - sounds/ぬ2.ogg
202
- - sounds/ね.ogg
206
+ - sounds/ね1.ogg
203
207
  - sounds/ね2.ogg
204
- - sounds/の.ogg
208
+ - sounds/の1.ogg
205
209
  - sounds/の2.ogg
206
- - sounds/は.ogg
210
+ - sounds/は1.ogg
207
211
  - sounds/は2.ogg
208
- - sounds/ば.ogg
212
+ - sounds/ば1.ogg
209
213
  - sounds/ば2.ogg
210
- - sounds/ぱ.ogg
214
+ - sounds/ぱ1.ogg
211
215
  - sounds/ぱ2.ogg
212
- - sounds/ひ.ogg
216
+ - sounds/ひ1.ogg
213
217
  - sounds/ひ2.ogg
214
- - sounds/び.ogg
218
+ - sounds/び1.ogg
215
219
  - sounds/び2.ogg
216
- - sounds/ぴ.ogg
220
+ - sounds/ぴ1.ogg
217
221
  - sounds/ぴ2.ogg
218
- - sounds/ふ.ogg
222
+ - sounds/ふ1.ogg
219
223
  - sounds/ふ2.ogg
220
- - sounds/ぶ.ogg
224
+ - sounds/ぶ1.ogg
221
225
  - sounds/ぶ2.ogg
222
- - sounds/ぷ.ogg
226
+ - sounds/ぷ1.ogg
223
227
  - sounds/ぷ2.ogg
224
- - sounds/へ.ogg
228
+ - sounds/へ1.ogg
225
229
  - sounds/へ2.ogg
226
- - sounds/べ.ogg
230
+ - sounds/べ1.ogg
227
231
  - sounds/べ2.ogg
228
- - sounds/ぺ.ogg
232
+ - sounds/ぺ1.ogg
229
233
  - sounds/ぺ2.ogg
230
- - sounds/ほ.ogg
234
+ - sounds/ほ1.ogg
231
235
  - sounds/ほ2.ogg
232
- - sounds/ぼ.ogg
236
+ - sounds/ぼ1.ogg
233
237
  - sounds/ぼ2.ogg
234
- - sounds/ぽ.ogg
238
+ - sounds/ぽ1.ogg
235
239
  - sounds/ぽ2.ogg
236
- - sounds/ま.ogg
240
+ - sounds/ま1.ogg
237
241
  - sounds/ま2.ogg
238
- - sounds/み.ogg
242
+ - sounds/み1.ogg
239
243
  - sounds/み2.ogg
240
- - sounds/む.ogg
244
+ - sounds/む1.ogg
241
245
  - sounds/む2.ogg
242
- - sounds/め.ogg
246
+ - sounds/め1.ogg
243
247
  - sounds/め2.ogg
244
- - sounds/も.ogg
248
+ - sounds/も1.ogg
245
249
  - sounds/も2.ogg
246
- - sounds/や.ogg
250
+ - sounds/や1.ogg
247
251
  - sounds/や2.ogg
248
- - sounds/ゆ.ogg
252
+ - sounds/ゆ1.ogg
249
253
  - sounds/ゆ2.ogg
250
- - sounds/よ.ogg
254
+ - sounds/よ1.ogg
251
255
  - sounds/よ2.ogg
252
- - sounds/ら.ogg
256
+ - sounds/ら1.ogg
253
257
  - sounds/ら2.ogg
254
- - sounds/り.ogg
258
+ - sounds/り1.ogg
255
259
  - sounds/り2.ogg
256
- - sounds/る.ogg
260
+ - sounds/る1.ogg
257
261
  - sounds/る2.ogg
258
- - sounds/れ.ogg
262
+ - sounds/れ1.ogg
259
263
  - sounds/れ2.ogg
260
- - sounds/ろ.ogg
264
+ - sounds/ろ1.ogg
261
265
  - sounds/ろ2.ogg
262
- - sounds/わ.ogg
266
+ - sounds/わ1.ogg
263
267
  - sounds/わ2.ogg
264
- - sounds/を.ogg
268
+ - sounds/を1.ogg
265
269
  - sounds/を2.ogg
266
- - sounds/ん.ogg
270
+ - sounds/ん1.ogg
267
271
  - sounds/ん2.ogg
268
272
  - test-notify.rb
269
273
  - ui/builder.ui
274
+ - ui/kita-bordered.svg
270
275
  - ui/kita.svg
271
276
  homepage: https://www.danbishop.org
272
277
  licenses:
273
- - GPLv3+
278
+ - GPL-3.0+
274
279
  metadata:
275
280
  homepage_uri: https://www.danbishop.org
276
281
  source_code_uri: https://github.com/danbishop/kita
@@ -283,7 +288,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
283
288
  requirements:
284
289
  - - ">="
285
290
  - !ruby/object:Gem::Version
286
- version: 2.3.0
291
+ version: 2.5.0
287
292
  required_rubygems_version: !ruby/object:Gem::Requirement
288
293
  requirements:
289
294
  - - ">="