[gtk+/composite-templates] Export gtk_entry_get_display_text() as a private function through gtkentryprivate.h, so we can use i
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/composite-templates] Export gtk_entry_get_display_text() as a private function through gtkentryprivate.h, so we can use i
- Date: Fri, 14 Sep 2012 21:11:47 +0000 (UTC)
commit e5f14e73318c9104e29bc46a589cb4bc5a50be25
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Fri Aug 10 18:03:17 2012 +0200
Export gtk_entry_get_display_text() as a private function through
gtkentryprivate.h, so we can use it from gtkentryaccessible.c
https://bugzilla.gnome.org/show_bug.cgi?id=681591
gtk/gtkentry.c | 22 +++++++++++-----------
gtk/gtkentryprivate.h | 7 +++++--
2 files changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 335cb0f..6d9491e 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2750,10 +2750,10 @@ gtk_entry_get_display_mode (GtkEntry *entry)
return DISPLAY_INVISIBLE;
}
-static gchar*
-gtk_entry_get_display_text (GtkEntry *entry,
- gint start_pos,
- gint end_pos)
+gchar*
+_gtk_entry_get_display_text (GtkEntry *entry,
+ gint start_pos,
+ gint end_pos)
{
GtkEntryPasswordHint *password_hint;
GtkEntryPrivate *priv;
@@ -5170,8 +5170,8 @@ gtk_entry_backspace (GtkEntry *entry)
gchar *normalized_text;
glong len;
- cluster_text = gtk_entry_get_display_text (entry, prev_pos,
- priv->current_pos);
+ cluster_text = _gtk_entry_get_display_text (entry, prev_pos,
+ priv->current_pos);
normalized_text = g_utf8_normalize (cluster_text,
strlen (cluster_text),
G_NORMALIZE_NFD);
@@ -5222,7 +5222,7 @@ gtk_entry_copy_clipboard (GtkEntry *entry)
return;
}
- str = gtk_entry_get_display_text (entry, start, end);
+ str = _gtk_entry_get_display_text (entry, start, end);
gtk_clipboard_set_text (gtk_widget_get_clipboard (GTK_WIDGET (entry),
GDK_SELECTION_CLIPBOARD),
str, -1);
@@ -5380,7 +5380,7 @@ gtk_entry_retrieve_surrounding_cb (GtkIMContext *context,
gchar *text;
/* XXXX ??? does this even make sense when text is not visible? Should we return FALSE? */
- text = gtk_entry_get_display_text (entry, 0, -1);
+ text = _gtk_entry_get_display_text (entry, 0, -1);
gtk_im_context_set_surrounding (context, text, strlen (text), /* Length in bytes */
g_utf8_offset_to_pointer (text, priv->current_pos) - text);
g_free (text);
@@ -5598,7 +5598,7 @@ gtk_entry_create_layout (GtkEntry *entry,
pango_layout_set_single_paragraph_mode (layout, TRUE);
- display = placeholder_layout ? g_strdup (priv->placeholder_text) : gtk_entry_get_display_text (entry, 0, -1);
+ display = placeholder_layout ? g_strdup (priv->placeholder_text) : _gtk_entry_get_display_text (entry, 0, -1);
n_bytes = strlen (display);
if (!placeholder_layout && include_preedit)
@@ -6563,7 +6563,7 @@ primary_get_cb (GtkClipboard *clipboard,
if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start, &end))
{
- gchar *str = gtk_entry_get_display_text (entry, start, end);
+ gchar *str = _gtk_entry_get_display_text (entry, start, end);
gtk_selection_data_set_text (selection_data, str, -1);
g_free (str);
}
@@ -9102,7 +9102,7 @@ gtk_entry_drag_data_get (GtkWidget *widget,
if (gtk_editable_get_selection_bounds (editable, &sel_start, &sel_end))
{
- gchar *str = gtk_entry_get_display_text (GTK_ENTRY (widget), sel_start, sel_end);
+ gchar *str = _gtk_entry_get_display_text (GTK_ENTRY (widget), sel_start, sel_end);
gtk_selection_data_set_text (selection_data, str, -1);
diff --git a/gtk/gtkentryprivate.h b/gtk/gtkentryprivate.h
index b087839..aefada5 100644
--- a/gtk/gtkentryprivate.h
+++ b/gtk/gtkentryprivate.h
@@ -77,8 +77,11 @@ void _gtk_entry_completion_popup (GtkEntryCompletion *completion,
GdkDevice *device);
void _gtk_entry_completion_popdown (GtkEntryCompletion *completion);
-void _gtk_entry_get_borders (GtkEntry *entry,
- GtkBorder *borders);
+gchar* _gtk_entry_get_display_text (GtkEntry *entry,
+ gint start_pos,
+ gint end_pos);
+void _gtk_entry_get_border (GtkEntry *entry,
+ GtkBorder *borders);
void _gtk_entry_reset_im_context (GtkEntry *entry);
GtkIMContext* _gtk_entry_get_im_context (GtkEntry *entry);
void _gtk_entry_set_is_cell_renderer (GtkEntry *entry,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]