Permalink
Browse files

One major bug fix in data, minot UI tweaks for demo

  • Loading branch information...
1 parent 9fdc319 commit 1be4136f7098e74aa14ba8a34df4faedbcb80184 Cyrus Hall committed Mar 19, 2007
Showing with 36 additions and 15 deletions.
  1. +2 −5 lib/gosim/data.rb
  2. +33 −9 lib/gosim/view.glade
  3. +1 −1 lib/gosim/view.rb
View
7 lib/gosim/data.rb
@@ -58,12 +58,9 @@ def queue_to(time)
event = next_event()
break if event.nil?
- puts "Event read #{event.inspect}"
-
if event[0] == TIME_MOD
@time = event[1]
@time_inc = 0
- puts "Set time to #{@time}"
else
@sim.schedule_event(:data_set_add, @sid, @time - @sim.time, [event, @time_inc])
@time_inc += 1
@@ -86,9 +83,9 @@ def data_set_add(event)
@time_queue.sort! { | x, y | x[1] <=> y[1] }
@time_queue.each { | x | DataSet[x[0][0]].log(x[0][1]) }
@time_queue.clear
- else
- @time_queue << event
end
+
+ @time_queue << event
end
end
end #DataSetReader
View
42 lib/gosim/view.glade
@@ -319,10 +319,11 @@
<child>
<widget class="GtkVBox" id="vbox2">
+ <property name="border_width">1</property>
<property name="width_request">260</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">2</property>
<child>
<widget class="GtkFrame" id="frame3">
@@ -475,7 +476,7 @@
<widget class="GtkExpander" id="controls">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="expanded">False</property>
+ <property name="expanded">True</property>
<property name="spacing">0</property>
<child>
@@ -513,23 +514,35 @@
</child>
<child>
+ <widget class="GtkHSeparator" id="hseparator1">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="padding">2</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkExpander" id="data">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="expanded">False</property>
+ <property name="expanded">True</property>
<property name="spacing">0</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow3">
+ <property name="height_request">190</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkTreeView" id="treeview1">
+ <widget class="GtkTreeView" id="data_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
@@ -575,10 +588,21 @@
</child>
<child>
+ <widget class="GtkHSeparator" id="hseparator2">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="padding">2</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkExpander" id="expander3">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="expanded">True</property>
+ <property name="expanded">False</property>
<property name="spacing">0</property>
<child>
@@ -637,13 +661,13 @@
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
- <property name="shrink">True</property>
+ <property name="shrink">False</property>
<property name="resize">True</property>
</packing>
</child>
View
2 lib/gosim/view.rb
@@ -21,7 +21,7 @@ def initialize
@cur_time = @glade['current_time']
@controls = @glade['controls']
- @data = @glade['data']
+ @data = @glade['data_treeview']
@log = @glade['log']
@file_selection = @glade['file_selection']

0 comments on commit 1be4136

Please sign in to comment.