]> saetta.ns0.it Git - solipa/organigramma/commitdiff
Cambiata relazione tra uffici e nodi.
authorAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Mon, 16 Aug 2010 08:02:18 +0000 (10:02 +0200)
committerAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Mon, 16 Aug 2010 08:02:18 +0000 (10:02 +0200)
data/organigramma/form/ufficio.form
data/organigramma/gui/organigramma.gui
src/ufficio.c

index 9ad8be1f2705571626a14cee995d0d61ec95c6e1..ae4d76bde274d437804fbf44a1bce62c0eadb272 100644 (file)
                </field>
        </widget>
 
-       <widget type="entry" name="entry6">
-               <field type="text" name="nodo_superiore">
+       <widget type="entry" name="entry7">
+               <field type="text" name="struttura">
                        <to-load>f</to-load>
                        <to-save>f</to-save>
                </field>
        </widget>
 
-       <widget type="label" name="label22" label="label21">
+       <widget type="label" name="label25" label="label18">
                <on-change what="update" when="after">
-                       <widget-name>entry6</widget-name>
+                       <widget-name>entry7</widget-name>
                        <sql>
-                               SELECT nome FROM nodi WHERE id = ##label22::gint
+                               SELECT nome FROM strutture WHERE id = ##label25::gint
                        </sql>
                </on-change>
-               <field type="integer" name="id_nodi">
+               <field type="integer" name="id_strutture">
                </field>
        </widget>
 
-       <!-- strutture -->
-
        <widget type="entry" name="entry5" label="label19">
                <field type="text" name="nome" />
        </widget>
index 2726febbc74e3847cf33c71b0ecefd84b4862c6b..c83ae2e2fe5ee3e157dc6b3ed67e36808663aa11 100644 (file)
     <property name="title" translatable="yes">Ufficio - Gestione organigramma</property>
     <property name="modal">True</property>
     <property name="window_position">center-on-parent</property>
+    <property name="default_width">500</property>
     <property name="destroy_with_parent">True</property>
     <child>
       <object class="GtkVBox" id="vbox5">
               <packing>
                 <property name="top_attach">2</property>
                 <property name="bottom_attach">3</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
               </packing>
             </child>
             <child>
   </object>
   <object class="GtkWindow" id="w_strutture">
     <property name="title" translatable="yes">Strutture - Gestione organigramma</property>
+    <property name="modal">True</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="default_width">500</property>
+    <property name="default_height">400</property>
+    <property name="destroy_with_parent">True</property>
     <child>
       <object class="GtkVBox" id="vbx_strutture">
         <property name="visible">True</property>
index 2472b39c6537ce7634cdbc6aa3f171fba5351ec6..551ebebd0267b0d7b44a464454e8f3d84f5d669a 100644 (file)
@@ -20,7 +20,7 @@
 #include <libgtkform/form.h>
 
 #include "ufficio.h"
-#include "nodi.h"
+#include "strutture.h"
 
 static void ufficio_class_init (UfficioClass *klass);
 static void ufficio_init (Ufficio *ufficio);
@@ -39,9 +39,9 @@ static void ufficio_get_property (GObject *object,
                                      GValue *value,
                                      GParamSpec *pspec);
 
-static void ufficio_on_nodo_selezionato (gpointer instance, guint id, gpointer user_data);
+static void ufficio_on_struttura_selezionato (gpointer instance, guint id, gpointer user_data);
 
-static void ufficio_on_btn_nodo_clicked (GtkButton *button,
+static void ufficio_on_btn_struttura_clicked (GtkButton *button,
                       gpointer user_data);
 
 static gboolean ufficio_on_w_ufficio_delete_event (GtkWidget *widget,
@@ -140,8 +140,6 @@ Ufficio
        g_object_set (G_OBJECT (priv->form), "gdaex", priv->commons->gdaex, NULL);
        gtk_form_load_from_file (priv->form, g_build_filename (priv->commons->formdir, "ufficio.form", NULL), priv->commons->gtkbuilder);
 
-       g_object_set (priv->form, "gdaex", priv->commons->gdaex, NULL);
-
        priv->w = GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "w_ufficio"));
 
        priv->objects = gtk_form_get_objects_by_name (priv->form,
@@ -151,8 +149,8 @@ Ufficio
        g_signal_connect (priv->w,
                          "delete-event", G_CALLBACK (ufficio_on_w_ufficio_delete_event), (gpointer *)a);
 
-       g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button28"),
-                         "clicked", G_CALLBACK (ufficio_on_btn_nodo_clicked), (gpointer *)a);
+       g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button31"),
+                         "clicked", G_CALLBACK (ufficio_on_btn_struttura_clicked), (gpointer *)a);
 
        g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button29"),
                          "clicked", G_CALLBACK (ufficio_on_btn_annulla_clicked), (gpointer *)a);
@@ -321,16 +319,16 @@ ufficio_conferma_chiusura (Ufficio *ufficio)
 
 /* CALLBACK */
 static void
-ufficio_on_nodo_selezionato (gpointer instance, guint id, gpointer user_data)
+ufficio_on_struttura_selezionato (gpointer instance, guint id, gpointer user_data)
 {
        Ufficio *f = (Ufficio *)user_data;
        UfficioPrivate *priv = UFFICIO_GET_PRIVATE (f);
 
-       gtk_form_widget_set_value_stringify (gtk_form_get_form_widget_from_name (priv->form, "label22"), g_strdup_printf ("%d", id));
+       gtk_form_widget_set_value_stringify (gtk_form_get_form_widget_from_name (priv->form, "label25"), g_strdup_printf ("%d", id));
 }
 
 static void
-ufficio_on_btn_nodo_clicked (GtkButton *button,
+ufficio_on_btn_struttura_clicked (GtkButton *button,
                       gpointer user_data)
 {
        GtkWidget *w;
@@ -339,12 +337,12 @@ ufficio_on_btn_nodo_clicked (GtkButton *button,
 
        UfficioPrivate *priv = UFFICIO_GET_PRIVATE (rf);
 
-       Nodi *c = nodi_new (priv->commons, TRUE);
+       Strutture *c = strutture_new (priv->commons, TRUE);
 
        g_signal_connect (G_OBJECT (c), "selezionato",
-                         G_CALLBACK (ufficio_on_nodo_selezionato), user_data);
+                         G_CALLBACK (ufficio_on_struttura_selezionato), user_data);
 
-       w = nodi_get_widget (c);
+       w = strutture_get_widget (c);
        gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (priv->w));
        gtk_widget_show (w);
 }