Skip to content

Commit 137b387

Browse files
committed
Add patch for Gtk3.
For M308-037.
1 parent 48b4cbf commit 137b387

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

contrib/gtk+-3.4.1.diff

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2013-03-18 Vadim Godunko <godunko@adacome.com>
2+
3+
* gtk/gtktreeview.c (gtk_tree_view_draw_grid_lines): Take in sense
4+
current direction when drawing vertical lines of the grid.
5+
16
2012-04-20 Nicolas Setton <setton@adacore.com>
27

38
(gtk/gtkcellarea.c): Fix build error.
@@ -107,3 +112,59 @@
107112
/**
108113
* GtkCellArea::add-editable:
109114
* @area: the #GtkCellArea where editing started
115+
--- gtk/gtktreeview.c.old 2013-01-07 14:50:05.000000000 +0400
116+
+++ gtk/gtktreeview.c 2013-03-18 15:29:59.425991349 +0400
117+
@@ -4646,31 +4646,31 @@
118+
119+
static void
120+
gtk_tree_view_draw_grid_lines (GtkTreeView *tree_view,
121+
- cairo_t *cr,
122+
- gint n_visible_columns)
123+
+ cairo_t *cr)
124+
{
125+
- GList *list = tree_view->priv->columns;
126+
- gint i = 0;
127+
+ GList *list;
128+
+ GtkTreeViewColumn *last;
129+
+ gboolean rtl;
130+
gint current_x = 0;
131+
132+
if (tree_view->priv->grid_lines != GTK_TREE_VIEW_GRID_LINES_VERTICAL
133+
&& tree_view->priv->grid_lines != GTK_TREE_VIEW_GRID_LINES_BOTH)
134+
return;
135+
136+
- /* Only draw the lines for visible rows and columns */
137+
- for (list = tree_view->priv->columns; list; list = list->next, i++)
138+
+ rtl = (gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL);
139+
+
140+
+ for (list = (rtl ? g_list_last (tree_view->priv->columns) : g_list_first (tree_view->priv->columns)),
141+
+ last = (rtl ? g_list_first (tree_view->priv->columns) : g_list_last (tree_view->priv->columns))->data;
142+
+ list;
143+
+ list = (rtl ? list->prev : list->next))
144+
{
145+
GtkTreeViewColumn *column = list->data;
146+
147+
- /* We don't want a line for the last column */
148+
- if (i == n_visible_columns - 1)
149+
- break;
150+
-
151+
- if (!gtk_tree_view_column_get_visible (column))
152+
- continue;
153+
-
154+
current_x += gtk_tree_view_column_get_width (column);
155+
156+
+ /* We don't want a line for the last column */
157+
+ if (column == last) break;
158+
+
159+
gtk_tree_view_draw_line (tree_view, cr,
160+
GTK_TREE_VIEW_GRID_LINE,
161+
current_x - 1, 0,
162+
@@ -5327,7 +5327,7 @@
163+
while (y_offset < clip.height);
164+
165+
done:
166+
- gtk_tree_view_draw_grid_lines (tree_view, cr, n_visible_columns);
167+
+ gtk_tree_view_draw_grid_lines (tree_view, cr);
168+
169+
if (tree_view->priv->rubber_band_status == RUBBER_BAND_ACTIVE)
170+
gtk_tree_view_paint_rubber_band (tree_view, cr);

0 commit comments

Comments
 (0)