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

gEDA-cvs: branch: master updated (1.1.1.20070708-23-g42034b5)



The branch, master has been updated
       via  42034b5e81a0a4d40254aa2ef557083531d38291 (commit)
       via  3345932d7fcaad0570ebd793f88253696a014895 (commit)
      from  867525cce75bcf9996992db1681f506f4fcdc84f (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 |   17 ++++++++++-------
 gschem/src/x_preview.c    |    5 ++++-
 2 files changed, 14 insertions(+), 8 deletions(-)


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

commit 42034b5e81a0a4d40254aa2ef557083531d38291
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Jul 22 14:32:05 2007 +0100

    Stop scroll events wraping the pointer when the preview widget is inavtive
    
    Also corrects the prototype of the scroll event handler to return gboolean

:100644 100644 692703e... 844bdd0... M	gschem/src/x_preview.c

commit 3345932d7fcaad0570ebd793f88253696a014895
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Jul 22 14:15:35 2007 +0100

    Clear the preview  when no valid file is selected in the file chooser
    
    Previously the preview widget would continue to display the last
    schematic or symbol which had been selected.

:100644 100644 90c511a... adc491f... M	gschem/src/x_fileselect.c

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

commit 42034b5e81a0a4d40254aa2ef557083531d38291
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Jul 22 14:32:05 2007 +0100

    Stop scroll events wraping the pointer when the preview widget is inavtive
    
    Also corrects the prototype of the scroll event handler to return gboolean

diff --git a/gschem/src/x_preview.c b/gschem/src/x_preview.c
index 692703e..844bdd0 100644
--- a/gschem/src/x_preview.c
+++ b/gschem/src/x_preview.c
@@ -367,11 +367,14 @@ preview_event_configure (GtkWidget         *widget,
 }
 
 
-static gint
+static gboolean
 preview_event_scroll (GtkWidget *widget,
                       GdkEventScroll *event,
                       TOPLEVEL *w_current)
 {
+  if (!PREVIEW (widget)->active) {
+    return TRUE;
+  }
   return x_event_scroll (widget, event, PREVIEW (widget)->preview_toplevel);
 }
 

commit 3345932d7fcaad0570ebd793f88253696a014895
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Jul 22 14:15:35 2007 +0100

    Clear the preview  when no valid file is selected in the file chooser
    
    Previously the preview widget would continue to display the last
    schematic or symbol which had been selected.

diff --git a/gschem/src/x_fileselect.c b/gschem/src/x_fileselect.c
index 90c511a..adc491f 100644
--- a/gschem/src/x_fileselect.c
+++ b/gschem/src/x_fileselect.c
@@ -82,18 +82,21 @@ x_fileselect_callback_update_preview (GtkFileChooser *chooser,
                                       gpointer user_data)
 {
   Preview *preview = PREVIEW (user_data);
-  gchar *filename;
-    
+  gchar *filename, *preview_filename = NULL;
+
   filename = gtk_file_chooser_get_preview_filename (chooser);
   if (filename != NULL &&
       !g_file_test (filename, G_FILE_TEST_IS_DIR)) {
-    /* update preview if it is not a directory */
-    g_object_set (preview,
-                  "filename", filename,
-                  NULL);
+    preview_filename = filename;
   }
+
+  /* update preview */
+  g_object_set (preview,
+                "filename", preview_filename,
+                "active", (preview_filename != NULL),
+                NULL);
+
   g_free (filename);
-  
 }
 
 /*! \brief Adds a preview to a file chooser.




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