</columns>
</object>
<object class="GtkWindow" id="w_nodi">
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="default_width">600</property>
+ <property name="default_height">400</property>
+ <property name="destroy_with_parent">True</property>
<child>
<object class="GtkVBox" id="vbx_nodi">
<property name="visible">True</property>
if (priv->selezione)
{
- gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "label1")));
+ gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->commons->gtkbuilder, "label11")));
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button14"),
"clicked", G_CALLBACK (nodi_on_btn_annulla_clicked), (gpointer)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button15"),
#include <libgtkform/form.h>
#include "nodo.h"
+#include "nodi.h"
static void nodo_class_init (NodoClass *klass);
static void nodo_init (Nodo *nodo);
GValue *value,
GParamSpec *pspec);
+static void nodo_on_nodo_selezionato (gpointer instance, guint id, gpointer user_data);
+
+static void nodo_on_btn_nodo_clicked (GtkButton *button,
+ gpointer user_data);
+
static gboolean nodo_on_w_nodo_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
g_signal_connect (priv->w,
"delete-event", G_CALLBACK (nodo_on_w_nodo_delete_event), (gpointer *)a);
+ g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button6"),
+ "clicked", G_CALLBACK (nodo_on_btn_nodo_clicked), (gpointer *)a);
+
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button4"),
"clicked", G_CALLBACK (nodo_on_btn_annulla_clicked), (gpointer *)a);
g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button5"),
}
/* CALLBACK */
+static void
+nodo_on_nodo_selezionato (gpointer instance, guint id, gpointer user_data)
+{
+ Nodo *f = (Nodo *)user_data;
+ NodoPrivate *priv = NODO_GET_PRIVATE (f);
+
+ gtk_form_widget_set_value_stringify (gtk_form_get_form_widget_from_name (priv->form, "label5"), g_strdup_printf ("%d", id));
+}
+
+static void
+nodo_on_btn_nodo_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkWidget *w;
+
+ Nodo *rf = (Nodo *)user_data;
+
+ NodoPrivate *priv = NODO_GET_PRIVATE (rf);
+
+ Nodi *c = nodi_new (priv->commons, TRUE);
+
+ g_signal_connect (G_OBJECT (c), "selezionato",
+ G_CALLBACK (nodo_on_nodo_selezionato), user_data);
+
+ w = nodi_get_widget (c);
+ gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (priv->w));
+ gtk_widget_show (w);
+}
+
static gboolean
nodo_on_w_nodo_delete_event (GtkWidget *widget,
GdkEvent *event,