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

gEDA-cvs: gaf.git: branch: master updated (1.5.1-20081221-91-gb6377b2)



The branch, master has been updated
       via  b6377b27c45305b641eac03e697353e9ecfdcd23 (commit)
       via  de01318825c08f8d62c2266b16f7e826c7d3a196 (commit)
      from  9e3e45193643d5bca628df5074fd1aedd7ff619c (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_preview.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)


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

commit b6377b27c45305b641eac03e697353e9ecfdcd23
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Dec 31 17:16:29 2008 +0000

    gschem: Emit notify signal when adjusting a property in the preview widget.
    
    For correctness, kill the latent bug where we fail to emit a "notify"
    signal on the other preview widget properties modified whilst setting
    the source to preview from.

:100644 100644 3898be7... adec416... M	gschem/src/x_preview.c

commit de01318825c08f8d62c2266b16f7e826c7d3a196
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Dec 31 17:16:25 2008 +0000

    gschem: Ensure we don't allow the preview to load from file _and_ a buffer
    
    When setting either the "filename", or "buffer" property on the preview
    window, we g_free() the old values for filename and buffer. We missed the
    required assignment of the old value back to NULL.
    
    The code isn't strictly correct though, as when changing a property
    internally like this, we should really emit a "notify" signal on the
    property we've changed using g_object_notify().

:100644 100644 9047abe... 3898be7... M	gschem/src/x_preview.c

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

commit b6377b27c45305b641eac03e697353e9ecfdcd23
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Dec 31 17:16:29 2008 +0000

    gschem: Emit notify signal when adjusting a property in the preview widget.
    
    For correctness, kill the latent bug where we fail to emit a "notify"
    signal on the other preview widget properties modified whilst setting
    the source to preview from.

diff --git a/gschem/src/x_preview.c b/gschem/src/x_preview.c
index 3898be7..adec416 100644
--- a/gschem/src/x_preview.c
+++ b/gschem/src/x_preview.c
@@ -417,17 +417,23 @@ preview_set_property (GObject *object,
   
   switch(property_id) {
       case PROP_FILENAME:
+        if (preview->buffer != NULL) {
+          g_free (preview->buffer);
+          preview->buffer = NULL;
+          g_object_notify (object, "buffer");
+        }
         g_free (preview->filename);
-        g_free (preview->buffer);
         preview->filename = g_strdup (g_value_get_string (value));
-        preview->buffer = NULL;
         preview_update (preview);
         break;
 
       case PROP_BUFFER:
-        g_free (preview->filename);
+        if (preview->filename != NULL) {
+          g_free (preview->filename);
+          preview->filename = NULL;
+          g_object_notify (object, "filename");
+        }
         g_free (preview->buffer);
-        preview->filename = NULL;
         preview->buffer = g_strdup (g_value_get_string (value));
         preview_update (preview);
         break;

commit de01318825c08f8d62c2266b16f7e826c7d3a196
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Dec 31 17:16:25 2008 +0000

    gschem: Ensure we don't allow the preview to load from file _and_ a buffer
    
    When setting either the "filename", or "buffer" property on the preview
    window, we g_free() the old values for filename and buffer. We missed the
    required assignment of the old value back to NULL.
    
    The code isn't strictly correct though, as when changing a property
    internally like this, we should really emit a "notify" signal on the
    property we've changed using g_object_notify().

diff --git a/gschem/src/x_preview.c b/gschem/src/x_preview.c
index 9047abe..3898be7 100644
--- a/gschem/src/x_preview.c
+++ b/gschem/src/x_preview.c
@@ -420,12 +420,14 @@ preview_set_property (GObject *object,
         g_free (preview->filename);
         g_free (preview->buffer);
         preview->filename = g_strdup (g_value_get_string (value));
+        preview->buffer = NULL;
         preview_update (preview);
         break;
 
       case PROP_BUFFER:
         g_free (preview->filename);
         g_free (preview->buffer);
+        preview->filename = NULL;
         preview->buffer = g_strdup (g_value_get_string (value));
         preview_update (preview);
         break;




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