]> saetta.ns0.it Git - solipa/territorio/commitdiff
Aggiunta la possibilità di nascondere i vari pulanti dei GtkFormDecoder in Territorio...
authorAndrea Zagli <azagli@libero.it>
Sun, 19 Jun 2011 11:06:12 +0000 (13:06 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 19 Jun 2011 11:06:12 +0000 (13:06 +0200)
src/widget.c

index 0020b9846b655442bf3884c56eafa914b0d27f2b..081e18566712104b2e640dc459aee91d9dfc7648 100644 (file)
@@ -36,10 +36,25 @@ enum
 {
        PROP_0,
        PROP_SHOW_STATO,
+       PROP_SHOW_STATO_CLEAN,
+       PROP_SHOW_STATO_OPEN,
+       PROP_SHOW_STATO_BROWSE,
        PROP_SHOW_REGIONE,
+       PROP_SHOW_REGIONE_CLEAN,
+       PROP_SHOW_REGIONE_OPEN,
+       PROP_SHOW_REGIONE_BROWSE,
        PROP_SHOW_PROVINCIA,
+       PROP_SHOW_PROVINCIA_CLEAN,
+       PROP_SHOW_PROVINCIA_OPEN,
+       PROP_SHOW_PROVINCIA_BROWSE,
        PROP_SHOW_COMUNE,
-       PROP_SHOW_VIA
+       PROP_SHOW_COMUNE_CLEAN,
+       PROP_SHOW_COMUNE_OPEN,
+       PROP_SHOW_COMUNE_BROWSE,
+       PROP_SHOW_VIA,
+       PROP_SHOW_VIA_CLEAN,
+       PROP_SHOW_VIA_OPEN,
+       PROP_SHOW_VIA_BROWSE
 };
 
 static void territorio_widget_class_init (TerritorioWidgetClass *klass);
@@ -155,6 +170,27 @@ territorio_widget_class_init (TerritorioWidgetClass *klass)
                                                               TRUE,
                                                               G_PARAM_READWRITE));
 
