Sha256: 6114e37ecb3701e423cf8a379fb43c0957d1af96c0e779b09340e436e2ef4f7c

Contents?: true

Size: 696 Bytes

Versions: 12

Compression:

Stored size: 696 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?
  Gtk.timeout_remove(@@slide_show_timeout_id)
end

@@slide_show_timeout_id = Gtk.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("NextSlide")
    true
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rabbit-1.0.4 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-1.0.3 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-1.0.2 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-1.0.1 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-1.0.0 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-0.9.3 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-0.9.2 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-0.9.1 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-0.9.0 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-0.6.4 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-0.6.3 lib/rabbit/theme/slide-show/slide-show.rb
rabbit-0.6.2 lib/rabbit/theme/slide-show/slide-show.rb