]> saetta.ns0.it Git - libgtkform/commitdiff
Added functions GtkFormDecorator::get_key and GtkFormDecoder::get_decoded.
authorAndrea Zagli <azagli@libero.it>
Sat, 30 Apr 2011 15:44:43 +0000 (17:44 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 30 Apr 2011 15:44:43 +0000 (17:44 +0200)
ui/gtkformdecoder.c
ui/gtkformdecoder.h

index f3896a3a1dd4f538f4c12e25f1b45afe1a556e63..7eada4dd42ebdd0c1c6e9e0e33faf8c9433d90e5 100644 (file)
@@ -138,6 +138,30 @@ GtkWidget
        return w;
 }
 
+gchar
+*gtk_form_decoder_get_key (GtkFormDecoder *decoder)
+{
+       GtkFormDecoderPrivate *priv;
+
+       g_return_val_if_fail (GTK_IS_FORM_DECODER (decoder), NULL);
+
+       priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
+
+       return g_strdup (gtk_label_get_text (GTK_LABEL (priv->lbl_key)));
+}
+
+gchar
+*gtk_form_decoder_get_decoded (GtkFormDecoder *decoder)
+{
+       GtkFormDecoderPrivate *priv;
+
+       g_return_val_if_fail (GTK_IS_FORM_DECODER (decoder), NULL);
+
+       priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
+
+       return g_strdup (gtk_entry_get_text (GTK_ENTRY (priv->txt_decoded)));
+}
+
 /* PRIVATE */
 
 /* CALLBACKS */
index 12dcf184af50994bcf6472d8e9df887616b4de5c..63db5516659b6623fa24245e206c6f7add6afdc2 100644 (file)
@@ -56,6 +56,9 @@ GType gtk_form_decoder_get_type (void) G_GNUC_CONST;
 
 GtkWidget *gtk_form_decoder_new (void);
 
+gchar *gtk_form_decoder_get_key (GtkFormDecoder *decoder);
+gchar *gtk_form_decoder_get_decoded (GtkFormDecoder *decoder);
+
 
 G_END_DECLS