From: Ben Pfaff Date: Sat, 4 Oct 2008 04:11:20 +0000 (-0700) Subject: Add ".sav" or ".por" suffix to filename when saving with Save_As X-Git-Tag: v0.6.1~4 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c62c692134dc5107354ffccb7a9ad2039b2b5f11;p=pspp-builds.git Add ".sav" or ".por" suffix to filename when saving with Save_As Closes bug #23137 (This is a cross-port of commit 169887f6d6d7bf5c10d5b05786aa3fd252040c93 from the master branch, originally authored and committed by John Darrington.) --- diff --git a/src/ui/gui/data-editor.c b/src/ui/gui/data-editor.c index 9ca7511e..f7df21c7 100644 --- a/src/ui/gui/data-editor.c +++ b/src/ui/gui/data-editor.c @@ -1375,6 +1375,11 @@ data_save_as_dialog (GtkAction *action, struct data_editor *de) de->save_as_portable = ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_sys)); + if ( de->save_as_portable) + append_filename_suffix (de, ".por"); + else + append_filename_suffix (de, ".sav"); + save_file (de); window_set_name_from_filename (e, de->file_name);