From: Andrea Zagli Date: Wed, 5 Dec 2012 20:57:38 +0000 (+0100) Subject: Missing showing new id. X-Git-Tag: v0.0.1~9 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=0ecbf73a2b80cf5ed557e0a45a5ba50da71c1c6d;p=zakautho%2Fgui Missing showing new id. --- 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 767bff3..86a73d2 100644 Binary files a/tests/db.db and b/tests/db.db differ