+       g_object_class_install_property (object_class, PROP_SHOW_STATO_CLEAN,
+                                        g_param_spec_boolean ("show-stato-clean",
+                                                              "Visualizza pulitura stato",
+                                                              "Se il pulsante di pulitura dello stato è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_STATO_OPEN,
+                                        g_param_spec_boolean ("show-stato-open",
+                                                              "Visualizza apertura stato",
+                                                              "Se il pulsante di apertura dello stato è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_STATO_BROWSE,
+                                        g_param_spec_boolean ("show-stato-browse",
+                                                              "Visualizza scelta stato",
+                                                              "Se il pulsante di scelta dello stato è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
        g_object_class_install_property (object_class, PROP_SHOW_REGIONE,
                                         g_param_spec_boolean ("show-regione",
                                                               "Visualizza scelta regione",
@@ -162,6 +198,27 @@ territorio_widget_class_init (TerritorioWidgetClass *klass)
                                                               TRUE,
                                                               G_PARAM_READWRITE));
 
+       g_object_class_install_property (object_class, PROP_SHOW_REGIONE_CLEAN,
+                                        g_param_spec_boolean ("show-regione-clean",
+                                                              "Visualizza pulitura regione",
+                                                              "Se il pulsante di pulitura della regione è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_REGIONE_OPEN,
+                                        g_param_spec_boolean ("show-regione-open",
+                                                              "Visualizza apertura regione",
+                                                              "Se il pulsante di apertura della regione è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_REGIONE_BROWSE,
+                                        g_param_spec_boolean ("show-regione-browse",
+                                                              "Visualizza scelta regione",
+                                                              "Se il pulsante di scelta della regione è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
        g_object_class_install_property (object_class, PROP_SHOW_PROVINCIA,
                                         g_param_spec_boolean ("show-provincia",
                                                               "Visualizza scelta provincia",
@@ -169,6 +226,27 @@ territorio_widget_class_init (TerritorioWidgetClass *klass)
                                                               TRUE,
                                                               G_PARAM_READWRITE));
 
+       g_object_class_install_property (object_class, PROP_SHOW_PROVINCIA_CLEAN,
+                                        g_param_spec_boolean ("show-provincia-clean",
+                                                              "Visualizza pulitura provincia",
+                                                              "Se il pulsante di pulitura della provincia è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_PROVINCIA_OPEN,
+                                        g_param_spec_boolean ("show-provincia-open",
+                                                              "Visualizza apertura provincia",
+                                                              "Se il pulsante di apertura della provincia è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_PROVINCIA_BROWSE,
+                                        g_param_spec_boolean ("show-provincia-browse",
+                                                              "Visualizza scelta provincia",
+                                                              "Se il pulsante di scelta della provincia è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
        g_object_class_install_property (object_class, PROP_SHOW_COMUNE,
                                         g_param_spec_boolean ("show-comune",
                                                               "Visualizza scelta comune",
@@ -176,6 +254,27 @@ territorio_widget_class_init (TerritorioWidgetClass *klass)
                                                               TRUE,
                                                               G_PARAM_READWRITE));
 
+       g_object_class_install_property (object_class, PROP_SHOW_COMUNE_CLEAN,
+                                        g_param_spec_boolean ("show-comune-clean",
+                                                              "Visualizza pulitura comune",
+                                                              "Se il pulsante di pulitura del comune è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_COMUNE_OPEN,
+                                        g_param_spec_boolean ("show-comune-open",
+                                                              "Visualizza apertura comune",
+                                                              "Se il pulsante di apertura del comune è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_COMUNE_BROWSE,
+                                        g_param_spec_boolean ("show-comune-browse",
+                                                              "Visualizza scelta comune",
+                                                              "Se il pulsante di scelta del comune è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
        g_object_class_install_property (object_class, PROP_SHOW_VIA,
                                         g_param_spec_boolean ("show-via",
                                                               "Visualizza scelta via",
@@ -183,6 +282,26 @@ territorio_widget_class_init (TerritorioWidgetClass *klass)
                                                               TRUE,
                                                               G_PARAM_READWRITE));
 
+       g_object_class_install_property (object_class, PROP_SHOW_VIA_CLEAN,
+                                        g_param_spec_boolean ("show-via-clean",
+                                                              "Visualizza pulitura via",
+                                                              "Se il pulsante di pulitura della via è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_VIA_OPEN,
+                                        g_param_spec_boolean ("show-via-open",
+                                                              "Visualizza apertura via",
+                                                              "Se il pulsante di apertura della via è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SHOW_VIA_BROWSE,
+                                        g_param_spec_boolean ("show-via-browse",
+                                                              "Visualizza scelta via",
+                                                              "Se il pulsante di scelta della via è disponibile",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
 }
 
 static void
@@ -321,26 +440,86 @@ territorio_widget_set_property (GObject *object, guint property_id, const GValue
                                gtk_widget_set_visible (priv->dec_stato, g_value_get_boolean (value));
                                break;
 
+                       case PROP_SHOW_STATO_CLEAN:
+                               gtk_form_decoder_show_btn_clean (GTK_FORM_DECODER (priv->dec_stato), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_STATO_OPEN:
+                               gtk_form_decoder_show_btn_open (GTK_FORM_DECODER (priv->dec_stato), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_STATO_BROWSE:
+                               gtk_form_decoder_show_btn_browse (GTK_FORM_DECODER (priv->dec_stato), g_value_get_boolean (value));
+                               break;
+
                        case PROP_SHOW_REGIONE:
                                gtk_widget_set_visible (priv->lbl_regione, g_value_get_boolean (value));
                                gtk_widget_set_visible (priv->dec_regione, g_value_get_boolean (value));
                                break;
 
+                       case PROP_SHOW_REGIONE_CLEAN:
+                               gtk_form_decoder_show_btn_clean (GTK_FORM_DECODER (priv->dec_regione), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_REGIONE_OPEN:
+                               gtk_form_decoder_show_btn_open (GTK_FORM_DECODER (priv->dec_regione), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_REGIONE_BROWSE:
+                               gtk_form_decoder_show_btn_browse (GTK_FORM_DECODER (priv->dec_regione), g_value_get_boolean (value));
+                               break;
+
                        case PROP_SHOW_PROVINCIA:
                                gtk_widget_set_visible (priv->lbl_provincia, g_value_get_boolean (value));
                                gtk_widget_set_visible (priv->dec_provincia, g_value_get_boolean (value));
                                break;
 
+                       case PROP_SHOW_PROVINCIA_CLEAN:
+                               gtk_form_decoder_show_btn_clean (GTK_FORM_DECODER (priv->dec_provincia), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_PROVINCIA_OPEN:
+                               gtk_form_decoder_show_btn_open (GTK_FORM_DECODER (priv->dec_provincia), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_PROVINCIA_BROWSE:
+                               gtk_form_decoder_show_btn_browse (GTK_FORM_DECODER (priv->dec_provincia), g_value_get_boolean (value));
+                               break;
+
                        case PROP_SHOW_COMUNE:
                                gtk_widget_set_visible (priv->lbl_comune, g_value_get_boolean (value));
                                gtk_widget_set_visible (priv->dec_comune, g_value_get_boolean (value));
                                break;
 
+                       case PROP_SHOW_COMUNE_CLEAN:
+                               gtk_form_decoder_show_btn_clean (GTK_FORM_DECODER (priv->dec_comune), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_COMUNE_OPEN:
+                               gtk_form_decoder_show_btn_open (GTK_FORM_DECODER (priv->dec_comune), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_COMUNE_BROWSE:
+                               gtk_form_decoder_show_btn_browse (GTK_FORM_DECODER (priv->dec_comune), g_value_get_boolean (value));
+                               break;
+
                        case PROP_SHOW_VIA:
                                gtk_widget_set_visible (priv->lbl_via, g_value_get_boolean (value));
                                gtk_widget_set_visible (priv->dec_via, g_value_get_boolean (value));
                                break;
 
+                       case PROP_SHOW_VIA_CLEAN:
+                               gtk_form_decoder_show_btn_clean (GTK_FORM_DECODER (priv->dec_via), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_VIA_OPEN:
+                               gtk_form_decoder_show_btn_open (GTK_FORM_DECODER (priv->dec_via), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SHOW_VIA_BROWSE:
+                               gtk_form_decoder_show_btn_browse (GTK_FORM_DECODER (priv->dec_via), g_value_get_boolean (value));
+                               break;
+
                        default:
                                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
                                break;
@@ -359,22 +538,82 @@ territorio_widget_get_property (GObject *object, guint property_id, GValue *valu
                                g_value_set_boolean (value, gtk_widget_get_visible (priv->dec_stato));
                                break;
 
+                       case PROP_SHOW_STATO_CLEAN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_clean_is_visible (GTK_FORM_DECODER (priv->dec_stato)));
+                               break;
+
+                       case PROP_SHOW_STATO_OPEN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_open_is_visible (GTK_FORM_DECODER (priv->dec_stato)));
+                               break;
+
+                       case PROP_SHOW_STATO_BROWSE:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_browse_is_visible (GTK_FORM_DECODER (priv->dec_stato)));
+                               break;
+
                        case PROP_SHOW_REGIONE:
                                g_value_set_boolean (value, gtk_widget_get_visible (priv->dec_regione));
                                break;
 
+                       case PROP_SHOW_REGIONE_CLEAN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_clean_is_visible (GTK_FORM_DECODER (priv->dec_regione)));
+                               break;
+
+                       case PROP_SHOW_REGIONE_OPEN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_open_is_visible (GTK_FORM_DECODER (priv->dec_regione)));
+                               break;
+
+                       case PROP_SHOW_REGIONE_BROWSE:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_browse_is_visible (GTK_FORM_DECODER (priv->dec_regione)));
+                               break;
+
                        case PROP_SHOW_PROVINCIA:
                                g_value_set_boolean (value, gtk_widget_get_visible (priv->dec_provincia));
                                break;
 
+                       case PROP_SHOW_PROVINCIA_CLEAN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_clean_is_visible (GTK_FORM_DECODER (priv->dec_provincia)));
+                               break;
+
+                       case PROP_SHOW_PROVINCIA_OPEN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_open_is_visible (GTK_FORM_DECODER (priv->dec_provincia)));
+                               break;
+
+                       case PROP_SHOW_PROVINCIA_BROWSE:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_browse_is_visible (GTK_FORM_DECODER (priv->dec_provincia)));
+                               break;
+
                        case PROP_SHOW_COMUNE:
                                g_value_set_boolean (value, gtk_widget_get_visible (priv->dec_comune));
                                break;
 
+                       case PROP_SHOW_COMUNE_CLEAN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_clean_is_visible (GTK_FORM_DECODER (priv->dec_comune)));
+                               break;
+
+                       case PROP_SHOW_COMUNE_OPEN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_open_is_visible (GTK_FORM_DECODER (priv->dec_comune)));
+                               break;
+
+                       case PROP_SHOW_COMUNE_BROWSE:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_browse_is_visible (GTK_FORM_DECODER (priv->dec_comune)));
+                               break;
+
                        case PROP_SHOW_VIA:
                                g_value_set_boolean (value, gtk_widget_get_visible (priv->dec_via));
                                break;
 
+                       case PROP_SHOW_VIA_CLEAN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_clean_is_visible (GTK_FORM_DECODER (priv->dec_via)));
+                               break;
+
+                       case PROP_SHOW_VIA_OPEN:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_open_is_visible (GTK_FORM_DECODER (priv->dec_via)));
+                               break;
+
+                       case PROP_SHOW_VIA_BROWSE:
+                               g_value_set_boolean (value, gtk_form_decoder_btn_browse_is_visible (GTK_FORM_DECODER (priv->dec_via)));
+                               break;
+
                        default:
                                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
                                break;