Changes: Fix get-coordinates.rb

RevBy: TrustMe
pull/1/head
Oskari Timperi 15 years ago
parent 828c41d5c9
commit 958c1ce736

@ -132,27 +132,17 @@ end
sleep(2) sleep(2)
if @meegoHome.test_object_exists?("LauncherButton", :text => appName) if @meegoHome.test_object_exists?(:name => "LauncherButton", :text => appName)
icon = @meegoHome.LauncherButton(:name => "LauncherButton", :text => appName) icon = @meegoHome.SwipeLauncherButton(:name => "LauncherButton", :text => appName)
grid = nil
if @meegoHome.test_object_exists?("Launcher" )
grid = @meegoHome.Launcher
elsif @meegoHome.test_object_exists?("SwipeLauncher" )
grid = @meegoHome.SwipeLauncher
else
raise "Launcher not found!"
exit 1
end
while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400 while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400
grid.MPannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 300) @meegoHome.MPannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 300)
sleep(0.2) sleep(0.2)
icon.refresh icon.refresh
end end
xpos = @meegoHome.LauncherButton(:name => "LauncherButton", :text => appName).attribute('x') xpos = @meegoHome.SwipeLauncherButton(:name => "LauncherButton", :text => appName).attribute('x')
xpos = xpos.to_i + 59 xpos = xpos.to_i + 59
ypos = @meegoHome.LauncherButton(:name => "LauncherButton", :text => appName).attribute('y') ypos = @meegoHome.SwipeLauncherButton(:name => "LauncherButton", :text => appName).attribute('y')
ypos = ypos.to_i + 58 ypos = ypos.to_i + 58
@pos = "#{xpos}x#{ypos}" @pos = "#{xpos}x#{ypos}"

Loading…
Cancel
Save