tkri 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/tkri.rb +28 -10
  2. metadata +1 -1
@@ -105,16 +105,12 @@ HistoryEntry = Struct.new(:topic, :cursor, :yview)
105
105
  def self.hash_to_configuration(hash)
106
106
  ret = hash.dup
107
107
  if ret[:font].instance_of? Hash
108
+ ret[:font] = ret[:font].dup
108
109
  if ret[:font][:family]
109
- ret[:font] = ret[:font].dup
110
110
  availables = TkFont.families.map { |s| s.downcase }
111
+ desired = Array(ret[:font][:family]).map { |s| s.downcase }
111
112
  # Select the first family available on this system.
112
- Array(ret[:font][:family]).each { |family|
113
- if availables.include? family.downcase
114
- ret[:font][:family] = family
115
- break
116
- end
117
- }
113
+ ret[:font][:family] = (desired & availables).first || 'courier'
118
114
  end
119
115
  ret[:font] = TkFont.new(ret[:font])
120
116
  end
@@ -162,8 +158,8 @@ class Tab < TkFrame
162
158
  }
163
159
  }
164
160
 
165
- Settings::TAGS.each do |name, conf|
166
- @info.tag_configure(name, conf)
161
+ Settings::TAGS.each do |name, hash|
162
+ @info.tag_configure(name, Tkri::hash_to_configuration(hash))
167
163
  end
168
164
 
169
165
  # Key and mouse bindings
@@ -556,7 +552,8 @@ class App
556
552
  ['Overview', proc { help_overview }, 0],
557
553
  ['Key bindings', proc { help_key_bindings }, 0],
558
554
  ['Tips and tricks', proc { help_tips_and_tricks }, 0],
559
- ['About the $HOME/.tkrirc file', proc { help_rc }, 0]],
555
+ ['About the $HOME/.tkrirc file', proc { help_rc }, 0],
556
+ ['Known issues', proc { help_known_issues }, 0]],
560
557
  ]
561
558
  TkMenubar.new(root, menu_spec).pack(:side => 'top', :fill => 'x')
562
559
 
@@ -765,6 +762,27 @@ you're telling Tkri to dump all its default settings into that
765
762
  file. Then edit this file to your liking using your text editor.
766
763
  Finally, run tkri; it will automatically merge the settings from
767
764
  this file onto the hard-coded ones.
765
+ EOS
766
+ end
767
+
768
+ def help_known_issues
769
+ helpbox('Help: Known issues', <<EOS)
770
+ Here's a list of known issues / bugs:
771
+
772
+ ON THE WINDOWS PLATFORM:
773
+
774
+ * Tkri looks ugly.
775
+
776
+ * The mouse wheel works only if the keyboard focus is in the
777
+ textarea. That's unfortunate. It's a Tk issue, not Tkri's.
778
+
779
+ * If your $HOME variable contains non-ASCII charcaters, Tkri
780
+ seems not to be able to deal with the 'rc' file. It's a Ruby
781
+ issue(?).
782
+
783
+ ALL PLATFORMS:
784
+
785
+ * There's a 'backward' command, but no 'forward' command.
768
786
  EOS
769
787
  end
770
788
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mooffie