mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-19 18:00:09 +00:00
Refixed patch for bug 612505.
New patch makes sure to update the display even when the GtkEntry's buffer is set to NULL, it also breaks the reference to the buffer in ->dispose() instead of ->finalize().
This commit is contained in:
parent
56c488e690
commit
c8ee1927a5
@ -2468,6 +2468,7 @@ gtk_entry_dispose (GObject *object)
|
|||||||
gtk_entry_set_icon_tooltip_markup (entry, GTK_ENTRY_ICON_PRIMARY, NULL);
|
gtk_entry_set_icon_tooltip_markup (entry, GTK_ENTRY_ICON_PRIMARY, NULL);
|
||||||
gtk_entry_set_icon_from_pixbuf (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_from_pixbuf (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
gtk_entry_set_icon_tooltip_markup (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
gtk_entry_set_icon_tooltip_markup (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||||
|
gtk_entry_set_buffer (entry, NULL);
|
||||||
|
|
||||||
G_OBJECT_CLASS (gtk_entry_parent_class)->dispose (object);
|
G_OBJECT_CLASS (gtk_entry_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
@ -2510,11 +2511,6 @@ gtk_entry_finalize (GObject *object)
|
|||||||
|
|
||||||
g_free (priv->im_module);
|
g_free (priv->im_module);
|
||||||
|
|
||||||
/* COMPAT: entry->text is a deprecated field, and the allocation
|
|
||||||
is owned by the buffer. */
|
|
||||||
|
|
||||||
gtk_entry_set_buffer (entry, NULL);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gtk_entry_parent_class)->finalize (object);
|
G_OBJECT_CLASS (gtk_entry_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6692,9 +6688,6 @@ gtk_entry_set_buffer (GtkEntry *entry,
|
|||||||
{
|
{
|
||||||
buffer_connect_signals (entry);
|
buffer_connect_signals (entry);
|
||||||
|
|
||||||
gtk_editable_set_position (GTK_EDITABLE (entry), 0);
|
|
||||||
gtk_entry_recompute (entry);
|
|
||||||
|
|
||||||
/* COMPAT: Deprecated. Not used. Setting these fields no longer necessary in GTK 3.x */
|
/* 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 = (char*)gtk_entry_buffer_get_text (priv->buffer);
|
||||||
entry->text_length = gtk_entry_buffer_get_length (priv->buffer);
|
entry->text_length = gtk_entry_buffer_get_length (priv->buffer);
|
||||||
@ -6711,6 +6704,9 @@ gtk_entry_set_buffer (GtkEntry *entry,
|
|||||||
g_object_notify (obj, "invisible-char");
|
g_object_notify (obj, "invisible-char");
|
||||||
g_object_notify (obj, "invisible-char-set");
|
g_object_notify (obj, "invisible-char-set");
|
||||||
g_object_thaw_notify (obj);
|
g_object_thaw_notify (obj);
|
||||||
|
|
||||||
|
gtk_editable_set_position (GTK_EDITABLE (entry), 0);
|
||||||
|
gtk_entry_recompute (entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user