[nemiver] Allow breaking on events again (Closes: #631925)
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Allow breaking on events again (Closes: #631925)
- Date: Fri, 15 Oct 2010 20:49:10 +0000 (UTC)
commit baab44c48dc9d1b451920efd2cadd3bcb66c4d0d
Author: Dodji Seketeli <dodji seketeli org>
Date: Fri Oct 15 22:41:10 2010 +0200
Allow breaking on events again (Closes: #631925)
* src/persp/dbgperspective/nmv-set-breakpoint-dialog.cc
(SetBreakpointDialog::Priv::Priv): Create a cell renderer, make
the combo box use it and make sure it displays the event label we
it to show.
.../dbgperspective/nmv-set-breakpoint-dialog.cc | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-set-breakpoint-dialog.cc b/src/persp/dbgperspective/nmv-set-breakpoint-dialog.cc
index 28a25c4..e29b2f5 100644
--- a/src/persp/dbgperspective/nmv-set-breakpoint-dialog.cc
+++ b/src/persp/dbgperspective/nmv-set-breakpoint-dialog.cc
@@ -58,6 +58,7 @@ public:
Gtk::ComboBox *combo_event;
EventComboModelColumns combo_event_cols;
Glib::RefPtr<Gtk::ListStore> combo_event_model;
+ Gtk::CellRendererText combo_event_cell_renderer;
Gtk::Entry *entry_filename;
Gtk::Entry *entry_line;
Gtk::Entry *entry_function;
@@ -98,8 +99,20 @@ public:
(a_gtkbuilder, "combo_event");
combo_event_model = Gtk::ListStore::create (combo_event_cols);
combo_event->set_model (combo_event_model);
- Gtk::TreeModel::Row row;
+ // Clear the cell renderer that might have been
+ // associated to the combo box before.
+ combo_event->clear ();
+
+ // Then make sure the combo box uses a text cell renderer
+ combo_event->pack_start (combo_event_cell_renderer);
+
+ // And display the content of the m_label column of
+ // combo_even_cols in the combo box.
+ combo_event->add_attribute (combo_event_cell_renderer.property_text (),
+ combo_event_cols.m_label);
+
+ Gtk::TreeModel::Row row;
row = *(combo_event_model->append ());
row[combo_event_cols.m_label] = _("Throw Exception");
row[combo_event_cols.m_command] = "throw";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]