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

gEDA-cvs: branch: master updated (1.1.2.20070818-165-gb10a0ed)



The branch, master has been updated
       via  b10a0ed7e99910a5d83565ede63a7ff9b11bc528 (commit)
       via  ceacc48fd83d27953a9510374962f267c42e22e9 (commit)
      from  f3de6fdfcd78b60d201e8786c78ea59bcc3f437e (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_dialog.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)


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

commit b10a0ed7e99910a5d83565ede63a7ff9b11bc528
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Dec 22 05:32:31 2007 +0000

    Switch back to the page we were on after a saving changed pages.
    
    The changed page saving code switches pages with s_page_goto(), but the
    page was not switched back. This lead to gschem being left editing a
    different page after a cancelled close operation. No redraw or GUI
    update was called, so the screen still showed the old page.

:100644 100644 5d57aff... f7e0496... M	gschem/src/x_dialog.c

commit ceacc48fd83d27953a9510374962f267c42e22e9
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Dec 22 05:32:28 2007 +0000

    Use Save, not Save As.. after prompt when closing modified schematics
    
    If the schematic is changed at exit time, a prompt is given. the
    "Save" option will save into the existing schematic file. If the
    page is untitled, a file-chooser will be presented.This is in
    keeping with other applications.

:100644 100644 6cc236b... 5d57aff... M	gschem/src/x_dialog.c

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

commit b10a0ed7e99910a5d83565ede63a7ff9b11bc528
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Dec 22 05:32:31 2007 +0000

    Switch back to the page we were on after a saving changed pages.
    
    The changed page saving code switches pages with s_page_goto(), but the
    page was not switched back. This lead to gschem being left editing a
    different page after a cancelled close operation. No redraw or GUI
    update was called, so the screen still showed the old page.

diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 5d57aff..f7e0496 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -3922,9 +3922,12 @@ void
 x_dialog_close_changed_page (GSCHEM_TOPLEVEL *w_current, PAGE *page)
 {
 	GtkWidget *dialog;
+  PAGE *keep_page;
 
   g_return_if_fail (page != NULL && page->CHANGED);
   
+  keep_page = w_current->toplevel->page_current;
+
   dialog = GTK_WIDGET (g_object_new (TYPE_CLOSE_CONFIRMATION_DIALOG,
                                      "unsaved-page", page,
                                      NULL));
@@ -3964,6 +3967,9 @@ x_dialog_close_changed_page (GSCHEM_TOPLEVEL *w_current, PAGE *page)
   }
   gtk_widget_destroy (dialog);
 
+  /* Switch back to the page we were on */
+  g_return_if_fail (keep_page != NULL);
+  s_page_goto (w_current->toplevel, keep_page);
 }
 
 /*! \brief Asks for confirmation before closing a window.
@@ -3988,9 +3994,12 @@ x_dialog_close_window (GSCHEM_TOPLEVEL *w_current)
   GList *iter;
   GtkWidget *dialog;
   PAGE *p_current;
+  PAGE *keep_page;
   GList *unsaved_pages, *p_unsaved;
   gboolean ret = FALSE;
 
+  keep_page = toplevel->page_current;
+
   for ( iter = geda_list_get_glist( toplevel->pages ), unsaved_pages = NULL;
         iter != NULL;
         iter = g_list_next( iter ) ) {
@@ -4048,6 +4057,10 @@ x_dialog_close_window (GSCHEM_TOPLEVEL *w_current)
   }
   gtk_widget_destroy (dialog);
 
+  /* Switch back to the page we were on */
+  g_return_val_if_fail (keep_page != NULL, ret);
+  s_page_goto (toplevel, keep_page);
+
   return ret;
 }
 

commit ceacc48fd83d27953a9510374962f267c42e22e9
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Dec 22 05:32:28 2007 +0000

    Use Save, not Save As.. after prompt when closing modified schematics
    
    If the schematic is changed at exit time, a prompt is given. the
    "Save" option will save into the existing schematic file. If the
    page is untitled, a file-chooser will be presented.This is in
    keeping with other applications.

diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 6cc236b..5d57aff 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -3943,9 +3943,8 @@ x_dialog_close_changed_page (GSCHEM_TOPLEVEL *w_current, PAGE *page)
 
       case GTK_RESPONSE_YES:
         /* action selected: save */
-        /* prompts user for the filename and ultimate confirmation */
         s_page_goto (w_current->toplevel, page);
-        x_fileselect_save (w_current);
+        i_callback_file_save (w_current, 0, NULL);
         /* has the page been really saved? */
         if (!page->CHANGED) {
           x_window_close_page (w_current, page);
@@ -4022,8 +4021,6 @@ x_dialog_close_window (GSCHEM_TOPLEVEL *w_current)
 
       case GTK_RESPONSE_YES:
         /* action selected: save */
-        /* prompts user for the filename and ultimate confirmation for */
-        /* each selected page */
         g_object_get (dialog,
                       "selected-pages", &unsaved_pages,
                       NULL);
@@ -4033,7 +4030,7 @@ x_dialog_close_window (GSCHEM_TOPLEVEL *w_current)
           p_current = (PAGE*)p_unsaved->data;
 
           s_page_goto (toplevel, p_current);
-          x_fileselect_save (w_current);
+          i_callback_file_save (w_current, 0, NULL);
           /* if user cancelled previous, do not close window */
           ret &= !p_current->CHANGED;
         }




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