<property name="top_attach">1</property>
</packing>
</child>
- <child>
- <object class="GtkComboBox" id="combobox5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext22"/>
- <attributes>
- <attribute name="text">1</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
<child>
<object class="GtkCheckButton" id="checkbutton9">
<property name="visible">True</property>
<property name="top_attach">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkFormDecoder" id="gtkformdecoder8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
<child>
<placeholder/>
</child>
#include <libzakautho/autoz.h>
#include <libgtkform/form.h>
+#include <libgtkformui/gtkformdecoder.h>
#include <libsolipa/utils.h>
#include "personaufficiorecapito.h"
+#include "tipirecapito.h"
static void organigramma_persona_ufficio_recapito_class_init (OrganigrammaPersonaUfficioRecapitoClass *klass);
static void organigramma_persona_ufficio_recapito_init (OrganigrammaPersonaUfficioRecapito *organigramma_persona_ufficio_recapito);
static gboolean organigramma_persona_ufficio_recapito_conferma_chiusura (OrganigrammaPersonaUfficioRecapito *organigramma_persona_ufficio_recapito);
+static void organigramma_persona_ufficio_recapito_on_tipo_recapito_selezionato (gpointer instance, guint id, gpointer user_data);
+
static void organigramma_persona_ufficio_recapito_set_property (GObject *object,
guint property_id,
const GValue *value,
GdkEvent *event,
gpointer user_data);
+static void organigramma_persona_ufficio_recapito_on_btn_tipo_recapito_clicked (GtkButton *button,
+ gpointer user_data);
+
static void organigramma_persona_ufficio_recapito_on_btn_annulla_clicked (GtkButton *button,
gpointer user_data);
static void organigramma_persona_ufficio_recapito_on_btn_salva_clicked (GtkButton *button,
g_signal_connect (priv->w,
"delete-event", G_CALLBACK (organigramma_persona_ufficio_recapito_on_w_organigramma_persona_ufficio_recapito_delete_event), (gpointer)a);
+ g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "gtkformdecoder8"),
+ "btn-browse-clicked", G_CALLBACK (organigramma_persona_ufficio_recapito_on_btn_tipo_recapito_clicked), (gpointer)a);
+
g_signal_connect (G_OBJECT (gtk_builder_get_object (priv->commons->gtkbuilder, "button85")),
"clicked", G_CALLBACK (organigramma_persona_ufficio_recapito_on_btn_annulla_clicked), (gpointer)a);
g_signal_connect (G_OBJECT (gtk_builder_get_object (priv->commons->gtkbuilder, "button86")),
}
/* CALLBACK */
+static void
+organigramma_persona_ufficio_recapito_on_tipo_recapito_selezionato (gpointer instance, guint id, gpointer user_data)
+{
+ OrganigrammaPersonaUfficioRecapito *f = (OrganigrammaPersonaUfficioRecapito *)user_data;
+ OrganigrammaPersonaUfficioRecapitoPrivate *priv = ORGANIGRAMMA_PERSONA_UFFICIO_RECAPITO_GET_PRIVATE (f);
+
+ gtk_form_widget_set_value_stringify (gtk_form_get_form_widget_from_name (priv->form, "gtkformdecoder8"),
+ g_strdup_printf ("%d", id));
+}
+
static gboolean
organigramma_persona_ufficio_recapito_on_w_organigramma_persona_ufficio_recapito_delete_event (GtkWidget *widget,
GdkEvent *event,
return !organigramma_persona_ufficio_recapito_conferma_chiusura ((OrganigrammaPersonaUfficioRecapito *)user_data);
}
+static void
+organigramma_persona_ufficio_recapito_on_btn_tipo_recapito_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkWidget *w;
+
+ OrganigrammaPersonaUfficioRecapito *rf = (OrganigrammaPersonaUfficioRecapito *)user_data;
+ OrganigrammaPersonaUfficioRecapitoPrivate *priv = ORGANIGRAMMA_PERSONA_UFFICIO_RECAPITO_GET_PRIVATE (rf);
+
+ OrganigrammaTipiRecapito *c = organigramma_tipi_recapito_new (priv->commons, TRUE);
+
+ g_signal_connect (G_OBJECT (c), "selezionato",
+ G_CALLBACK (organigramma_persona_ufficio_recapito_on_tipo_recapito_selezionato), user_data);
+
+ w = organigramma_tipi_recapito_get_widget (c);
+ gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (priv->w));
+ gtk_widget_show (w);
+}
+
static void
organigramma_persona_ufficio_recapito_on_btn_annulla_clicked (GtkButton *button,
gpointer user_data)