[gtk] text: Move some locals into the closest scope
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] text: Move some locals into the closest scope
- Date: Mon, 15 Jul 2019 04:56:47 +0000 (UTC)
commit c6e9372ba39e5581d4c934c94da7e2d0bc33a7fc
Author: Timm Bäder <mail baedert org>
Date: Mon Jul 15 05:17:46 2019 +0200
text: Move some locals into the closest scope
gtk/gtktext.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index d150dd21e4..e0938f5fa7 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -4323,7 +4323,6 @@ gtk_text_draw_text (GtkText *self,
GtkStyleContext *context;
PangoLayout *layout;
int x, y;
- int width, height;
/* Nothing to display at all */
if (gtk_text_get_display_mode (self) == DISPLAY_BLANK)
@@ -4331,8 +4330,6 @@ gtk_text_draw_text (GtkText *self,
context = gtk_widget_get_style_context (widget);
layout = gtk_text_ensure_layout (self, TRUE);
- width = gtk_widget_get_width (widget);
- height = gtk_widget_get_height (widget);
gtk_text_get_layout_offsets (self, &x, &y);
@@ -4346,6 +4343,10 @@ gtk_text_draw_text (GtkText *self,
cairo_region_t *clip;
cairo_rectangle_int_t clip_extents;
int range[2];
+ int width, height;
+
+ width = gtk_widget_get_width (widget);
+ height = gtk_widget_get_height (widget);
range[0] = MIN (start_index, end_index);
range[1] = MAX (start_index, end_index);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]