[gtk+] Remove deprecated text and text_length field in GtkEntry



commit 29aa3818a4ff8f107bd4d9cc347db8c5c3415da4
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 28 22:27:36 2010 -0400

    Remove deprecated text and text_length field in GtkEntry
    
    These fields have been superseded by GtkEntryBuffer.

 gtk/gtkentry.c |   27 +++------------------------
 gtk/gtkentry.h |    5 -----
 2 files changed, 3 insertions(+), 29 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 7189921..ff32509 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -4377,8 +4377,8 @@ gtk_entry_get_chars      (GtkEditable   *editable,
   start_pos = MIN (text_length, start_pos);
   end_pos = MIN (text_length, end_pos);
 
-  start_index = g_utf8_offset_to_pointer (text, start_pos) - entry->text;
-  end_index = g_utf8_offset_to_pointer (text, end_pos) - entry->text;
+  start_index = g_utf8_offset_to_pointer (text, start_pos) - text;
+  end_index = g_utf8_offset_to_pointer (text, end_pos) - text;
 
   return g_strndup (text + start_index, end_index - start_index);
 }
@@ -4720,9 +4720,6 @@ buffer_notify_text (GtkEntryBuffer *buffer,
                     GParamSpec     *spec,
                     GtkEntry       *entry)
 {
-  /* COMPAT: Deprecated, not used. This struct field will be removed in GTK+ 3.x */
-  entry->text = (gchar*)gtk_entry_buffer_get_text (buffer);
-
   gtk_entry_recompute (entry);
   emit_changed (entry);
   g_object_notify (G_OBJECT (entry), "text");
@@ -4733,9 +4730,6 @@ buffer_notify_length (GtkEntryBuffer *buffer,
                       GParamSpec     *spec,
                       GtkEntry       *entry)
 {
-  /* COMPAT: Deprecated, not used. This struct field will be removed in GTK+ 3.x */
-  entry->text_length = gtk_entry_buffer_get_length (buffer);
-
   g_object_notify (G_OBJECT (entry), "text-length");
 }
 
@@ -4744,9 +4738,6 @@ buffer_notify_max_length (GtkEntryBuffer *buffer,
                           GParamSpec     *spec,
                           GtkEntry       *entry)
 {
-  /* COMPAT: Deprecated, not used. This struct field will be removed in GTK+ 3.x */
-  entry->text_max_length = gtk_entry_buffer_get_max_length (buffer);
-
   g_object_notify (G_OBJECT (entry), "max-length");
 }
 
@@ -6762,24 +6753,12 @@ gtk_entry_set_buffer (GtkEntry       *entry,
     {
       buffer_disconnect_signals (entry);
       g_object_unref (priv->buffer);
-
-      /* COMPAT: Deprecated. Not used. Setting these fields no longer necessary in GTK 3.x */
-      entry->text = NULL;
-      entry->text_length = 0;
-      entry->text_max_length = 0;
     }
 
   priv->buffer = buffer;
 
   if (priv->buffer)
-    {
-       buffer_connect_signals (entry);
-
-      /* COMPAT: Deprecated. Not used. Setting these fields no longer necessary in GTK 3.x */
-      entry->text = (char*)gtk_entry_buffer_get_text (priv->buffer);
-      entry->text_length = gtk_entry_buffer_get_length (priv->buffer);
-      entry->text_max_length = gtk_entry_buffer_get_max_length (priv->buffer);
-    }
+     buffer_connect_signals (entry);
 
   obj = G_OBJECT (entry);
   g_object_freeze_notify (obj);
diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h
index 9bf5f85..9dcd3a5 100644
--- a/gtk/gtkentry.h
+++ b/gtk/gtkentry.h
@@ -67,17 +67,12 @@ struct _GtkEntry
 {
   GtkWidget  widget;
 
-  gchar       *GSEAL (text);                        /* COMPAT: Deprecated, not used. Remove in GTK+ 3.x */
-
   guint        GSEAL (editable) : 1;
   guint        GSEAL (visible)  : 1;
   guint        GSEAL (overwrite_mode) : 1;
   guint        GSEAL (in_drag) : 1;	            /* FIXME: Should be private?
                                                        Dragging within the selection */
 
-  guint16      GSEAL (text_length);                 /* COMPAT: Deprecated, not used. Remove in GTK+ 3.x */
-  guint16      GSEAL (text_max_length);             /* COMPAT: Deprecated, not used. Remove in GTK+ 3.x */
-
   /*< private >*/
   GdkWindow    *GSEAL (text_area);
   GtkIMContext *GSEAL (im_context);



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