<property name="top_attach">2</property>
</packing>
</child>
- <child>
- <object class="GtkComboBox" id="combobox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext3"/>
- <attributes>
- <attribute name="text">1</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="top_attach">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkFormDecoder" id="gtkformdecoder6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">True</property>
#include <libzakautho/autoz.h>
#include <libgtkform/form.h>
+#include <libgtkformui/gtkformdecoder.h>
#include <libsolipa/utils.h>
#include "nodo.h"
#include "nodi.h"
+#include "tipinodo.h"
static void organigramma_nodo_class_init (OrganigrammaNodoClass *klass);
static void organigramma_nodo_init (OrganigrammaNodo *nodo);
GParamSpec *pspec);
static void organigramma_nodo_on_organigramma_nodo_selezionato (gpointer instance, guint id, gpointer user_data);
+static void organigramma_nodo_on_tipo_nodo_selezionato (gpointer instance, guint id, gpointer user_data);
static void organigramma_nodo_on_organigramma_nodo_pulisci (GtkEntry *entry,
GtkEntryIconPosition icon_pos,
gpointer user_data);
static void organigramma_nodo_on_btn_organigramma_nodo_clicked (GtkButton *button,
gpointer user_data);
+static void organigramma_nodo_on_btn_tipo_nodo_clicked (GtkButton *button,
+ gpointer user_data);
static gboolean organigramma_nodo_on_w_organigramma_nodo_delete_event (GtkWidget *widget,
GdkEvent *event,
error = NULL;
gtk_builder_add_objects_from_file (priv->commons->gtkbuilder, priv->commons->guifile,
- g_strsplit ("lstore_tipi_nodo|w_nodo", "|", -1),
+ g_strsplit ("w_nodo", "|", -1),
&error);
if (error != NULL)
{
"icon-press", G_CALLBACK (organigramma_nodo_on_organigramma_nodo_pulisci), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button6"),
"clicked", G_CALLBACK (organigramma_nodo_on_btn_organigramma_nodo_clicked), (gpointer)a);
+ g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "gtkformdecoder6"),
+ "btn-browse-clicked", G_CALLBACK (organigramma_nodo_on_btn_tipo_nodo_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button4"),
"clicked", G_CALLBACK (organigramma_nodo_on_btn_annulla_clicked), (gpointer)a);
gtk_form_widget_set_value_stringify (gtk_form_get_form_widget_from_name (priv->form, "label5"), g_strdup_printf ("%d", id));
}
+static void
+organigramma_nodo_on_tipo_nodo_selezionato (gpointer instance, guint id, gpointer user_data)
+{
+ OrganigrammaNodo *f = (OrganigrammaNodo *)user_data;
+ OrganigrammaNodoPrivate *priv = ORGANIGRAMMA_NODO_GET_PRIVATE (f);
+
+ gtk_form_widget_set_value_stringify (gtk_form_get_form_widget_from_name (priv->form, "gtkformdecoder6"),
+ g_strdup_printf ("%d", id));
+}
+
static void
organigramma_nodo_on_organigramma_nodo_pulisci (GtkEntry *entry,
GtkEntryIconPosition icon_pos,
gtk_widget_show (w);
}
+static void
+organigramma_nodo_on_btn_tipo_nodo_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkWidget *w;
+
+ OrganigrammaNodo *rf = (OrganigrammaNodo *)user_data;
+
+ OrganigrammaNodoPrivate *priv = ORGANIGRAMMA_NODO_GET_PRIVATE (rf);
+
+ OrganigrammaTipiNodo *c = organigramma_tipi_nodo_new (priv->commons, TRUE);
+
+ g_signal_connect (G_OBJECT (c), "selezionato",
+ G_CALLBACK (organigramma_nodo_on_tipo_nodo_selezionato), user_data);
+
+ w = organigramma_tipi_nodo_get_widget (c);
+ gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (priv->w));
+ gtk_widget_show (w);
+}
+
static gboolean
organigramma_nodo_on_w_organigramma_nodo_delete_event (GtkWidget *widget,
GdkEvent *event,