From dc5608162b48dd599a6f367570b2c062d0e1a2a0 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Wed, 17 Aug 2011 09:17:57 +0200 Subject: [PATCH] Piccoli aggiustamenti al codice. --- src/widget.c | 100 ++++++++++++++++++++++++------------------------- tests/widget.c | 5 ++- 2 files changed, 53 insertions(+), 52 deletions(-) diff --git a/src/widget.c b/src/widget.c index 85ffdb5..0ff358a 100644 --- a/src/widget.c +++ b/src/widget.c @@ -84,44 +84,44 @@ static void territorio_widget_on_via_aggiornato (gpointer instance, gpointer use static void territorio_widget_on_stato_selezionato (gpointer instance, guint id, gpointer user_data); static void territorio_widget_on_regione_selezionato (gpointer instance, guint id, gpointer user_data); -static void territorio_widget_on_privincia_selezionato (gpointer instance, guint id, gpointer user_data); +static void territorio_widget_on_provincia_selezionato (gpointer instance, guint id, gpointer user_data); static void territorio_widget_on_comune_selezionato (gpointer instance, guint id, gpointer user_data); static void territorio_widget_on_via_selezionato (gpointer instance, guint id, gpointer user_data); static gboolean territorio_widget_on_btn_stato_clean_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_stato_open_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_stato_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static gboolean territorio_widget_on_btn_regione_clean_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_regione_open_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_regione_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static gboolean territorio_widget_on_btn_provincia_clean_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_provincia_open_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_provincia_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static gboolean territorio_widget_on_btn_comune_clean_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_comune_open_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_comune_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static gboolean territorio_widget_on_btn_via_clean_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_via_open_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); static void territorio_widget_on_btn_via_clicked (GtkButton *button, - gpointer user_data); + gpointer user_data); #define TERRITORIO_WIDGET_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_TERRITORIO_WIDGET, TerritorioWidgetPrivate)) @@ -375,40 +375,40 @@ GtkWidget "sql", "SELECT nome FROM vie WHERE id = ##key0::gint", NULL); - g_signal_connect (priv->dec_stato, - "btn-clean-clicked", G_CALLBACK (territorio_widget_on_btn_stato_clean_clicked), (gpointer)a); - g_signal_connect (priv->dec_stato, - "btn-open-clicked", G_CALLBACK (territorio_widget_on_btn_stato_open_clicked), (gpointer)a); - g_signal_connect (priv->dec_stato, - "btn-browse-clicked", G_CALLBACK (territorio_widget_on_btn_stato_clicked), (gpointer)a); - - g_signal_connect (priv->dec_regione, - "btn-clean-clicked", G_CALLBACK (territorio_widget_on_btn_regione_clean_clicked), (gpointer)a); - g_signal_connect (priv->dec_regione, - "btn-open-clicked", G_CALLBACK (territorio_widget_on_btn_regione_open_clicked), (gpointer)a); - g_signal_connect (priv->dec_regione, - "btn-browse-clicked", G_CALLBACK (territorio_widget_on_btn_regione_clicked), (gpointer)a); - - g_signal_connect (priv->dec_provincia, - "btn-clean-clicked", G_CALLBACK (territorio_widget_on_btn_provincia_clean_clicked), (gpointer)a); - g_signal_connect (priv->dec_provincia, - "btn-open-clicked", G_CALLBACK (territorio_widget_on_btn_provincia_open_clicked), (gpointer)a); - g_signal_connect (priv->dec_provincia, - "btn-browse-clicked", G_CALLBACK (territorio_widget_on_btn_provincia_clicked), (gpointer)a); - - g_signal_connect (priv->dec_comune, - "btn-clean-clicked", G_CALLBACK (territorio_widget_on_btn_comune_clean_clicked), (gpointer)a); - g_signal_connect (priv->dec_comune, - "btn-open-clicked", G_CALLBACK (territorio_widget_on_btn_comune_open_clicked), (gpointer)a); - g_signal_connect (priv->dec_comune, - "btn-browse-clicked", G_CALLBACK (territorio_widget_on_btn_comune_clicked), (gpointer)a); - - g_signal_connect (priv->dec_via, - "btn-clean-clicked", G_CALLBACK (territorio_widget_on_btn_via_clean_clicked), (gpointer)a); - g_signal_connect (priv->dec_via, - "btn-open-clicked", G_CALLBACK (territorio_widget_on_btn_via_open_clicked), (gpointer)a); - g_signal_connect (priv->dec_via, - "btn-browse-clicked", G_CALLBACK (territorio_widget_on_btn_via_clicked), (gpointer)a); + g_signal_connect (priv->dec_stato, "btn-clean-clicked", + G_CALLBACK (territorio_widget_on_btn_stato_clean_clicked), (gpointer)a); + g_signal_connect (priv->dec_stato, "btn-open-clicked", + G_CALLBACK (territorio_widget_on_btn_stato_open_clicked), (gpointer)a); + g_signal_connect (priv->dec_stato, "btn-browse-clicked", + G_CALLBACK (territorio_widget_on_btn_stato_clicked), (gpointer)a); + + g_signal_connect (priv->dec_regione, "btn-clean-clicked", + G_CALLBACK (territorio_widget_on_btn_regione_clean_clicked), (gpointer)a); + g_signal_connect (priv->dec_regione, "btn-open-clicked", + G_CALLBACK (territorio_widget_on_btn_regione_open_clicked), (gpointer)a); + g_signal_connect (priv->dec_regione, "btn-browse-clicked", + G_CALLBACK (territorio_widget_on_btn_regione_clicked), (gpointer)a); + + g_signal_connect (priv->dec_provincia, "btn-clean-clicked", + G_CALLBACK (territorio_widget_on_btn_provincia_clean_clicked), (gpointer)a); + g_signal_connect (priv->dec_provincia, "btn-open-clicked", + G_CALLBACK (territorio_widget_on_btn_provincia_open_clicked), (gpointer)a); + g_signal_connect (priv->dec_provincia, "btn-browse-clicked", + G_CALLBACK (territorio_widget_on_btn_provincia_clicked), (gpointer)a); + + g_signal_connect (priv->dec_comune, "btn-clean-clicked", + G_CALLBACK (territorio_widget_on_btn_comune_clean_clicked), (gpointer)a); + g_signal_connect (priv->dec_comune, "btn-open-clicked", + G_CALLBACK (territorio_widget_on_btn_comune_open_clicked), (gpointer)a); + g_signal_connect (priv->dec_comune, "btn-browse-clicked", + G_CALLBACK (territorio_widget_on_btn_comune_clicked), (gpointer)a); + + g_signal_connect (priv->dec_via, "btn-clean-clicked", + G_CALLBACK (territorio_widget_on_btn_via_clean_clicked), (gpointer)a); + g_signal_connect (priv->dec_via, "btn-open-clicked", + G_CALLBACK (territorio_widget_on_btn_via_open_clicked), (gpointer)a); + g_signal_connect (priv->dec_via, "btn-browse-clicked", + G_CALLBACK (territorio_widget_on_btn_via_clicked), (gpointer)a); return w; } diff --git a/tests/widget.c b/tests/widget.c index c0b19fc..465b1f3 100644 --- a/tests/widget.c +++ b/tests/widget.c @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include "commons.h" @@ -124,10 +125,10 @@ main (int argc, char **argv) territorio = territorio_widget_new (commons); gtk_container_add (GTK_CONTAINER (w), territorio); - g_object_set (G_OBJECT (territorio), + /*g_object_set (G_OBJECT (territorio), "show-stato-clean", FALSE, "show-provincia-browse", FALSE, - NULL); + NULL);*/ /*g_signal_connect (G_OBJECT (decoder), "btn_clean_clicked", G_CALLBACK (on_btn_clean_clicked), NULL);*/ -- 2.49.0