]> saetta.ns0.it Git - libgtkform/commitdiff
Made public functions to manage properties.
authorAndrea Zagli <azagli@libero.it>
Sun, 19 Jun 2011 11:09:30 +0000 (13:09 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 19 Jun 2011 11:09:30 +0000 (13:09 +0200)
Bugfixes.

libgtkformui.pc.in
ui/gtkformdecoder.c
ui/gtkformdecoder.h

index 371fefe455e0c2d2f16d1be9578b4b2aafc79b2a..73fe473d1ad840face9c127fdb8217714a0850bf 100644 (file)
@@ -7,5 +7,5 @@ Name: @PACKAGE_NAME@ui
 Description: Class to more easly manage Gtk+ forms binded to db (or not) UI.
 Version: @PACKAGE_VERSION@
 Requires: gtk+-2.0, libgtkform
-Libs: -L${libdir} -lgtkform
+Libs: -L${libdir} -lgtkformui
 Cflags: -I${includedir}
index 079326b2fe687d83e9ab7e500c2aecf3bb7fae31..2023cf1d9d7ebc7c632ff9421d19f7e4dd5d13fa 100644 (file)
@@ -170,9 +170,9 @@ gtk_form_decoder_class_init (GtkFormDecoderClass *klass)
                                                       0,
                                                       NULL,
                                                       NULL,
-                                                      g_cclosure_marshal_BOOLEAN__FLAGS,
-                                                      G_TYPE_BOOLEAN,
-                                                      1, G_TYPE_INT);
+                                                      g_cclosure_marshal_VOID__VOID,
+                                                      G_TYPE_NONE,
+                                                      0);
 
        /**
         * GtkFormDecoder::btn_browse_clicked:
@@ -373,7 +373,7 @@ gtk_form_decoder_decode (GtkFormDecoder *decoder)
                }
 }
 
-static void
+void
 gtk_form_decoder_show_btn_clean (GtkFormDecoder *decoder, gboolean visible)
 {
        GtkFormDecoderPrivate *priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
@@ -383,7 +383,7 @@ gtk_form_decoder_show_btn_clean (GtkFormDecoder *decoder, gboolean visible)
        gtk_entry_set_icon_sensitive (GTK_ENTRY (priv->txt_decoded), GTK_ENTRY_ICON_SECONDARY, visible);
 }
 
-static void
+void
 gtk_form_decoder_show_btn_open (GtkFormDecoder *decoder, gboolean visible)
 {
        GtkFormDecoderPrivate *priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
@@ -391,7 +391,7 @@ gtk_form_decoder_show_btn_open (GtkFormDecoder *decoder, gboolean visible)
        gtk_widget_set_visible (priv->btn_open, visible);
 }
 
-static void
+void
 gtk_form_decoder_show_btn_browse (GtkFormDecoder *decoder, gboolean visible)
 {
        GtkFormDecoderPrivate *priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
@@ -399,6 +399,30 @@ gtk_form_decoder_show_btn_browse (GtkFormDecoder *decoder, gboolean visible)
        gtk_widget_set_visible (priv->btn_browse, visible);
 }
 
+gboolean
+gtk_form_decoder_btn_clean_is_visible (GtkFormDecoder *decoder)
+{
+       GtkFormDecoderPrivate *priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
+
+       return gtk_entry_get_icon_stock (GTK_ENTRY (priv->txt_decoded), GTK_ENTRY_ICON_SECONDARY) != NULL;
+}
+
+gboolean
+gtk_form_decoder_btn_open_is_visible (GtkFormDecoder *decoder)
+{
+       GtkFormDecoderPrivate *priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
+
+       return gtk_widget_get_visible (priv->btn_open);
+}
+
+gboolean
+gtk_form_decoder_btn_browse_is_visible (GtkFormDecoder *decoder)
+{
+       GtkFormDecoderPrivate *priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
+
+       return gtk_widget_get_visible (priv->btn_browse);
+}
+
 /* CALLBACKS */
 static void
 gtk_form_decoder_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
@@ -463,15 +487,15 @@ gtk_form_decoder_get_property (GObject *object, guint property_id, GValue *value
                                break;
 
                        case PROP_SHOW_CLEAN:
-                               g_value_set_boolean (value, gtk_entry_get_icon_stock (GTK_ENTRY (priv->txt_decoded), GTK_ENTRY_ICON_SECONDARY) != NULL);
+                               g_value_set_boolean (value, gtk_form_decoder_btn_clean_is_visible (decoder));
                                break;
 
                        case PROP_SHOW_OPEN:
-                               g_value_set_boolean (value, gtk_widget_get_visible (priv->btn_open));
+                               g_value_set_boolean (value, gtk_form_decoder_btn_open_is_visible (decoder));
                                break;
 
                        case PROP_SHOW_BROWSE:
-                               g_value_set_boolean (value, gtk_widget_get_visible (priv->btn_browse));
+                               g_value_set_boolean (value, gtk_form_decoder_btn_browse_is_visible (decoder));
                                break;
 
                        default:
index 92fb3ef55555178904fdf3b79562f8c6fe69b1f3..07a02af8f384270ff19bf64d6543e8f74755760d 100644 (file)
@@ -63,6 +63,14 @@ void gtk_form_decoder_set_key (GtkFormDecoder *decoder, const gchar *key);
 gchar *gtk_form_decoder_get_key (GtkFormDecoder *decoder);
 gchar *gtk_form_decoder_get_decoded (GtkFormDecoder *decoder);
 
+void gtk_form_decoder_show_btn_clean (GtkFormDecoder *decoder, gboolean visible);
+void gtk_form_decoder_show_btn_open (GtkFormDecoder *decoder, gboolean visible);
+void gtk_form_decoder_show_btn_browse (GtkFormDecoder *decoder, gboolean visible);
+
+gboolean gtk_form_decoder_btn_clean_is_visible (GtkFormDecoder *decoder);
+gboolean gtk_form_decoder_btn_open_is_visible (GtkFormDecoder *decoder);
+gboolean gtk_form_decoder_btn_browse_is_visible (GtkFormDecoder *decoder);
+
 
 G_END_DECLS