<property name="top_attach">2</property>
</packing>
</child>
- <child>
- <object class="GtkComboBox" id="combobox4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext38"/>
- <attributes>
- <attribute name="text">1</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
<child>
<object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
<property name="top_attach">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkFormDecoder" id="gtkformdecoder24">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">True</property>
#include <libzakautho/autoz.h>
#include <libgtkform/form.h>
#include <libgtkform/fielddatetime.h>
+#include <libgtkformui/gtkformdecoder.h>
#include <libsolipa/utils.h>
#include <libterritorio/comuni.h>
#include "personaufficio.h"
#include "personaufficiorecapito.h"
#include "personarecapito.h"
+#include "titoli.h"
static void organigramma_persona_class_init (OrganigrammaPersonaClass *klass);
static void organigramma_persona_init (OrganigrammaPersona *persona);
static void organigramma_persona_on_ufficio_recapito_aggiornato (gpointer instance, gpointer user_data);
static void organigramma_persona_on_recapito_aggiornato (gpointer instance, gpointer user_data);
+static void organigramma_persona_on_titolo_selezionato (gpointer instance, guint id, gpointer user_data);
static void organigramma_persona_on_comune_selezionato (gpointer instance, guint id, gpointer user_data);
static gboolean organigramma_persona_on_w_organigramma_persona_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
+static void organigramma_persona_on_btn_ricerca_titolo_clicked (GtkButton *button,
+ gpointer user_data);
static void organigramma_persona_on_btn_ricerca_comune_clicked (GtkButton *button,
gpointer user_data);
error = NULL;
gtk_builder_add_objects_from_file (priv->commons->gtkbuilder, priv->commons->guifile,
g_strsplit (g_strconcat (
- "lstore_titoli"
- "|lstore_persona_incarichi"
+ "lstore_persona_incarichi"
"|lstore_persona_nodi"
"|lstore_persona_nodo_recapiti"
"|lstore_persona_uffici"
g_signal_connect (priv->sel_uffici,
"changed", G_CALLBACK (organigramma_persona_on_uffici_sel_changed), (gpointer)a);
+ g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "gtkformdecoder24"),
+ "btn-browse-clicked", G_CALLBACK (organigramma_persona_on_btn_ricerca_titolo_clicked), (gpointer)a);
g_signal_connect (G_OBJECT (gtk_builder_get_object (priv->commons->gtkbuilder, "button89")),
"clicked", G_CALLBACK (organigramma_persona_on_btn_ricerca_comune_clicked), (gpointer)a);
organigramma_persona_carica_recapiti (persona);
}
+static void
+organigramma_persona_on_titolo_selezionato (gpointer instance, guint id, gpointer user_data)
+{
+ OrganigrammaPersona *ia = (OrganigrammaPersona *)user_data;
+
+ OrganigrammaPersonaPrivate *priv = ORGANIGRAMMA_PERSONA_GET_PRIVATE (ia);
+
+ gtk_form_widget_set_value_stringify (gtk_form_get_form_widget_from_name (priv->form, "gtkformdecoder24"),
+ g_strdup_printf ("%d", id));
+}
+
static void
organigramma_persona_on_comune_selezionato (gpointer instance, guint id, gpointer user_data)
{
return !organigramma_persona_conferma_chiusura ((OrganigrammaPersona *)user_data);
}
+static void
+organigramma_persona_on_btn_ricerca_titolo_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkWidget *w;
+
+ OrganigrammaPersona *ia = (OrganigrammaPersona *)user_data;
+ OrganigrammaPersonaPrivate *priv = ORGANIGRAMMA_PERSONA_GET_PRIVATE (ia);
+
+ OrganigrammaTitoli *c = organigramma_titoli_new (priv->commons, TRUE);
+
+ g_signal_connect (G_OBJECT (c), "selezionato",
+ G_CALLBACK (organigramma_persona_on_titolo_selezionato), user_data);
+
+ w = organigramma_titoli_get_widget (c);
+ gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (priv->w));
+ gtk_widget_show (w);
+}
+
static void
organigramma_persona_on_btn_ricerca_comune_clicked (GtkButton *button,
gpointer user_data)