rabbit 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
Binary file
Binary file
Binary file
File without changes
@@ -13,7 +13,7 @@ You can stay up to date on the latest development by
13
13
  subscribing to the git commit ML. If you want to subscribe
14
14
  to the ML, send an e-mail like the following.
15
15
 
16
- To: rabbit-commit@ml.cozmixng.org
16
+ To: commit@ml.rabbit-shocker.org
17
17
  Cc: null@cozmixng.org
18
18
  Subject: Subscribe
19
19
 
data/doc/en/news.rd CHANGED
@@ -3,6 +3,77 @@ layout: en
3
3
  title: News
4
4
  apply_data: false
5
5
  ---
6
+ == 2.0.7: 2013-04-29
7
+
8
+ Stability improvement release!
9
+
10
+ === Improvements
11
+
12
+ ==== Package
13
+
14
+ * [GitHub#13] Removed needless files from package.
15
+ [Reported by Youhei SASAKI]
16
+ * Removed Ruby/GStreamer from dependency package.
17
+ [rabbit-shocker:1089] [Reported by znz]
18
+
19
+ ==== rabbit
20
+
21
+ * Removed needless executable permission.
22
+ * Stopped requiring Ruby/GStreamer on initialize because it crashes Rabbit on
23
+ Mac OS X 10.6.8.
24
+ [Reported by masa]
25
+ * Stopped guessing from source content when source has extension to avoid
26
+ false detection.
27
+ * Removed needless fallback fullscreen/unfullscreen features because they
28
+ are needless with latest GTK+.
29
+ [Reported by Youhei SASAKI]
30
+ * Supported non-ASCII file name.
31
+ [GitHub#15][GitHub#16][GitHub#17] [Patch by Masafumi Yokoyama]
32
+ * Stopped to use iconv when String#encode is available.
33
+ [GitHub#18] [Patch by Masafumi Yokoyama]
34
+
35
+ ==== Theme
36
+
37
+ * lightning-talk-toolkit: Supported as-large-as-possible slide property.
38
+
39
+ Force enable:
40
+
41
+ = Large Title
42
+
43
+ == property
44
+
45
+ : as_large_as_possible
46
+ true
47
+
48
+ Force disable:
49
+
50
+ = Large Title
51
+
52
+ == property
53
+
54
+ : as_large_as_possible
55
+ false
56
+
57
+ ==== Test
58
+
59
+ * Added missing load path to $LOAD_PATH.
60
+ [GitHub#14] [Reported by Masafumi Yokoyama]
61
+
62
+ ==== rabbit-slide
63
+
64
+ * Supported multi-paragraph description.
65
+ * Published to RubyGems.org after publishing to SlideShare.
66
+ It is for using SlideShare information on RubyGems.org publishing.
67
+ [Masafumi Yokoyama]
68
+ * Supported RubyGems 2.0. [Masafumi Yokoyama]
69
+
70
+ === Thanks
71
+
72
+ * Youhei SASAKI
73
+ * masa
74
+ * Masafumi Yokoyama
75
+ * znz
76
+
6
77
  == 2.0.6: 2012-12-29
7
78
 
8
79
  Video support release!
data/doc/en/users.rd CHANGED
@@ -13,14 +13,14 @@ some other active spots.
13
13
 
14
14
  === Mailing list
15
15
 
16
- There is a rabbit-shocker-en mailing list for Rabbit Shocker.
16
+ There is the shocker-en mailing list for Rabbit Shocker.
17
17
  (((<archive|URL:http://www.cozmixng.org/~w3ml/index.rb/rabbit-shocker-en/>)))
18
18
 
19
19
 
20
20
  You can subscribe the mailing list by sending the following
21
21
  mail:
22
22
 
23
- To: rabbit-shocker-en@ml.cozmixng.org
23
+ To: shocker-en@ml.rabbit-shocker.org
24
24
  Cc: kou@cozmixng.org
25
25
  Subject: Subscribe
26
26
 
@@ -14,7 +14,7 @@ Rabbitのリポジトリは
14
14
  リングリストに参加するには以下のようなメールを送信してくださ
15
15
  い。
16
16
 
17
- To: rabbit-commit@ml.cozmixng.org
17
+ To: commit@ml.rabbit-shocker.org
18
18
  Cc: null@cozmixng.org
19
19
  Subject: 登録
20
20
 
data/doc/ja/news.rd CHANGED
@@ -3,6 +3,77 @@ layout: ja
3
3
  title: お知らせ
4
4
  apply_data: false
5
5
  ---
6
+ == 2.0.7: 2013-04-29
7
+
8
+ 安定性向上リリース!
9
+
10
+ === 改良
11
+
12
+ ==== パッケージ
13
+
14
+ * [GitHub#13] 不要なファイルをパッケージに含めないようにした。
15
+ [Youhei SASAKIさんが報告]
16
+ * Ruby/GStreamerを依存パッケージから外した。
17
+ [rabbit-shocker:1089] [znzさんが報告]
18
+
19
+ ==== rabbit
20
+
21
+ * 不必要な実行属性を削除した。
22
+ * Mac OS X 10.6.8でクラッシュするため、必要なときだけRuby/GStreamerを
23
+ 読みこむようにした。
24
+ [masaさんが報告]
25
+ * 拡張子でソースのマークアップが判断できる場合は、誤検出を避けるため
26
+ ソースの内容から推測しないようにした。
27
+ * フルスクリーン・フルスクリーン解除のフォールバック機能を削除した。
28
+ 最近のGTK+ではフォールバックが必要なことがないため。
29
+ [Youhei SASAKIさんが報告]
30
+ * 非ASCIIのファイル名をサポート。
31
+ [GitHub#15][GitHub#16][GitHub#17] [Masafumi Yokoyamaさんがパッチ提供]
32
+ * iconvの代わりにString#encodeを使うようにした。
33
+ [GitHub#18] [Masafumi Yokoyamaさんがパッチ提供]
34
+
35
+ ==== テーマ
36
+
37
+ * lightning-talk-toolkit: as-large-as-possibleスライドプロパティをサ
38
+ ポート。
39
+
40
+ そのスライドだけ有効にする場合:
41
+
42
+ = 大きなタイトル
43
+
44
+ == プロパティ
45
+
46
+ : as_large_as_possible
47
+ true
48
+
49
+ そのスライドだけ無効にする場合:
50
+
51
+ = 大きなタイトル
52
+
53
+ == プロパティ
54
+
55
+ : as_large_as_possible
56
+ false
57
+
58
+ ==== テスト
59
+
60
+ * $LOAD_PATHが足りなかった問題を修正。
61
+ [GitHub#14] [Masafumi Yokoyamaさんが報告]
62
+
63
+ ==== rabbit-slide
64
+
65
+ * 複数段落の説明文に対応。
66
+ * SlideShareの情報を使うため、RubyGems.orgへの公開を最後にした。
67
+ [Masafumi Yokoyamaさん]
68
+ * RubyGems 2.0対応。 [Masafumi Yokoyamaさん]
69
+
70
+ === 感謝
71
+
72
+ * Youhei SASAKIさん
73
+ * masaさん
74
+ * Masafumi Yokoyamaさん
75
+ * znzさん
76
+
6
77
  == 2.0.6: 2012-12-29
7
78
 
8
79
  ビデオサポートリリース!2012年最後のリリース!
data/doc/ja/users.rd CHANGED
@@ -27,13 +27,13 @@ slide.rabbit-shocker.orgへアップロードしましょう。
27
27
 
28
28
  === メーリングリスト
29
29
 
30
- Rabbitショッカーのためにrabbit-shockerというメーリングリストがあります。
30
+ Rabbitショッカーのためにshocker-jaというメーリングリストがあります。
31
31
  (((<アーカイブ
32
32
  |URL:http://www.cozmixng.org/~w3ml/index.rb/rabbit-shocker/>)))
33
33
 
34
34
  以下のようなメールを送るとメーリングリストへ参加できます。
35
35
 
36
- To: rabbit-shocker@ml.cozmixng.org
36
+ To: shocker-ja@ml.rabbit-shocker.org
37
37
  Cc: kou@cozmixng.org
38
38
  Subject: イー
39
39
 
@@ -3,7 +3,6 @@ require "rabbit/utils"
3
3
  require "rabbit/image"
4
4
  require "rabbit/element"
5
5
  require "rabbit/parser/base"
6
- require "rabbit/video-window"
7
6
 
8
7
  module Rabbit
9
8
  module Element
@@ -76,6 +75,7 @@ module Rabbit
76
75
  def draw_element(canvas, x, y, w, h, simulation)
77
76
  unless simulation
78
77
  if canvas.display?
78
+ require "rabbit/video-window"
79
79
  @video_window ||= VideoWindow.new(self)
80
80
  @video_window.show(canvas.window)
81
81
  else
data/lib/rabbit/frame.rb CHANGED
@@ -12,8 +12,6 @@ module Rabbit
12
12
  include ScreenInfo
13
13
  extend Forwardable
14
14
 
15
- FALLBACK_LIMIT = 250
16
-
17
15
  def_delegators(:@window, :icon, :icon=, :set_icon)
18
16
  def_delegators(:@window, :icon_list, :icon_list=, :set_icon_list)
19
17
  def_delegators(:@window, :iconify, :show, :hide, :visible?)
@@ -62,14 +60,12 @@ module Rabbit
62
60
  @fullscreen_toggled = false
63
61
  @fullscreen = true
64
62
  @window.fullscreen
65
- fallback_fullscreen
66
63
  end
67
64
 
68
65
  def unfullscreen
69
66
  @fullscreen_toggled = false
70
67
  @fullscreen = false
71
68
  @window.unfullscreen
72
- fallback_unfullscreen
73
69
  end
74
70
 
75
71
  def toggle_fullscreen
@@ -197,44 +193,6 @@ module Rabbit
197
193
  true
198
194
  end
199
195
  end
200
-
201
- def fallback_fullscreen
202
- @prev_width = @prev_height = nil
203
- @prev_x = @prev_y = nil
204
- Gtk.timeout_add(FALLBACK_LIMIT) do
205
- unless @fullscreen_toggled
206
- @prev_width, @prev_height = width, height
207
- @prev_x, @prev_y = @window.position
208
- @window.hide
209
- @window.set_size_request(screen_width, screen_height)
210
- @window.decorated = false
211
- @window.keep_above = true
212
- @window.show
213
- @window.move(0, 0)
214
- @window.present
215
- @canvas.fullscreened
216
- end
217
- false
218
- end
219
- end
220
-
221
- def fallback_unfullscreen
222
- Gtk.timeout_add(FALLBACK_LIMIT) do
223
- if !@fullscreen_toggled and
224
- @prev_width and @prev_height and
225
- @prev_x and @prev_y
226
- @window.hide
227
- @window.set_size_request(@prev_width, @prev_height)
228
- @window.decorated = true
229
- @window.keep_above = !@main_window
230
- @window.show
231
- @window.move(@prev_x, @prev_y)
232
- @window.present
233
- @canvas.unfullscreened
234
- end
235
- false
236
- end
237
- end
238
196
  end
239
197
 
240
198
  class NullFrame
@@ -0,0 +1,42 @@
1
+ # Copyright (C) 2013 Kouhei Sutou <kou@cozmixng.org>
2
+ #
3
+ # This program is free software; you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation; either version 2 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License along
14
+ # with this program; if not, write to the Free Software Foundation, Inc.,
15
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
+
17
+ require "rubygems"
18
+
19
+ module Rabbit
20
+ class GemBuilder
21
+ class << self
22
+ def build(spec)
23
+ new(spec).build
24
+ end
25
+ end
26
+
27
+ def initialize(spec)
28
+ @spec = spec
29
+ end
30
+
31
+ if Gem.const_defined?(:Builder)
32
+ def build
33
+ Gem::Builder.new(@spec).build
34
+ end
35
+ else
36
+ require "rubygems/package"
37
+ def build
38
+ Gem::Package.build(@spec)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -9,17 +9,11 @@ module Rabbit
9
9
  module Parser
10
10
  module Ext
11
11
  module Image
12
- ALLOWED_IMG_URL_SCHEME = ['http', 'https', 'file', '']
13
-
14
12
  module_function
15
13
  def make_image(canvas, uri_str, prop={})
16
- uri = URI.parse(uri_str)
17
- scheme = uri.scheme
18
- unless ALLOWED_IMG_URL_SCHEME.include?(scheme.to_s.downcase)
19
- return nil
20
- end
14
+ path = Private.uri_string_to_image_filename(canvas, uri_str)
21
15
  begin
22
- Element::Image.new(Private.image_filename(canvas, uri), prop)
16
+ Element::Image.new(path, prop)
23
17
  rescue Error
24
18
  canvas.logger.warn($!.message)
25
19
  nil
@@ -45,24 +39,42 @@ module Rabbit
45
39
  end
46
40
 
47
41
  module Private
42
+ ALLOWED_IMG_URL_SCHEME = ['http', 'https', 'file']
43
+
48
44
  module_function
49
- def image_filename(canvas, uri)
45
+ def uri_string_to_image_filename(canvas, uri_string)
46
+ if start_with_scheme?(uri_string)
47
+ uri = URI.parse(uri_string)
48
+ scheme = uri.scheme
49
+ unless ALLOWED_IMG_URL_SCHEME.include?(scheme.to_s.downcase)
50
+ return nil
51
+ end
52
+ uri_to_image_filename(canvas, uri)
53
+ else
54
+ local_path_to_image_filename(canvas, uri_string)
55
+ end
56
+ end
57
+
58
+ def uri_to_image_filename(canvas, uri)
50
59
  case uri.scheme.to_s.downcase
51
60
  when "file"
52
61
  GLib.filename_from_utf8(uri.path)
53
62
  when "http", "https", "ftp"
54
63
  other_uri_filename(canvas, uri)
55
64
  else
56
- path = Pathname.new(GLib.filename_from_utf8(uri.path))
57
- return path.to_s if path.absolute?
65
+ nil
66
+ end
67
+ end
58
68
 
59
- expanded_path = canvas.full_path(path.to_s)
60
- expanded_uri = URI(expanded_path)
61
- if expanded_uri.scheme.nil?
62
- expanded_path
63
- else
64
- image_filename(canvas, expanded_uri)
65
- end
69
+ def local_path_to_image_filename(canvas, path)
70
+ path = Pathname.new(GLib.filename_from_utf8(path))
71
+ return path.to_s if path.absolute?
72
+
73
+ expanded_path = canvas.full_path(path.to_s)
74
+ if start_with_scheme?(expanded_path)
75
+ uri_string_to_image_filename(canvas, expanded_path)
76
+ else
77
+ expanded_path
66
78
  end
67
79
  end
68
80
 
@@ -89,6 +101,10 @@ module Rabbit
89
101
  canvas.logger.warn("#{$!.message}: #{uri}")
90
102
  end
91
103
  end
104
+
105
+ def start_with_scheme?(uri_string)
106
+ /\A[a-z][a-z\d+\-.]+:/i =~ uri_string
107
+ end
92
108
  end
93
109
  end
94
110
  end
@@ -11,8 +11,12 @@ module Rabbit
11
11
  unshift_loader(self)
12
12
  class << self
13
13
  def match?(source)
14
- return true if /\Apdf\z/i =~ source.extension.to_s
15
- source.read.start_with?("%PDF-1.")
14
+ extension = source.extension
15
+ if extension.nil?
16
+ source.read.start_with?("%PDF-1.")
17
+ else
18
+ /\Apdf\z/i =~ extension
19
+ end
16
20
  end
17
21
  end
18
22