[gtk+/quartz-integration: 431/563] Minor optimization
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/quartz-integration: 431/563] Minor optimization
- Date: Sat, 9 Jul 2011 06:42:15 +0000 (UTC)
commit c7a4239a469a3d87888196d3721cf61695b1c508
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jun 25 22:44:07 2011 -0400
Minor optimization
No need to get the cursor position twice in a row.
gtk/a11y/gtkentryaccessible.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/a11y/gtkentryaccessible.c b/gtk/a11y/gtkentryaccessible.c
index 2da1a65..86abf23 100644
--- a/gtk/a11y/gtkentryaccessible.c
+++ b/gtk/a11y/gtkentryaccessible.c
@@ -598,7 +598,7 @@ gtk_entry_accessible_remove_selection (AtkText *text,
gint selection_num)
{
GtkWidget *widget;
- gint start, end, caret_pos;
+ gint start, end;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
@@ -609,8 +609,7 @@ gtk_entry_accessible_remove_selection (AtkText *text,
if (gtk_editable_get_selection_bounds (GTK_EDITABLE (widget), &start, &end))
{
- caret_pos = gtk_editable_get_position (GTK_EDITABLE (widget));
- gtk_editable_select_region (GTK_EDITABLE (widget), caret_pos, caret_pos);
+ gtk_editable_select_region (GTK_EDITABLE (widget), end, end);
return TRUE;
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]