[gom] resource: Fix saving a modified object again



commit d62e3743d82b044669d27832c83ff6a40c07f511
Author: Álvaro Peña <alvaropg visual-tools com>
Date:   Tue Mar 31 09:31:20 2015 +0200

    resource: Fix saving a modified object again
    
    If the resource has been saved correctly in the database, we need to set
    to TRUE the "is-from-table" data related to the GomResource object. This
    data is used to set the "is_from_table" internal variable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742925

 gom/gom-resource.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gom/gom-resource.c b/gom/gom-resource.c
index ede7c46..59e7adf 100644
--- a/gom/gom-resource.c
+++ b/gom/gom-resource.c
@@ -708,6 +708,8 @@ gom_resource_save_cb (GomAdapter *adapter,
 
    if (!(ret = gom_resource_do_save(resource, adapter, &error))) {
       g_simple_async_result_take_error(simple, error);
+   } else {
+     g_object_set_data(G_OBJECT(resource), "is-from-table", GINT_TO_POINTER(TRUE));
    }
 
    g_simple_async_result_set_op_res_gboolean(simple, ret);


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