From b930d6ec364e35bb04a0860b1a5f2fbdee6effe3 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 7 Dec 2009 16:50:44 +0100 Subject: Change data set list display to use a check box for inclusion in a graph Incidently, this supports removing a data set from a graph. Also, remove the Add, Remove, and Cancel buttons from the data set dialog. * grapher/GraphWidget.hxx (DataModelColumns::_dataEnabled): new member _listConnection: new member * grapher/GraphWidget.cxx (GraphWidget): Delete connections for removed buttons. Connect to dialog show and hide signals instead of map. Add "Enabled" column to dialog list. (onDataAdd, onDataRemove): delete (onDataDialogOpen): Initialize list store with all data sets and hook up row_changed signal (onDataDialogClose, onRowChanged): new functions * grapher/graph-dialog.glade: Remove obsolete buttons (Add, Remove, Cancel). --- grapher/GraphWidget.hxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'grapher/GraphWidget.hxx') diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx index ea10720c..146a08c3 100644 --- a/grapher/GraphWidget.hxx +++ b/grapher/GraphWidget.hxx @@ -18,10 +18,12 @@ namespace systemtap public: DataModelColumns() { + add(_dataEnabled); add(_dataName); add(_dataTitle); add(_graphData); } + Gtk::TreeModelColumn _dataEnabled; Gtk::TreeModelColumn _dataName; Gtk::TreeModelColumn _dataTitle; Gtk::TreeModelColumn > _graphData; @@ -64,9 +66,8 @@ namespace systemtap Gtk::Dialog* _dataDialog; Gtk::TreeView* _dataTreeView; void onDataDialogCancel(); - void onDataAdd(); - void onDataRemove(); void onDataDialogOpen(); + void onDataDialogClose(); bool onHoverTimeout(); DataModelColumns _dataColumns; Glib::RefPtr _listStore; @@ -81,6 +82,9 @@ namespace systemtap Gtk::CheckButton* _relativeTimesButton; bool _displayRelativeTimes; void onRelativeTimesButtonClicked(); + void onRowChanged(const Gtk::TreeModel::Path&, + const Gtk::TreeModel::iterator&); + sigc::connection _listConnection; }; } #endif // SYSTEMTAP_GRAPHWIDGET_H -- cgit