Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
gtk
Commits
2358be73
Commit
2358be73
authored
Jun 25, 2011
by
Matthias Clasen
Browse files
Minor optimization
No need to get the cursor position twice in a row.
parent
262e5986
Changes
1
Hide whitespace changes
Inline
Side-by-side
gtk/a11y/gtkentryaccessible.c
View file @
2358be73
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment