GNOME Bugzilla – Bug 546196
suggest snapshot filename
Last modified: 2009-10-27 12:57:27 UTC
When right clicking on the treemap/ringschart to save a snapshot of the current chart, the filechooser should be prepopulated with a default suggested filename
Created attachment 127483 [details] [review] Adds suggested filename to chart snapshot file-chooser dialog Hi, this simple patch tries to solves suggesting a filename for the file-chooser dialog. A macro called SNAPSHOT_DEF_FILENAME_FORMAT was defined in BaobabChart to hold a printf-like format for the suggested name. "%s-snapshot" is my first proposition, where %s refers to the item name currently set as root of the chart. If the chart is in summary-mode (no scanning has being done yet), %s will hold "summary", so the suggested filename would be "summary-snapshot". I encourage you to propose new filename formats. The actual filename after user pushes save, is checked the extension, and appended from the image type selected, if no specified by the user.
Created attachment 139275 [details] [review] Adds suggested filename to chart snapshot file-chooser dialog (update) Last patch updated to merge with current git master. Suggested filename format changed to "%s-baobab-snapshot" where %s is the chart's current root item's name. Anyone to review it? Any comments?
looks ok to me except that I would not put 'baobab' in the filename... let's use something more meaningful for the user, maybe "%s-disk-usage"
Created attachment 139282 [details] [review] Adds suggested filename to chart snapshot file-chooser dialog ("%s-disk-usage") Agreed, changed format to "%s-disk-usage".