g_signal_connect (gtk_builder_get_object (priv->commons->gtkbuilder, "button66"),
"clicked", G_CALLBACK (territorio_stati_qe_on_btn_seleziona_clicked), (gpointer)a);
- priv->qe = gdaex_query_editor_new (priv->commons->gdaex);
- gdaex_query_editor_load_tables_from_file (priv->qe, g_build_filename (priv->commons->queryeditordir, "stati.xml", NULL), TRUE);
- gdaex_query_editor_set_show_visible (priv->qe, FALSE);
- gdaex_query_editor_set_order_visible (priv->qe, FALSE);
+ if (!GDAEX_IS_QUERY_EDITOR (qe))
+ {
+ priv->qe = g_object_ref (gdaex_query_editor_new (priv->commons->gdaex));
+ gdaex_query_editor_load_tables_from_file (priv->qe, g_build_filename (priv->commons->queryeditordir, "stati.xml", NULL), TRUE);
+ gdaex_query_editor_set_show_visible (priv->qe, FALSE);
+ gdaex_query_editor_set_order_visible (priv->qe, FALSE);
+ }
+ else
+ {
+ priv->qe = qe;
+ }
priv->wqe = gdaex_query_editor_get_widget (priv->qe);
gtk_box_pack_start (GTK_BOX (gtk_builder_get_object (priv->commons->gtkbuilder, "vbox19")),
priv->wqe,
0);
- if (GDAEX_IS_QUERY_EDITOR (qe))
- {
- gdaex_query_editor_load_choices_from_xml (priv->qe,
- gdaex_query_editor_get_sql_as_xml (qe),
- TRUE);
- }
-
return a;
}
g_signal_emit (G_OBJECT (territorio_stati_qe), klass->selezionato_signal_id, 0, (gpointer)priv->qe);
+ gtk_container_remove (GTK_CONTAINER (gtk_builder_get_object (priv->commons->gtkbuilder, "vbox19")),
+ priv->wqe);
gtk_widget_destroy (priv->widget);
g_object_unref (G_OBJECT (territorio_stati_qe));
}
{
TerritorioStatiQePrivate *priv = TERRITORIO_STATI_QE_GET_PRIVATE ((TerritorioStatiQe *)user_data);
+ gtk_container_remove (GTK_CONTAINER (gtk_builder_get_object (priv->commons->gtkbuilder, "vbox19")),
+ priv->wqe);
gtk_widget_destroy (priv->widget);
g_object_unref (G_OBJECT (user_data));
}