- Move JumpTo to the main window
- Simplify progress dialog for JumpTo - TODO: this code is buggy. SGPEMv2 won't exit after using JumpTo, unless you kill it explicitly. git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1113 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
538470f96c
commit
0fe1e13ef9
|
@ -1,344 +1,74 @@
|
|||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
||||
<!-- Generated with glade3
|
||||
Version: 3.0.1
|
||||
Date: Tue Sep 12 21:18:38 2006
|
||||
User: matteo
|
||||
Host: tulip
|
||||
-->
|
||||
<glade-interface>
|
||||
|
||||
<widget class="GtkDialog" id="JumpToDialog">
|
||||
<property name="title">Jump To...</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_MOUSE</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="window_position">GTK_WIN_POS_MOUSE</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<property name="has_separator">True</property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="MainVBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="MainButtonBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="OK.Button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="response_id">-5</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="ProgressBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">6</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="Instant.Table">
|
||||
<widget class="GtkLabel" id="Label.Description">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">1</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">6</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="Instant.Spin">
|
||||
<property name="width_request">146</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||
<property name="snap_to_ticks">False</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="adjustment">1 1 inf 1 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">expand</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="Instant.Label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Instant</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Jump.Button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment1">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xscale">0</property>
|
||||
<property name="yscale">0</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="left_padding">0</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-jump-to</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Jump!</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<property name="label" translatable="yes"><b>Please wait...</b>
|
||||
while we advance the simulation to fulfill your request:</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHSeparator" id="Separator">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="Progress.Table">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">1</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">6</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Stop.Button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment2">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xscale">0</property>
|
||||
<property name="yscale">0</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="left_padding">0</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-media-stop</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="Stop.Label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Stop</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkProgressBar" id="ProgressBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
|
||||
<property name="fraction">0</property>
|
||||
<property name="pulse_step">0.10000000149</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="pulse_step">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="y_options"></property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">4</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="MainButtonBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="Button.Stop">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="is_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="label" translatable="yes">gtk-media-stop</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</glade-interface>
|
||||
|
|
|
@ -1,97 +1,80 @@
|
|||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
||||
<!-- Generated with glade3
|
||||
Version: 3.0.1
|
||||
Date: Tue Sep 12 21:23:07 2006
|
||||
User: matteo
|
||||
Host: tulip
|
||||
-->
|
||||
<glade-interface>
|
||||
|
||||
<widget class="GtkWindow" id="MainWindow">
|
||||
<property name="title">SGPEMv2</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="default_width">800</property>
|
||||
<property name="default_height">600</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon_name">gtk-dialog-warning</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</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>
|
||||
<property name="urgency_hint">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="MainBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuBar" id="MenuBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
|
||||
<property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="MenuItem.File">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_File</property>
|
||||
<property name="label">_File</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="MenuItem.File_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.File.New">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-new</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.File.Open">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-open</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.File.Save">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-save</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.File.SaveAs">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-save-as</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.File.Close">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="separator1">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.File.Quit">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-quit</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
@ -99,20 +82,18 @@
|
|||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="MenuItem.Edit">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Edit</property>
|
||||
<property name="label">_Edit</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="MenuItem.Edit_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.Edit.Preferences">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-preferences</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
@ -120,30 +101,26 @@
|
|||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="MenuItem.View">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_View</property>
|
||||
<property name="label">_View</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="MenuItem.View_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="MenuItem.View.ShowThreads">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Enable/disable threads visualization in Graphs</property>
|
||||
<property name="label" translatable="yes">Show _Threads</property>
|
||||
<property name="tooltip">Enable/disable threads visualization in Graphs</property>
|
||||
<property name="label">Show _Threads</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="MenuItem.View.ShowHoltGraph">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Show/Hide holt graph window</property>
|
||||
<property name="label" translatable="yes">Show _Holt Graph</property>
|
||||
<property name="tooltip">Show/Hide holt graph window</property>
|
||||
<property name="label">Show _Holt Graph</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
@ -151,89 +128,69 @@
|
|||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="MenuItem.Simulation">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Simulation</property>
|
||||
<property name="label">_Simulation</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="MenuItem.Simulation_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.Simulation.Play">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-media-play</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.Simulation.Pause">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="label">gtk-media-pause</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.Simulation.Stop">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="label">gtk-media-stop</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="activate" handler="on_stop1_activate"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="MenuItem.Simulation.Separator2">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.Simulation.JumpTo">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-jump-to</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="MenuItem.Simulation.Separator1">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="MenuItem.Simulation.ContinuousMode">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Continuous mode</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="label">Continuous mode</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="MenuItem.Help">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Help</property>
|
||||
<property name="label">_Help</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="MenuItem.Help_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="MenuItem.Help.About">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-about</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
@ -243,222 +200,110 @@
|
|||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolbar" id="ToolBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
|
||||
<property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
|
||||
<property name="tooltips">True</property>
|
||||
<property name="show_arrow">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="ToolBar.Open">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock_id">gtk-open</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="ToolBar.Save">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock_id">gtk-save</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorToolItem" id="ToolBar.Separator0">
|
||||
<property name="visible">True</property>
|
||||
<property name="draw">True</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="ToolBar.Play">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip">Start the simulation</property>
|
||||
<property name="stock_id">gtk-media-play</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<property name="tooltip">Start the simulation</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="ToolBar.Pause">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="stock_id">gtk-media-pause</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="ToolBar.Stop">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="stock_id">gtk-media-stop</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorToolItem" id="ToolBar.Separator1">
|
||||
<property name="visible">True</property>
|
||||
<property name="draw">True</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuToolButton" id="ToolBar.PolicySelector">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Scheduling Policy</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-convert</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorToolItem" id="ToolBar.Separator2">
|
||||
<property name="visible">True</property>
|
||||
<property name="draw">True</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuToolButton" id="ToolBar.ResourceScheduling">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Resource Scheduling</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-select-color</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkStatusbar" id="MainStatusBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="has_resize_grip">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVPaned" id="MainVPaned">
|
||||
<property name="border_width">1</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">1</property>
|
||||
<property name="position">200</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHPaned" id="EntitiesHPaned">
|
||||
<property name="visible">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="SchedulablesFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0</property>
|
||||
<property name="label_xalign">0,000000</property>
|
||||
<property name="label_yalign">0,000000</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="SchedulablesFrame.Alignment">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xscale">1</property>
|
||||
<property name="yscale">1</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="xalign">0,000000</property>
|
||||
<property name="yalign">0,000000</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="SchedulablesScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="shadow_type">GTK_SHADOW_OUT</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
@ -466,24 +311,14 @@
|
|||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="SchedulablesFrame.Label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><i>Schedulables</i></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="xalign">0,000000</property>
|
||||
<property name="yalign">0,000000</property>
|
||||
<property name="ypad">2</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
<property name="label" translatable="yes"><i>Schedulables</i></property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">label_item</property>
|
||||
|
@ -491,73 +326,45 @@
|
|||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="shrink">True</property>
|
||||
<property name="resize">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="ResourcesFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0</property>
|
||||
<property name="label_xalign">0,000000</property>
|
||||
<property name="label_yalign">0,000000</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="SchedulablesFrame.Alignment">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xscale">1</property>
|
||||
<property name="yscale">1</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="xalign">0,000000</property>
|
||||
<property name="yalign">0,000000</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="ResourcesScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="shadow_type">GTK_SHADOW_OUT</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTreeView" id="Resources.Tree">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_visible">True</property>
|
||||
<property name="rules_hint">False</property>
|
||||
<property name="reorderable">False</property>
|
||||
<property name="enable_search">True</property>
|
||||
<property name="fixed_height_mode">False</property>
|
||||
<property name="hover_selection">False</property>
|
||||
<property name="hover_expand">False</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="ResourcesFrame.Label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><i>Resources</i></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="xalign">0,000000</property>
|
||||
<property name="yalign">0,000000</property>
|
||||
<property name="ypad">2</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
<property name="label" translatable="yes"><i>Resources</i></property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">label_item</property>
|
||||
|
@ -565,66 +372,90 @@
|
|||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="shrink">True</property>
|
||||
<property name="resize">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="shrink">False</property>
|
||||
<property name="resize">False</property>
|
||||
<property name="shrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="SimulationScrolledWindow">
|
||||
<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_AUTOMATIC</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="shrink">True</property>
|
||||
<property name="resize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="ReadyQueueBox">
|
||||
<widget class="GtkHBox" id="BottomHBox">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkVSeparator" id="BottomHBox.VSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="BottomHBox.JumpToSpin">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="adjustment">1 1 inf 1 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="padding">3</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="BottomHBox.JumpToButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">gtk-jump-to</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkStatusbar" id="MainStatusBar">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkAboutDialog" id="AboutDialog">
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="name" translatable="yes">SGPEMv2</property>
|
||||
<property name="copyright">University of Padova, dept. of Pure and Applied Mathematics</property>
|
||||
<property name="comments">An educational simulator for process scheduling policies in a monoprocessor computer.</property>
|
||||
<property name="license">SGPEMv2 comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the terms of the GNU General Public License; for details see file COPYING contained in the source package.</property>
|
||||
<property name="wrap_license">False</property>
|
||||
<property name="authors">Filippo Paparella <ironpipp@gmail.com>
|
||||
Paolo Santi <psanti@studenti.math.unipd.it>
|
||||
Matteo Settenvini <matteo@member.fsf.org>
|
||||
|
@ -638,32 +469,24 @@ Matteo Settenvini <matteo@member.fsf.org>
|
|||
Marco Trevisan <mtrevisa@studenti.math.unipd.it>
|
||||
Djina Verbanac <betalgez@yahoo.com>
|
||||
Luca Vezzaro <lvezzaro@studenti.math.unipd.it></property>
|
||||
<property name="translator_credits"></property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="AboutDialog.VBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">12</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="AboutDialog.ActionArea">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</glade-interface>
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include <glibmm/markup.h>
|
||||
#include <glibmm/ustring.h>
|
||||
#include <gtkmm/aboutdialog.h>
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/messagedialog.h>
|
||||
#include <gtkmm/menutoolbutton.h>
|
||||
#include <gtkmm/filechooserdialog.h>
|
||||
|
@ -60,6 +61,7 @@
|
|||
#include <gtkmm/radiomenuitem.h>
|
||||
#include <gtkmm/radiobuttongroup.h>
|
||||
#include <gtkmm/scrolledwindow.h>
|
||||
#include <gtkmm/spinbutton.h>
|
||||
#include <gtkmm/statusbar.h>
|
||||
#include <gtkmm/stock.h>
|
||||
|
||||
|
@ -77,16 +79,26 @@ GuiBuilder::on_edit_preferences_activate()
|
|||
}
|
||||
|
||||
void
|
||||
GuiBuilder::on_simulation_jump_to_activate()
|
||||
GuiBuilder::on_simulation_jump_to_clicked()
|
||||
{
|
||||
using Gnome::Glade::Xml;
|
||||
|
||||
Glib::RefPtr<Xml> jump_to_dialog_glade = Xml::create(GLADEDIR "/jump-to-dialog.glade");
|
||||
// JumpTo spinbox
|
||||
Gtk::SpinButton* jump_to_spin;
|
||||
_refXml->get_widget("BottomHBox.JumpToSpin", jump_to_spin);
|
||||
int target_instant = jump_to_spin->get_value_as_int();
|
||||
assert(target_instant > 0);
|
||||
|
||||
Glib::RefPtr<Xml> jump_to_dialog_glade = Xml::create(GLADEDIR "/jump-to-dialog.glade");
|
||||
JumpToDialog* jump_to_dialog = NULL;
|
||||
jump_to_dialog_glade->get_widget_derived("JumpToDialog", jump_to_dialog);
|
||||
|
||||
jump_to_dialog->set_transient_for(get_initial_window());
|
||||
jump_to_dialog->set_target_instant(target_instant);
|
||||
jump_to_dialog->run();
|
||||
|
||||
jump_to_dialog->hide();
|
||||
delete jump_to_dialog;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -545,11 +557,6 @@ GuiBuilder::GuiBuilder(const std::string& gladefile)
|
|||
_refXml->get_widget("MenuItem.Edit.Preferences", edit_preferences);
|
||||
edit_preferences->signal_activate().connect(sigc::mem_fun(*this, &GuiBuilder::on_edit_preferences_activate));
|
||||
|
||||
// JumpTo
|
||||
MenuItem* simulation_jump_to = NULL;
|
||||
_refXml->get_widget("MenuItem.Simulation.JumpTo", simulation_jump_to);
|
||||
simulation_jump_to->signal_activate().connect(sigc::mem_fun(*this, &GuiBuilder::on_simulation_jump_to_activate));
|
||||
|
||||
// enable/disable show threads on widgets
|
||||
MenuItem* show_threads;
|
||||
_refXml->get_widget("MenuItem.View.ShowThreads", show_threads);
|
||||
|
@ -633,12 +640,18 @@ GuiBuilder::GuiBuilder(const std::string& gladefile)
|
|||
|
||||
// ReadyQueue custom label widget
|
||||
ReadyQueueWidget& rq_widget = *manage(new ReadyQueueWidget(Simulation::get_instance().get_history()));
|
||||
HBox* rqb;
|
||||
_refXml->get_widget("ReadyQueueBox", rqb);
|
||||
rqb->pack_start(rq_widget);
|
||||
HBox* bottomhbox;
|
||||
_refXml->get_widget("BottomHBox", bottomhbox);
|
||||
bottomhbox->pack_start(rq_widget);
|
||||
rq_widget.show();
|
||||
|
||||
|
||||
// JumpTo button
|
||||
Button* simulation_jump_to = NULL;
|
||||
_refXml->get_widget("BottomHBox.JumpToButton", simulation_jump_to);
|
||||
simulation_jump_to->signal_clicked().connect(sigc::mem_fun(*this, &GuiBuilder::on_simulation_jump_to_clicked));
|
||||
|
||||
|
||||
// HoltGraph container window
|
||||
_holt_container.set_keep_above();
|
||||
_holt_container.get_holt_widget().set_show_threads(_show_threads);
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace sgpem
|
|||
|
||||
void on_edit_preferences_activate();
|
||||
|
||||
void on_simulation_jump_to_activate();
|
||||
void on_simulation_jump_to_clicked();
|
||||
|
||||
void on_view_show_threads_activate();
|
||||
void on_view_show_holt_graph_activate();
|
||||
|
@ -85,7 +85,6 @@ namespace sgpem
|
|||
StatisticsContainerWindow _statistics_container;
|
||||
SimulationWidget* _simulation_widget;
|
||||
bool _show_threads;
|
||||
|
||||
};
|
||||
|
||||
} //~ namespace sgpem
|
||||
|
|
|
@ -31,53 +31,49 @@
|
|||
#include <gtkmm/main.h>
|
||||
#include <gtkmm/messagedialog.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
using namespace sgpem;
|
||||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
using Gnome::Glade::Xml;
|
||||
using std::vector;
|
||||
|
||||
|
||||
JumpToDialog::JumpToDialog(BaseObjectType* cobject, const RefPtr<Xml>& glade) :
|
||||
Dialog(cobject), _glade(glade), _target_instant(0)
|
||||
{
|
||||
_glade->get_widget("OK.Button", _ok_button);
|
||||
_glade->get_widget("Jump.Button", _jump_button);
|
||||
_glade->get_widget("Stop.Button", _stop_button);
|
||||
_glade->get_widget("Instant.Spin", _instant_spin);
|
||||
_glade->get_widget("Button.Stop", _stop_button);
|
||||
_glade->get_widget("ProgressBar", _progress);
|
||||
|
||||
|
||||
/** ATTACH SIGNAL HANDLERS FOR BUTTONS **/
|
||||
|
||||
_jump_button->signal_clicked().connect(
|
||||
sigc::mem_fun(*this, &JumpToDialog::_on_jump));
|
||||
|
||||
_stop_button->signal_clicked().connect(
|
||||
sigc::mem_fun(*this, &JumpToDialog::_on_stop));
|
||||
|
||||
_ok_button->signal_clicked().connect(sigc::bind(
|
||||
sigc::mem_fun(*this, &JumpToDialog::response), RESPONSE_OK));
|
||||
_ok_button->signal_clicked().connect(
|
||||
sigc::mem_fun(*this, &JumpToDialog::hide));
|
||||
|
||||
// FIXME: not implemented
|
||||
_stop_button->set_sensitive(false);
|
||||
// Attach signal handlers for the Stop button
|
||||
_stop_button->signal_clicked().connect(sigc::mem_fun(*this, &JumpToDialog::_on_stop));
|
||||
signal_show().connect(sigc::mem_fun(*this, &JumpToDialog::_on_jump));
|
||||
}
|
||||
|
||||
|
||||
unsigned int
|
||||
JumpToDialog::set_target_instant(unsigned int new_target)
|
||||
{
|
||||
unsigned int temp = _target_instant;
|
||||
_target_instant = new_target;
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
unsigned int
|
||||
JumpToDialog::get_target_instant() const
|
||||
{
|
||||
return _target_instant;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
JumpToDialog::_on_jump()
|
||||
{
|
||||
_ok_button->set_sensitive(false);
|
||||
_stop_button->set_sensitive(true);
|
||||
_jump_button->set_sensitive(false);
|
||||
_progress->set_fraction(0.0);
|
||||
|
||||
assert(_instant_spin->get_value_as_int() > 0);
|
||||
_target_instant = _instant_spin->get_value_as_int();
|
||||
assert(_target_instant > 0);
|
||||
|
||||
Simulation& sim = Simulation::get_instance();
|
||||
History& h = sim.get_history();
|
||||
|
@ -99,7 +95,7 @@ JumpToDialog::_on_jump()
|
|||
break; // Simulation ended before reaching _target_instant
|
||||
}
|
||||
}
|
||||
// TODO: exception handling copied from SimulationController, it should be factored out
|
||||
// TODO: exception handling copied from SimulationController, it should be factored out (?)
|
||||
catch(const UserInterruptException& uie)
|
||||
{
|
||||
// Show the user a dialog
|
||||
|
@ -141,20 +137,30 @@ JumpToDialog::_on_jump()
|
|||
diag.run();
|
||||
}
|
||||
|
||||
h.set_notify_enabled(reenable);
|
||||
// Ending successfully: detach me, reenable notifications,
|
||||
// and emit response ``okay''
|
||||
sim.detach(*this);
|
||||
|
||||
_ok_button->set_sensitive(true);
|
||||
_stop_button->set_sensitive(false);
|
||||
_jump_button->set_sensitive(true);
|
||||
h.set_notify_enabled(reenable);
|
||||
response(Gtk::RESPONSE_OK);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
JumpToDialog::_on_stop()
|
||||
{
|
||||
Simulation::get_instance().stop();
|
||||
response(Gtk::RESPONSE_CANCEL);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
JumpToDialog::on_delete_event(GdkEventAny* event)
|
||||
{
|
||||
_on_stop();
|
||||
return Dialog::on_delete_event(event);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
JumpToDialog::update(const Simulation& changed_simulation)
|
||||
{
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
#include <sgpemv2/simulation_observer.hh>
|
||||
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/dialog.h>
|
||||
#include <gtkmm/spinbutton.h>
|
||||
#include <gtkmm/progressbar.h>
|
||||
#include <libglademm/xml.h>
|
||||
|
||||
|
@ -37,6 +37,12 @@ namespace sgpem
|
|||
public:
|
||||
JumpToDialog(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade);
|
||||
|
||||
unsigned int set_target_instant(unsigned int new_target = 0);
|
||||
unsigned int get_target_instant() const;
|
||||
|
||||
protected:
|
||||
bool on_delete_event(GdkEventAny* event);
|
||||
|
||||
private:
|
||||
void _on_jump();
|
||||
void _on_stop();
|
||||
|
@ -45,11 +51,7 @@ namespace sgpem
|
|||
|
||||
Glib::RefPtr<Gnome::Glade::Xml> _glade;
|
||||
|
||||
Gtk::Button* _jump_button;
|
||||
Gtk::Button* _stop_button;
|
||||
Gtk::Button* _ok_button;
|
||||
Gtk::SpinButton* _instant_spin;
|
||||
|
||||
Gtk::ProgressBar* _progress;
|
||||
|
||||
unsigned int _target_instant;
|
||||
|
|
Loading…
Reference in New Issue