summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-08-28 22:27:36 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-08-28 22:27:36 -0400
commit29aa3818a4ff8f107bd4d9cc347db8c5c3415da4 (patch)
treec296aa1b8b36e7f27f184f43acc4e5f83ff66de4
parentaf8539bf11fd4e7084d304a6f33a46431f025741 (diff)
downloadgtk+-29aa3818a4ff8f107bd4d9cc347db8c5c3415da4.tar.gz
Remove deprecated text and text_length field in GtkEntry
These fields have been superseded by GtkEntryBuffer.
-rw-r--r--gtk/gtkentry.c27
-rw-r--r--gtk/gtkentry.h5
2 files changed, 3 insertions, 29 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 7189921e27..ff325092d7 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 9bf5f85ff5..9dcd3a581e 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);