Skip to content

Commit

Permalink
One major bug fix in data, minot UI tweaks for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrus Hall committed Mar 19, 2007
1 parent 9fdc319 commit 1be4136
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
7 changes: 2 additions & 5 deletions lib/gosim/data.rb
Expand Up @@ -58,12 +58,9 @@ def queue_to(time)
event = next_event() event = next_event()
break if event.nil? break if event.nil?


puts "Event read #{event.inspect}"

if event[0] == TIME_MOD if event[0] == TIME_MOD
@time = event[1] @time = event[1]
@time_inc = 0 @time_inc = 0
puts "Set time to #{@time}"
else else
@sim.schedule_event(:data_set_add, @sid, @time - @sim.time, [event, @time_inc]) @sim.schedule_event(:data_set_add, @sid, @time - @sim.time, [event, @time_inc])
@time_inc += 1 @time_inc += 1
Expand All @@ -86,9 +83,9 @@ def data_set_add(event)
@time_queue.sort! { | x, y | x[1] <=> y[1] } @time_queue.sort! { | x, y | x[1] <=> y[1] }
@time_queue.each { | x | DataSet[x[0][0]].log(x[0][1]) } @time_queue.each { | x | DataSet[x[0][0]].log(x[0][1]) }
@time_queue.clear @time_queue.clear
else
@time_queue << event
end end

@time_queue << event
end end
end end
end #DataSetReader end #DataSetReader
Expand Down
42 changes: 33 additions & 9 deletions lib/gosim/view.glade
Expand Up @@ -319,10 +319,11 @@


<child> <child>
<widget class="GtkVBox" id="vbox2"> <widget class="GtkVBox" id="vbox2">
<property name="border_width">1</property>
<property name="width_request">260</property> <property name="width_request">260</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="homogeneous">False</property> <property name="homogeneous">False</property>
<property name="spacing">0</property> <property name="spacing">2</property>


<child> <child>
<widget class="GtkFrame" id="frame3"> <widget class="GtkFrame" id="frame3">
Expand Down Expand Up @@ -475,7 +476,7 @@
<widget class="GtkExpander" id="controls"> <widget class="GtkExpander" id="controls">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="expanded">False</property> <property name="expanded">True</property>
<property name="spacing">0</property> <property name="spacing">0</property>


<child> <child>
Expand Down Expand Up @@ -512,24 +513,36 @@
</packing> </packing>
</child> </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> <child>
<widget class="GtkExpander" id="data"> <widget class="GtkExpander" id="data">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="expanded">False</property> <property name="expanded">True</property>
<property name="spacing">0</property> <property name="spacing">0</property>


<child> <child>
<widget class="GtkScrolledWindow" id="scrolledwindow3"> <widget class="GtkScrolledWindow" id="scrolledwindow3">
<property name="height_request">190</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property> <property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property>


<child> <child>
<widget class="GtkTreeView" id="treeview1"> <widget class="GtkTreeView" id="data_treeview">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="headers_visible">True</property> <property name="headers_visible">True</property>
Expand Down Expand Up @@ -574,11 +587,22 @@
</packing> </packing>
</child> </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> <child>
<widget class="GtkExpander" id="expander3"> <widget class="GtkExpander" id="expander3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="expanded">True</property> <property name="expanded">False</property>
<property name="spacing">0</property> <property name="spacing">0</property>


<child> <child>
Expand Down Expand Up @@ -637,13 +661,13 @@
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>
<property name="expand">False</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
</packing> </packing>
</child> </child>
</widget> </widget>
<packing> <packing>
<property name="shrink">True</property> <property name="shrink">False</property>
<property name="resize">True</property> <property name="resize">True</property>
</packing> </packing>
</child> </child>
Expand Down
2 changes: 1 addition & 1 deletion lib/gosim/view.rb
Expand Up @@ -21,7 +21,7 @@ def initialize
@cur_time = @glade['current_time'] @cur_time = @glade['current_time']


@controls = @glade['controls'] @controls = @glade['controls']
@data = @glade['data'] @data = @glade['data_treeview']
@log = @glade['log'] @log = @glade['log']
@file_selection = @glade['file_selection'] @file_selection = @glade['file_selection']


Expand Down

0 comments on commit 1be4136

Please sign in to comment.