[gtk] entry: Make placeholder-text work again



commit 9335cde8e894925c67d2e190879f871e59b9b730
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Feb 25 09:21:56 2019 -0500

    entry: Make placeholder-text work again

 gtk/gtkentry.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 854410dddf..bcf8495883 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3363,11 +3363,11 @@ void
 gtk_entry_set_placeholder_text (GtkEntry    *entry,
                                 const gchar *text)
 {
-  g_return_if_fail (GTK_IS_ENTRY (entry));
+  GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
 
-  //FIXME
+  g_return_if_fail (GTK_IS_ENTRY (entry));
 
-  g_object_notify_by_pspec (G_OBJECT (entry), entry_props[PROP_PLACEHOLDER_TEXT]);
+  gtk_text_set_placeholder_text (GTK_TEXT (priv->text), text);
 }
 
 /**
@@ -3384,10 +3384,11 @@ gtk_entry_set_placeholder_text (GtkEntry    *entry,
 const gchar *
 gtk_entry_get_placeholder_text (GtkEntry *entry)
 {
+  GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
+
   g_return_val_if_fail (GTK_IS_ENTRY (entry), NULL);
 
-  //FIXME
-  return NULL;
+  return gtk_text_get_placeholder_text (GTK_TEXT (priv->text));
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]