</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>
<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>
#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);
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,
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,
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);
/* 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;
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);
}