diff --git a/workflows/go_workflow.py b/workflows/go_workflow.py
index 3c9987a..571f1f8 100644
--- a/workflows/go_workflow.py
+++ b/workflows/go_workflow.py
@@ -106,31 +106,30 @@ class DatasetInfoFunction(Function):
Function.__init__(self, 'data_info', 'Show information')
def run(self, data):
- if data:
- logger.log('notice', 'Generating view for %s.' % data.get_name())
- return [DatasetInfoView(data)]
- else:
- logger.log('notice', 'Not generating view... no data.')
+ if not data:
return []
-
-
-class DatasetInfoView(plots.Plot):
- def __init__(self, data):
- plots.Plot.__init__(self, None)
buf = gtk.TextBuffer()
buf_iter = buf.get_start_iter()
buf.insert(buf_iter, "Data: %s\n\n" % data.get_name())
+
buf.insert(buf_iter, "Dimensions: ")
dims = []
for name in data.get_dim_names():
dims.append((name, data.dims[data._dim_num[name]]))
- buf.insert(buf_iter, ", ".join(["%s (%d)" % dim for dim in dims]))
+ dim_text = ", ".join(["%s (%d)" % dim for dim in dims])
- area = gtk.TextView(buf)
- area.connect('button_press_event', self.on_button_press)
- area.set_editable(False)
- self.add(area)
- area.show()
+ text = """Data: %s
+
+Dimensions: %s""" % (data.get_name(), dim_text)
+
+ d = gtk.MessageDialog(flags=(gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT),
+ buttons=gtk.BUTTONS_OK)
+ d.set_markup(text)
+ d.set_default_response(gtk.BUTTONS_OK)
+ d.run()
+ d.destroy()
+
+ return []