From: Andrea Zagli Date: Sat, 30 Apr 2011 15:44:43 +0000 (+0200) Subject: Added functions GtkFormDecorator::get_key and GtkFormDecoder::get_decoded. X-Git-Tag: 0.3.1~12 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=34968b1bc749c38e4d4161667cda27a8007b3115;p=libgtkform Added functions GtkFormDecorator::get_key and GtkFormDecoder::get_decoded. --- diff --git a/ui/gtkformdecoder.c b/ui/gtkformdecoder.c index f3896a3..7eada4d 100644 --- a/ui/gtkformdecoder.c +++ b/ui/gtkformdecoder.c @@ -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 */ diff --git a/ui/gtkformdecoder.h b/ui/gtkformdecoder.h index 12dcf18..63db551 100644 --- a/ui/gtkformdecoder.h +++ b/ui/gtkformdecoder.h @@ -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