Sha256: 1ebab2e29748dbcc8e18a6933ae8ed884beedafc90307772055463a070fbec47

Contents?: true

Size: 694 Bytes

Versions: 13

Compression:

Stored size: 694 Bytes

Contents

theme_exit unless display?

if canvas.allotted_time
  default_slide_show_span = (canvas.allotted_time / canvas.slide_size.to_f).round
else
  default_slide_show_span = 60
end
default_slide_show_span *= 1000 # milliseconds -> seconds
@slide_show_span ||= default_slide_show_span
@slide_show_loop ||= false

@@slide_show_timeout_id ||= nil

unless @@slide_show_timeout_id.nil?
  GLib::Source.remove(@@slide_show_timeout_id)
end

@@slide_show_timeout_id = GLib::Timeout.add(@slide_show_span) do
  if canvas.last_slide?
    if @slide_show_loop
      canvas.reset_timer
      canvas.activate("FirstSlide")
      true
    else
      false
    end
  else
    canvas.activate("Next")
    true
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rabbit-3.0.3 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-3.0.2 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-3.0.1 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-3.0.0 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-2.2.1 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-2.2.0 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-2.1.9 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-2.1.8 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-2.1.7 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-2.1.6 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-2.1.5 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-2.1.4 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-2.1.3 lib/rabbit/theme/slide-show/slide-show.rb