libgnomedb r1714 - in branches/release-3-0-branch: . libgnomedb



Author: vivien
Date: Wed Feb 27 21:04:50 2008
New Revision: 1714
URL: http://svn.gnome.org/viewvc/libgnomedb?rev=1714&view=rev

Log:
2008-02-27  Vivien Malerba <malerba gnome-db org>

        * libgnomedb/gnome-db-basic-form.c: applied a patch by Carlos
        Savoretti to correct the layout if a glade file is used


Modified:
   branches/release-3-0-branch/ChangeLog
   branches/release-3-0-branch/libgnomedb/gnome-db-basic-form.c

Modified: branches/release-3-0-branch/libgnomedb/gnome-db-basic-form.c
==============================================================================
--- branches/release-3-0-branch/libgnomedb/gnome-db-basic-form.c	(original)
+++ branches/release-3-0-branch/libgnomedb/gnome-db-basic-form.c	Wed Feb 27 21:04:50 2008
@@ -441,6 +441,25 @@
 
 			form->priv->paramlist = g_value_get_pointer (value);
 			if (form->priv->paramlist) {
+#ifdef HAVE_LIBGLADE
+			new_spec = NULL;
+			if (form->priv->layout_spec) {
+				/* old spec */
+				lspec = form->priv->layout_spec;
+				/* spec copy */
+				new_spec = g_new0 (GnomeDbFormLayoutSpec, 1);
+				if (lspec->xml_file)
+					new_spec->xml_file = g_strdup (lspec->xml_file);
+				if (lspec->xml_object) {
+					new_spec->xml_object = lspec->xml_object;
+					g_object_ref (new_spec->xml_object);
+				}
+				if (lspec->root_element)
+					new_spec->root_element = g_strdup (lspec->root_element);
+				if (lspec->form_prefix)
+					new_spec->form_prefix = g_strdup (lspec->form_prefix);
+			}
+#endif
 				GError *error = NULL;
 				g_return_if_fail (GDA_IS_PARAMETER_LIST (form->priv->paramlist));
 				
@@ -461,7 +480,12 @@
 						  G_CALLBACK (paramlist_param_plugin_changed_cb), form);
 				g_signal_connect (form->priv->paramlist, "param_attr_changed",
 						  G_CALLBACK (paramlist_param_attr_changed_cb), form);
-				
+
+#ifdef HAVE_LIBGLADE
+				if (new_spec)
+					form->priv->layout_spec = new_spec;
+				new_spec = NULL;
+#endif
 				gnome_db_basic_form_fill (form);
 			}
 			break;
@@ -960,7 +984,7 @@
 	if (param) { /* single parameter */
 		GValue *value;
 		
-		form->priv->forward_param_updates = FALSE;
+		form->priv->forward_param_updates = TRUE;
 
 		/* parameter's value */
 		value = gnome_db_data_entry_get_value (entry);
@@ -977,7 +1001,6 @@
 #ifdef debug_signal
 		g_print ("<< 'PARAM_CHANGED' from %s\n", __FUNCTION__);
 #endif
-		form->priv->forward_param_updates = TRUE;
 		gda_value_free (value);
 	}
 	else { /* multiple parameters */



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