Author: aschnell Date: Mon Jan 19 23:53:03 2009 New Revision: 54785 URL: http://svn.opensuse.org/viewcvs/yast?rev=54785&view=rev Log: - allow exporting graph Modified: trunk/storage/storage/src/include/ep-graph.ycp Modified: trunk/storage/storage/src/include/ep-graph.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-graph.ycp?rev=54785&r1=54784&r2=54785&view=diff ============================================================================== --- trunk/storage/storage/src/include/ep-graph.ycp (original) +++ trunk/storage/storage/src/include/ep-graph.ycp Mon Jan 19 23:53:03 2009 @@ -12,7 +12,6 @@ { string filename = Directory::tmpdir + "/storage.dot"; y2milestone("saving graph to %1", filename); - Storage::SaveGraph(filename); UI::ReplaceWidget(`tree_panel, @@ -21,8 +20,13 @@ // dialog heading, graph is the mathematic term for // a set of notes connected with edges `IconAndHeading(_("Graph"), graph_icon), - `Graph(filename, "dot")) - ) + `Graph(`id(`graph), filename, "dot"), + `HBox( + // button text + `PushButton(`id(`export), _("Export Graph...")), + `HStretch() + ) + )) ); // helptext @@ -34,5 +38,18 @@ void HandleGraphPanel(any user_data, symbol widget) { + switch (widget) + { + case `export: + { + string filename = UI::AskForSaveFileName("/tmp", "*.dot", "Save as..."); + if (filename != nil) + { + y2milestone("saving graph to %1", filename); + Storage::SaveGraph(filename); + } + } + break; + } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org