From 0ecbf73a2b80cf5ed557e0a45a5ba50da71c1c6d Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Wed, 5 Dec 2012 21:57:38 +0100 Subject: [PATCH] Missing showing new id. --- src/authorization.c | 2 ++ src/resource.c | 2 ++ src/role.c | 2 ++ tests/db.db | Bin 7168 -> 7168 bytes 4 files changed, 6 insertions(+) diff --git a/src/authorization.c b/src/authorization.c index 6fec23b..44d4656 100644 --- a/src/authorization.c +++ b/src/authorization.c @@ -223,6 +223,8 @@ authorization_save (Authorization *authorization) new_id++; g_object_unref (dm); + gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->commons->gtkbuilder, "label12")), g_strdup_printf ("%d", new_id)); + sql = g_strdup_printf ("INSERT INTO %srules" " (id, id_roles, id_resources, type)" " VALUES (%d, %d, %d, %d)", diff --git a/src/resource.c b/src/resource.c index 01e5896..1b110fa 100644 --- a/src/resource.c +++ b/src/resource.c @@ -218,6 +218,8 @@ resource_save (Resource *resource) new_id++; g_object_unref (dm); + gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->commons->gtkbuilder, "label5")), g_strdup_printf ("%d", new_id)); + sql = g_strdup_printf ("INSERT INTO %sresources (id, resource_id)" " VALUES (%d, '%s')", priv->commons->prefix, diff --git a/src/role.c b/src/role.c index 0622996..1606850 100644 --- a/src/role.c +++ b/src/role.c @@ -219,6 +219,8 @@ role_save (Role *role) new_id++; g_object_unref (dm); + gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->commons->gtkbuilder, "label2")), g_strdup_printf ("%d", new_id)); + sql = g_strdup_printf ("INSERT INTO %sroles (id, role_id)" " VALUES (%d, '%s')", priv->commons->prefix, diff --git a/tests/db.db b/tests/db.db index 767bff35747ee5f9aefd8cd2100ffea8b194ee0d..86a73d21a27a2e51138c94941b5e58828c82b9a7 100644 GIT binary patch delta 128 zcmZp$Xt0^uNgTO&CD delta 94 zcmZp$Xt0e7 s{FV77^If2lbIh^=KoLes=A!(ZR0U%$CLo&$%r@d=Waixblb@Xj0DrI+xBvhE -- 2.49.0