forked from AuroraMiddleware/gtk
Remove the need for _gtk_tree_view_column_get_focus_area
This commit is contained in:
parent
64ddd3f40f
commit
6c73647727
@ -134,10 +134,6 @@ void _gtk_tree_view_column_cell_render (GtkTreeViewColumn *tree_column,
|
|||||||
const GdkRectangle *cell_area,
|
const GdkRectangle *cell_area,
|
||||||
guint flags,
|
guint flags,
|
||||||
gboolean draw_focus);
|
gboolean draw_focus);
|
||||||
void _gtk_tree_view_column_get_focus_area (GtkTreeViewColumn *tree_column,
|
|
||||||
const GdkRectangle *background_area,
|
|
||||||
const GdkRectangle *cell_area,
|
|
||||||
GdkRectangle *focus_area);
|
|
||||||
void _gtk_tree_view_column_cell_set_dirty (GtkTreeViewColumn *tree_column,
|
void _gtk_tree_view_column_cell_set_dirty (GtkTreeViewColumn *tree_column,
|
||||||
gboolean install_handler);
|
gboolean install_handler);
|
||||||
gboolean _gtk_tree_view_column_cell_get_dirty (GtkTreeViewColumn *tree_column);
|
gboolean _gtk_tree_view_column_cell_get_dirty (GtkTreeViewColumn *tree_column);
|
||||||
|
@ -9367,42 +9367,31 @@ gtk_tree_view_clamp_column_visible (GtkTreeView *tree_view,
|
|||||||
* focus cell is bigger than the page size, we make sure the
|
* focus cell is bigger than the page size, we make sure the
|
||||||
* left-hand side of the cell is visible).
|
* left-hand side of the cell is visible).
|
||||||
*
|
*
|
||||||
* If the column does not have those so-called special cells, we
|
* If the column does not have an activatable cell, we
|
||||||
* make sure the left-hand side of the column is visible.
|
* make sure the left-hand side of the column is visible.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (focus_to_cell && gtk_tree_view_has_can_focus_cell (tree_view))
|
if (focus_to_cell && gtk_tree_view_has_can_focus_cell (tree_view))
|
||||||
{
|
{
|
||||||
GtkTreePath *cursor_path;
|
GtkCellArea *cell_area;
|
||||||
GdkRectangle background_area, cell_area, focus_area;
|
GtkCellRenderer *focus_cell;
|
||||||
|
|
||||||
cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor);
|
cell_area = gtk_cell_layout_get_area (GTK_CELL_LAYOUT (column));
|
||||||
|
focus_cell = gtk_cell_area_get_focus_cell (cell_area);
|
||||||
|
|
||||||
gtk_tree_view_get_cell_area (tree_view,
|
if (gtk_tree_view_column_cell_get_position (column, focus_cell,
|
||||||
cursor_path, column, &cell_area);
|
&x, &width))
|
||||||
gtk_tree_view_get_background_area (tree_view,
|
{
|
||||||
cursor_path, column,
|
if (width < tree_view->priv->hadjustment->page_size)
|
||||||
&background_area);
|
{
|
||||||
|
if (tree_view->priv->hadjustment->value + tree_view->priv->hadjustment->page_size < x + width)
|
||||||
gtk_tree_path_free (cursor_path);
|
gtk_adjustment_set_value (tree_view->priv->hadjustment,
|
||||||
|
x + width - tree_view->priv->hadjustment->page_size);
|
||||||
_gtk_tree_view_column_get_focus_area (column,
|
else if (tree_view->priv->hadjustment->value > x)
|
||||||
&background_area,
|
gtk_adjustment_set_value (tree_view->priv->hadjustment, x);
|
||||||
&cell_area,
|
}
|
||||||
&focus_area);
|
}
|
||||||
|
}
|
||||||
x = focus_area.x;
|
|
||||||
width = focus_area.width;
|
|
||||||
|
|
||||||
if (width < tree_view->priv->hadjustment->page_size)
|
|
||||||
{
|
|
||||||
if ((tree_view->priv->hadjustment->value + tree_view->priv->hadjustment->page_size) < (x + width))
|
|
||||||
gtk_adjustment_set_value (tree_view->priv->hadjustment,
|
|
||||||
x + width - tree_view->priv->hadjustment->page_size);
|
|
||||||
else if (tree_view->priv->hadjustment->value > x)
|
|
||||||
gtk_adjustment_set_value (tree_view->priv->hadjustment, x);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_adjustment_set_value (tree_view->priv->hadjustment, x);
|
gtk_adjustment_set_value (tree_view->priv->hadjustment, x);
|
||||||
}
|
}
|
||||||
|
@ -2811,26 +2811,6 @@ _gtk_tree_view_column_cell_event (GtkTreeViewColumn *tree_column,
|
|||||||
flags);
|
flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_gtk_tree_view_column_get_focus_area (GtkTreeViewColumn *tree_column,
|
|
||||||
const GdkRectangle *background_area,
|
|
||||||
const GdkRectangle *cell_area,
|
|
||||||
GdkRectangle *focus_area)
|
|
||||||
{
|
|
||||||
/* FIXME */
|
|
||||||
#if 0
|
|
||||||
gtk_tree_view_column_cell_process_action (tree_column,
|
|
||||||
NULL,
|
|
||||||
background_area,
|
|
||||||
cell_area,
|
|
||||||
0,
|
|
||||||
CELL_ACTION_FOCUS,
|
|
||||||
focus_area,
|
|
||||||
NULL, NULL, NULL);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_tree_view_column_cell_is_visible:
|
* gtk_tree_view_column_cell_is_visible:
|
||||||
* @tree_column: A #GtkTreeViewColumn
|
* @tree_column: A #GtkTreeViewColumn
|
||||||
|
Loading…
Reference in New Issue
Block a user