- 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
6 changed files with 628 additions and 1055 deletions
|
@ -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;
|
||||
|
||||
// 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue