lib/framework/rho/rhoapplication.rb in rhodes-1.4.2 vs lib/framework/rho/rhoapplication.rb in rhodes-1.5.0
- old
+ new
@@ -9,11 +9,12 @@
TOOLBAR_TYPE = 0
TABBAR_TYPE = 1
NOBAR_TYPE = 2
- @@toolbar = []
+ @@toolbar = [{:action => :back}, {:action => :forward}, {:action => :separator},
+ {:action => :home}, {:action => :refresh}, {:action => :options} ]
def initialize
LocalizationSimplified.requre_loc(Rho::RhoFSConnector::get_app_path('app') + 'lang/lang_',true)
unless @rhom
@@ -26,10 +27,11 @@
if @tabs
# normalize the list
@tabs.map! { |tab| tab[:refresh] = false unless tab[:refresh]; tab }
puts "Initializing application with tabs: #{@tabs.inspect}"
NativeBar.create(TABBAR_TYPE, @tabs)
+ NativeBar.switch_tab(0)
elsif @@toolbar
NativeBar.create(TOOLBAR_TYPE, @@toolbar)
else
NativeBar.create(NOBAR_TYPE, [])
end
@@ -72,6 +74,6 @@
res['request-body'] = (Object.const_get(req['model']+'Controller').new).send :serve, self, @rhom, req, res
end
end # RhoApplication
-end # Rho
\ No newline at end of file
+end # Rho