diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-07 18:51:55 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-07 18:51:55 +0100 |
commit | 9175e50559751538f4da02e6e17c61a8f5191a31 (patch) | |
tree | 5df2be08a726a77d61b1b9014c83f839640cf25e /grapher | |
parent | b930d6ec364e35bb04a0860b1a5f2fbdee6effe3 (diff) | |
download | systemtap-steved-9175e50559751538f4da02e6e17c61a8f5191a31.tar.gz systemtap-steved-9175e50559751538f4da02e6e17c61a8f5191a31.tar.xz systemtap-steved-9175e50559751538f4da02e6e17c61a8f5191a31.zip |
make the list items in the data set list unselectable
The checkbox selects the list, so it is just sloppy to allow the item
to be selected.
* grapher/GraphWidget.hxx (no_select_fun): New function; just returns
false.
* grapher/GraphWidget.cxx (GraphWidget): Connect list store selection
to function that prevents selection.
Diffstat (limited to 'grapher')
-rw-r--r-- | grapher/GraphWidget.cxx | 8 | ||||
-rw-r--r-- | grapher/GraphWidget.hxx | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/grapher/GraphWidget.cxx b/grapher/GraphWidget.cxx index db325d83..c8d8cc45 100644 --- a/grapher/GraphWidget.cxx +++ b/grapher/GraphWidget.cxx @@ -66,7 +66,13 @@ namespace systemtap _dataTreeView->append_column_editable("Enabled", _dataColumns._dataEnabled); _dataTreeView->append_column("Data", _dataColumns._dataName); - _dataTreeView->append_column("Title", _dataColumns._dataTitle); + _dataTreeView->append_column("Title", _dataColumns._dataTitle); + // Disable selection in list + Glib::RefPtr<Gtk::TreeSelection> listSelection + = _dataTreeView->get_selection(); + listSelection + ->set_select_function(sigc::mem_fun(*this, + &GraphWidget::no_select_fun)); _refXmlDataDialog->get_widget("checkbutton1", _relativeTimesButton); _relativeTimesButton->signal_clicked() .connect(sigc::mem_fun(*this, diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx index 146a08c3..a2260aef 100644 --- a/grapher/GraphWidget.hxx +++ b/grapher/GraphWidget.hxx @@ -85,6 +85,12 @@ namespace systemtap void onRowChanged(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&); sigc::connection _listConnection; + bool no_select_fun(const Glib::RefPtr<Gtk::TreeModel>& model, + const Gtk::TreeModel::Path& path, + bool) + { + return false; + } }; } #endif // SYSTEMTAP_GRAPHWIDGET_H |