broken pipe

This commit is contained in:
Kristian Rietveld 2006-05-27 16:20:20 +00:00
parent 6a95210028
commit 4f88a172cb
2 changed files with 39 additions and 19 deletions

View File

@ -2337,7 +2337,8 @@ gtk_tree_view_button_press (GtkWidget *widget,
cell_area.y += vertical_separator/2;
if (gtk_tree_view_is_expander_column (tree_view, column))
{
cell_area.x += (depth - 1) * tree_view->priv->level_indentation;
if (!rtl)
cell_area.x += (depth - 1) * tree_view->priv->level_indentation;
cell_area.width -= (depth - 1) * tree_view->priv->level_indentation;
if (TREE_VIEW_DRAW_EXPANDERS (tree_view))
@ -3835,7 +3836,8 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
if (gtk_tree_view_is_expander_column (tree_view, column))
{
cell_area.x += (depth - 1) * tree_view->priv->level_indentation;
if (!rtl)
cell_area.x += (depth - 1) * tree_view->priv->level_indentation;
cell_area.width -= (depth - 1) * tree_view->priv->level_indentation;
if (TREE_VIEW_DRAW_EXPANDERS(tree_view))
@ -11822,13 +11824,18 @@ gtk_tree_view_get_cell_area (GtkTreeView *tree_view,
gtk_tree_view_is_expander_column (tree_view, column))
{
gint depth = gtk_tree_path_get_depth (path);
gboolean rtl;
rect->x += (depth - 1) * tree_view->priv->level_indentation;
rtl = gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL;
if (!rtl)
rect->x += (depth - 1) * tree_view->priv->level_indentation;
rect->width -= (depth - 1) * tree_view->priv->level_indentation;
if (TREE_VIEW_DRAW_EXPANDERS (tree_view))
{
rect->x += depth * tree_view->priv->expander_size;
if (!rtl)
rect->x += depth * tree_view->priv->expander_size;
rect->width -= depth * tree_view->priv->expander_size;
}
@ -12430,6 +12437,7 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
GdkDrawable *drawable;
gint bin_window_width;
gboolean is_separator = FALSE;
gboolean rtl;
g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), NULL);
g_return_val_if_fail (path != NULL, NULL);
@ -12486,7 +12494,11 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
bin_window_width + 2,
background_area.height + 2);
for (list = tree_view->priv->columns; list; list = list->next)
rtl = gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL;
for (list = (rtl ? g_list_last (tree_view->priv->columns) : g_list_first (tree_view->priv->columns));
list;
list = (rtl ? list->prev : list->next))
{
GtkTreeViewColumn *column = list->data;
GdkRectangle cell_area;
@ -12502,20 +12514,25 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
background_area.x = cell_offset;
background_area.width = column->width;
gtk_widget_style_get (widget,
"vertical-separator", &vertical_separator,
NULL);
cell_area = background_area;
gtk_widget_style_get (widget, "vertical-separator", &vertical_separator, NULL);
cell_area.y += vertical_separator / 2;
cell_area.height -= vertical_separator;
if (gtk_tree_view_is_expander_column (tree_view, column))
{
cell_area.x += (depth - 1) * tree_view->priv->level_indentation;
if (!rtl)
cell_area.x += (depth - 1) * tree_view->priv->level_indentation;
cell_area.width -= (depth - 1) * tree_view->priv->level_indentation;
if (TREE_VIEW_DRAW_EXPANDERS(tree_view))
{
cell_area.x += depth * tree_view->priv->expander_size;
if (!rtl)
cell_area.x += depth * tree_view->priv->expander_size;
cell_area.width -= depth * tree_view->priv->expander_size;
}
}
@ -13462,6 +13479,7 @@ gtk_tree_view_start_editing (GtkTreeView *tree_view,
area = cell_area;
cell = _gtk_tree_view_column_get_edited_cell (tree_view->priv->focus_column);
_gtk_tree_view_column_get_neighbor_sizes (tree_view->priv->focus_column, cell, &left, &right);
area.x += left;

View File

@ -2722,7 +2722,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
if (list->next)
{
real_background_area.width = info->real_width + horizontal_separator + depth ;
real_background_area.width = info->real_width + depth;
}
else
{
@ -2750,7 +2750,6 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
&real_expose_area,
flags);
}
/* FOCUS */
else if (action == CELL_ACTION_FOCUS)
{
@ -2859,11 +2858,11 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
flags &= ~GTK_CELL_RENDERER_FOCUSED;
real_cell_area.x += (real_cell_area.width + tree_column->spacing);
real_background_area.x += (real_background_area.width + tree_column->spacing - (2 * focus_line_width ));
real_cell_area.x += (real_cell_area.width + 2 * focus_line_width + tree_column->spacing);
real_background_area.x += real_background_area.width + tree_column->spacing;
/* Only needed for first cell */
depth=0;
depth = 0;
}
/* iterate list for PACK_END cells */
@ -2895,7 +2894,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
real_cell_area.width = info->real_width;
real_cell_area.width -= 2 * focus_line_width;
real_background_area.width = info->real_width + horizontal_separator + depth;
real_background_area.width = info->real_width + depth;
rtl_cell_area = real_cell_area;
rtl_background_area = real_background_area;
@ -2963,8 +2962,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
cell_area->x + cell_area->width > ((GdkEventButton *)event)->x)
try_event = TRUE;
}
else if (real_cell_area.x <= ((GdkEventButton *)event)->x &&
real_cell_area.x + real_cell_area.width > ((GdkEventButton *)event)->x)
else if (rtl_cell_area.x <= ((GdkEventButton *)event)->x &&
rtl_cell_area.x + rtl_cell_area.width > ((GdkEventButton *)event)->x)
/* only activate cell if the user clicked on an individual
* cell
*/
@ -3023,8 +3022,11 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
flags &= ~GTK_CELL_RENDERER_FOCUSED;
real_cell_area.x += (real_cell_area.width + tree_column->spacing);
real_cell_area.x += (real_cell_area.width + 2 * focus_line_width + tree_column->spacing);
real_background_area.x += (real_background_area.width + tree_column->spacing);
/* Only needed for first cell */
depth = 0;
}
/* fill focus_rectangle when required */
@ -3531,7 +3533,7 @@ _gtk_tree_view_column_get_neighbor_sizes (GtkTreeViewColumn *column,
break;
if (info->cell->visible)
l += info->real_width;
l += info->real_width + column->spacing;
}
while (list)
@ -3541,7 +3543,7 @@ _gtk_tree_view_column_get_neighbor_sizes (GtkTreeViewColumn *column,
list = gtk_tree_view_column_cell_next (column, list);
if (info->cell->visible)
r += info->real_width;
r += info->real_width + column->spacing;
}
rtl = (gtk_widget_get_direction (GTK_WIDGET (column->tree_view)) == GTK_TEXT_DIR_RTL);