- Show Statistics and HoltGraph only when the user wants them

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1151 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-09-14 16:20:01 +00:00
parent 382b38ab6a
commit aec289ed92
3 changed files with 48 additions and 101 deletions

View File

@ -1,83 +1,48 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!-- Generated with glade3
Version: 3.0.1
Date: Thu Sep 14 18:24:17 2006
User: matteo
Host: tulip
-->
<glade-interface> <glade-interface>
<widget class="GtkWindow" id="StatisticsWindow">
<widget class="GtkWindow" id="StatisticsWindow"> <property name="width_request">400</property>
<property name="visible">True</property> <property name="height_request">250</property>
<property name="title" translatable="yes">window1</property> <property name="title">Statistics</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="icon_name">stock_chart-edit-type</property> <property name="icon_name">stock_chart-edit-type</property>
<property name="decorated">True</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_UTILITY</property>
<property name="skip_taskbar_hint">False</property> <property name="gravity">GDK_GRAVITY_SOUTH_EAST</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<child> <child>
<widget class="GtkVPaned" id="vpaned1"> <widget class="GtkVPaned" id="MainVPaned">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<child> <child>
<widget class="GtkScrolledWindow" id="SchedulableStatisticsScroll"> <widget class="GtkScrolledWindow" id="SchedulableStatisticsScroll">
<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="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
</widget> </widget>
<packing> <packing>
<property name="shrink">True</property>
<property name="resize">False</property> <property name="resize">False</property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkVPaned" id="vpaned2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child> <child>
<widget class="GtkScrolledWindow" id="SimulationStatisticsScroll"> <widget class="GtkScrolledWindow" id="SimulationStatisticsScroll">
<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="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
</widget> </widget>
<packing> <packing>
<property name="shrink">True</property>
<property name="resize">False</property> <property name="resize">False</property>
</packing> </packing>
</child> </child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="shrink">True</property>
<property name="resize">True</property>
</packing>
</child>
</widget> </widget>
</child> </child>
</widget> </widget>
</glade-interface> </glade-interface>

View File

@ -674,22 +674,8 @@ GuiBuilder::GuiBuilder(const std::string& gladefile)
// HoltGraph container window // HoltGraph container window
_holt_container.set_transient_for(main_window); _holt_container.set_transient_for(main_window);
_holt_container.get_holt_widget().set_show_threads(_show_threads); _holt_container.get_holt_widget().set_show_threads(_show_threads);
_holt_container.show();
_statistics_container.get_main_window()->set_transient_for(main_window); _statistics_container.get_main_window()->set_transient_for(main_window);
// Moves and resize windows
int w = gdk_screen_width(), h= gdk_screen_height();;
get_initial_window().move(0,0);
get_initial_window().resize(w,(h/3)*2 - 50);
_holt_container.move(0, (h/3)*2);
_holt_container.resize(h/3, h/3);
_statistics_container.get_main_window()->move(h/3 + 15,(h/3)*2);
_statistics_container.get_main_window()->resize(w - h/3 - 15, h/3);
} }

View File

@ -36,7 +36,7 @@ StatisticsContainerWindow::StatisticsContainerWindow(const std::string& gladefil
// This just sets the title of our new window. // This just sets the title of our new window.
_main_win->set_title(_("Simulation Statistics")); _main_win->set_title(_("Simulation Statistics"));
_main_win->set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY);
ScrolledWindow *scroll1, *scroll2; ScrolledWindow *scroll1, *scroll2;
_refXml->get_widget("SchedulableStatisticsScroll", scroll1); _refXml->get_widget("SchedulableStatisticsScroll", scroll1);
@ -47,15 +47,11 @@ StatisticsContainerWindow::StatisticsContainerWindow(const std::string& gladefil
_tab_sim = manage(new TabularSimulationStatisticsWidget()); _tab_sim = manage(new TabularSimulationStatisticsWidget());
scroll2->add(*_tab_sim); scroll2->add(*_tab_sim);
_main_win->show();
scroll1->show(); scroll1->show();
scroll2->show(); scroll2->show();
_tab_sched->show(); _tab_sched->show();
_tab_sim->show(); _tab_sim->show();
_main_win->set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY);
/* /*
_scrolled_tabular.add(_tabular_schedulables_statistics_widget); _scrolled_tabular.add(_tabular_schedulables_statistics_widget);
add(_scrolled_tabular); add(_scrolled_tabular);