]> saetta.ns0.it Git - solipa/organigramma/commitdiff
Messo il GtkFormDecoder in persona nodo (refs #646).
authorAndrea Zagli <azagli@libero.it>
Thu, 8 Dec 2016 09:49:24 +0000 (10:49 +0100)
committerAndrea Zagli <azagli@libero.it>
Thu, 8 Dec 2016 09:49:24 +0000 (10:49 +0100)
data/organigramma/form/persona_nodo.form
data/organigramma/gui/organigramma.gui
src/personanodo.c

index 96c84c3362f549b8abd13d718c6b420d8e88da66..63f196e348ecbe363b482c171b52b72ca441f641 100644 (file)
                </field>
        </widget>
 
-       <widget type="entry" name="entry30">
-               <field type="text" name="nodo">
-                       <to-load>f</to-load>
-                       <to-save>f</to-save>
-               </field>
-       </widget>
-
-       <widget type="label" name="label115" label="label114">
-               <on-change what="update" when="after">
-                       <connection-name></connection-name>
-                       <widget-name>entry30</widget-name>
+       <widget type="decoder" name="gtkformdecoder12" label="label114">
+               <decoder>
                        <sql>
-                               SELECT nome FROM nodi WHERE id = ##label115::gint
+                               SELECT a.nome
+                               FROM nodi AS a
+                               WHERE a.id = ##key0::gint
                        </sql>
-               </on-change>
+               </decoder>
                <field type="integer" name="id_nodi">
                        <obligatory>t</obligatory>
                </field>
index bd8e87a28c5e583fdea21bc951672a306567e077..415d77772576ceb9a911d9920b0aad457ee88025 100644 (file)
                 <property name="top_attach">0</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkBox" id="hbox18">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
-                <property name="spacing">5</property>
-                <child>
-                  <object class="GtkEntry" id="entry30">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hexpand">True</property>
-                    <property name="editable">False</property>
-                    <property name="invisible_char">●</property>
-                    <property name="primary_icon_activatable">False</property>
-                    <property name="secondary_icon_activatable">False</property>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="button90">
-                    <property name="label" translatable="yes">...</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label115">
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">lbl_id_nodi</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
-              </packing>
-            </child>
             <child>
               <object class="GtkLabel" id="label117">
                 <property name="can_focus">False</property>
                 <property name="top_attach">4</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkFormDecoder" id="gtkformdecoder12">
+                <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>
           </object>
           <packing>
             <property name="expand">True</property>
index 9d62fe29aaf5dc2de117cb2b64ce7c84ca197988..e340d4589faa9c3fa638ded7db2527b76175ba5b 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <libzakautho/autoz.h>
 #include <libgtkform/form.h>
+#include <libgtkformui/gtkformdecoder.h>
 #include <libsolipa/utils.h>
 
 #include "personanodo.h"
@@ -54,7 +55,7 @@ static gboolean organigramma_persona_nodo_on_w_organigramma_persona_nodo_delete_
                                GdkEvent *event,
                                gpointer user_data);
 
-static void organigramma_persona_nodo_on_btn_ricerca_via_clicked (GtkButton *button,
+static void organigramma_persona_nodo_on_btn_nodo_clicked (GtkButton *button,
                                     gpointer user_data);
 static void organigramma_persona_nodo_on_btn_annulla_clicked (GtkButton *button,
                                     gpointer user_data);
@@ -165,8 +166,8 @@ OrganigrammaPersonaNodo
        g_signal_connect (priv->w,
                          "delete-event", G_CALLBACK (organigramma_persona_nodo_on_w_organigramma_persona_nodo_delete_event), (gpointer)a);
 
-       g_signal_connect (G_OBJECT (gtk_builder_get_object (priv->commons->gtkbuilder, "button90")),
-                         "clicked", G_CALLBACK (organigramma_persona_nodo_on_btn_ricerca_via_clicked), (gpointer)a);
+       g_signal_connect (G_OBJECT (gtk_builder_get_object (priv->commons->gtkbuilder, "gtkformdecoder12")),
+                         "btn-browse-clicked", G_CALLBACK (organigramma_persona_nodo_on_btn_nodo_clicked), (gpointer)a);
 
        g_signal_connect (G_OBJECT (gtk_builder_get_object (priv->commons->gtkbuilder, "button91")),
                          "clicked", G_CALLBACK (organigramma_persona_nodo_on_btn_annulla_clicked), (gpointer)a);
@@ -290,7 +291,8 @@ organigramma_persona_nodo_on_nodo_selezionato (gpointer instance, guint id, gpoi
 
        OrganigrammaPersonaNodoPrivate *priv = ORGANIGRAMMA_PERSONA_NODO_GET_PRIVATE (ia);
 
-       gtk_form_widget_set_value_stringify (gtk_form_get_form_widget_from_name (priv->form, "label115"), g_strdup_printf ("%d", id));
+       gtk_form_widget_set_value_stringify (gtk_form_get_form_widget_from_name (priv->form, "gtkformdecoder12"),
+                                            g_strdup_printf ("%d", id));
 }
 
 static void
@@ -354,7 +356,7 @@ organigramma_persona_nodo_on_w_organigramma_persona_nodo_delete_event (GtkWidget
 }
 
 static void
-organigramma_persona_nodo_on_btn_ricerca_via_clicked (GtkButton *button,
+organigramma_persona_nodo_on_btn_nodo_clicked (GtkButton *button,
                                     gpointer user_data)
 {
        GtkWidget *w;