From 2ebfefae53de7d6c001554a159dbcc8edfac9ec7 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Fri, 4 Dec 2009 17:12:06 +0100 Subject: [PATCH] hover text on the additional graphs * grapher/Graph.cxx (window2GraphCoords): Take the entire graph's position into account too. * grapher/GraphWidget.cxx (GraphWidget): Hook up the data dialog's OK button. (onDataDialogOpen): If a data set doesn't have a title, use it's name (key) instead. --- grapher/Graph.cxx | 2 +- grapher/GraphWidget.cxx | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index 57f1dc9a3..b3429ef73 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -210,6 +210,6 @@ namespace systemtap double& xgraph, double& ygraph) { xgraph = x -_xOffset; - ygraph = -y + _yOffset + _graphHeight; + ygraph = -(y - _graphY) + _yOffset + _graphHeight; } } diff --git a/grapher/GraphWidget.cxx b/grapher/GraphWidget.cxx index e37485b83..3d38627f3 100644 --- a/grapher/GraphWidget.cxx +++ b/grapher/GraphWidget.cxx @@ -50,6 +50,11 @@ namespace systemtap _refXmlDataDialog->get_widget("dialog1", _dataDialog); Gtk::Button* button = 0; _refXmlDataDialog->get_widget("cancelbutton1", button); + button->signal_clicked() + .connect(sigc::mem_fun(*this, &GraphWidget::onDataDialogCancel), + false); + // XXX + _refXmlDataDialog->get_widget("okbutton1", button); button->signal_clicked() .connect(sigc::mem_fun(*this, &GraphWidget::onDataDialogCancel), false); @@ -263,7 +268,10 @@ namespace systemtap { Gtk::TreeModel::iterator litr = _listStore->append(); Gtk::TreeModel::Row row = *litr; - row[_dataColumns._dataName] = (*itr)->title; + if (!(*itr)->title.empty()) + row[_dataColumns._dataName] = (*itr)->title; + else + row[_dataColumns._dataName] = (*itr)->name; row[_dataColumns._graphData] = *itr; } } -- 2.43.5