]> saetta.ns0.it Git - zakautho/gui/commitdiff
Missing showing new id.
authorAndrea Zagli <azagli@libero.it>
Wed, 5 Dec 2012 20:57:38 +0000 (21:57 +0100)
committerAndrea Zagli <azagli@libero.it>
Wed, 5 Dec 2012 20:57:38 +0000 (21:57 +0100)
src/authorization.c
src/resource.c
src/role.c
tests/db.db

index 6fec23b6a0c8f6a2042295263cb4062dd8f04b37..44d4656ade728ad2b26ab0c356335640b7f88ae8 100644 (file)
@@ -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)",
index 01e58963a18a47348c3c4085ed431c569285c5dc..1b110fa6385f331b65a6dc323065f9811b193ed6 100644 (file)
@@ -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,
index 0622996dce18b023beb3a7b85ba7af8743c8d66e..1606850934837e95a3b98fc37e694dae3f367998 100644 (file)
@@ -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,
index 767bff35747ee5f9aefd8cd2100ffea8b194ee0d..86a73d21a27a2e51138c94941b5e58828c82b9a7 100644 (file)
Binary files a/tests/db.db and b/tests/db.db differ