[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-211-g7e6e166)



The branch, master has been updated
       via  7e6e166d3f594ee822ef615e8766a3f712b5f80c (commit)
      from  5e9e5758e70e1e822d1850b1d4661c0f8ce8ff1d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/src/x_fileselect.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


=================
 Commit Messages
=================

commit 7e6e166d3f594ee822ef615e8766a3f712b5f80c
Author: Werner Hoch <werner.ho@xxxxxx>
Date:   Sun Oct 5 15:54:18 2008 +0200

    gschem: suggest a filename in the saveas file dialog [#2001387]
    
    If a schematic is saved the first time, put a suggested name
    ("untitled.sch") into the file saveas dialog.

:100644 100644 c9da033... dc90e6c... M	gschem/src/x_fileselect.c

=========
 Changes
=========

commit 7e6e166d3f594ee822ef615e8766a3f712b5f80c
Author: Werner Hoch <werner.ho@xxxxxx>
Date:   Sun Oct 5 15:54:18 2008 +0200

    gschem: suggest a filename in the saveas file dialog [#2001387]
    
    If a schematic is saved the first time, put a suggested name
    ("untitled.sch") into the file saveas dialog.

diff --git a/gschem/src/x_fileselect.c b/gschem/src/x_fileselect.c
index c9da033..dc90e6c 100644
--- a/gschem/src/x_fileselect.c
+++ b/gschem/src/x_fileselect.c
@@ -254,8 +254,15 @@ x_fileselect_save (GSCHEM_TOPLEVEL *w_current)
   /* add file filters to dialog */
   x_fileselect_setup_filechooser_filters (GTK_FILE_CHOOSER (dialog));
   /* set the current filename or directory name if new document */
-  gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog),
-                                 w_current->toplevel->page_current->page_filename);
+  if ((w_current->toplevel->page_current->page_filename != NULL) 
+      && g_file_test (w_current->toplevel->page_current->page_filename, G_FILE_TEST_EXISTS)) {
+    gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog),
+				   w_current->toplevel->page_current->page_filename);
+  }
+  else {
+    gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER (dialog),
+				      "untitled.sch");
+  }
 
   gtk_dialog_set_default_response(GTK_DIALOG(dialog),
 				  GTK_RESPONSE_ACCEPT);




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs