gtk2/dont-use-deprecated-api.patch

151 lines
6.6 KiB
Diff
Raw Normal View History

2009-06-16 15:30:56 +00:00
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
2009-06-16 16:26:11 +00:00
index 555418a..2a84a48 100644
2009-06-16 15:30:56 +00:00
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1695,7 +1695,7 @@ cell_view_is_sensitive (GtkCellView *cell_view)
GList *cells, *list;
gboolean sensitive;
- cells = gtk_cell_view_get_cell_renderers (cell_view);
+ cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (cell_view));
sensitive = FALSE;
for (list = cells; list; list = list->next)
2009-06-16 16:26:11 +00:00
@@ -1732,7 +1732,7 @@ tree_column_row_is_sensitive (GtkComboBox *combo_box,
priv->model,
iter, FALSE, FALSE);
- cells = gtk_tree_view_column_get_cell_renderers (priv->column);
+ cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (priv->column));
sensitive = FALSE;
for (list = cells; list; list = list->next)
@@ -4097,7 +4097,7 @@ gtk_combo_box_list_select_func (GtkTreeSelection *selection,
gtk_tree_view_column_cell_set_cell_data (column, model, &iter,
FALSE, FALSE);
- cell = cells = gtk_tree_view_column_get_cell_renderers (column);
+ cell = cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
while (cell)
{
g_object_get (cell->data,
2009-06-16 15:30:56 +00:00
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
2009-06-16 16:26:11 +00:00
index e2e0142..a3a01be 100644
2009-06-16 15:30:56 +00:00
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -758,7 +758,7 @@ gtk_entry_completion_get_cells (GtkCellLayout *cell_layout)
priv = GTK_ENTRY_COMPLETION_GET_PRIVATE (cell_layout);
- return gtk_tree_view_column_get_cell_renderers (priv->column);
+ return gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (priv->column));
}
/* all those callbacks */
2009-06-16 16:26:11 +00:00
@@ -1486,7 +1486,7 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
completion->priv->ignore_enter = TRUE;
column = gtk_tree_view_get_column (GTK_TREE_VIEW (completion->priv->action_view), 0);
- renderers = gtk_tree_view_column_get_cell_renderers (column);
+ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
gtk_widget_ensure_style (completion->priv->tree_view);
g_object_set (GTK_CELL_RENDERER (renderers->data), "cell-background-gdk",
&completion->priv->tree_view->style->bg[GTK_STATE_NORMAL],
2009-06-16 15:30:56 +00:00
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 22836c1..7dc9867 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -3707,7 +3707,7 @@ rename_selected_bookmark (GtkFileChooserDefault *impl)
{
path = gtk_tree_model_get_path (GTK_TREE_MODEL (impl->shortcuts_model), &iter);
column = gtk_tree_view_get_column (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), 0);
- renderers = gtk_tree_view_column_get_cell_renderers (column);
+ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
cell = g_list_nth_data (renderers, 1);
g_list_free (renderers);
g_object_set (cell, "editable", TRUE, NULL);
2009-06-16 16:44:53 +00:00
diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
index 3dbf40d..224660d 100644
--- a/gtk/tests/builder.c
+++ b/gtk/tests/builder.c
@@ -1147,7 +1147,7 @@ test_treeview_column (void)
g_assert (GTK_IS_TREE_VIEW_COLUMN (column));
g_assert (strcmp (gtk_tree_view_column_get_title (column), "Test") == 0);
- renderers = gtk_tree_view_column_get_cell_renderers (column);
+ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
g_assert (g_list_length (renderers) == 1);
renderer = g_list_nth_data (renderers, 0);
g_assert (renderer);
@@ -1423,7 +1423,7 @@ test_cell_view (void)
path = gtk_tree_path_new_first ();
gtk_cell_view_set_displayed_row (GTK_CELL_VIEW (cellview), path);
- renderers = gtk_cell_view_get_cell_renderers (GTK_CELL_VIEW (cellview));
+ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (cellview));
g_assert (renderers);
g_assert (g_list_length (renderers) == 1);
diff --git a/gtk/tests/treeview-scrolling.c b/gtk/tests/treeview-scrolling.c
index 5ee24c1..0207dbc 100644
--- a/gtk/tests/treeview-scrolling.c
+++ b/gtk/tests/treeview-scrolling.c
@@ -728,7 +728,7 @@ scroll_new_row (ScrollFixture *fixture,
/* Set up a signal handler to acquire the editable widget */
column = gtk_tree_view_get_column (GTK_TREE_VIEW (fixture->tree_view), 0);
- renderers = gtk_tree_view_column_get_cell_renderers (column);
+ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
g_signal_connect (G_OBJECT (renderers->data), "editing-started",
G_CALLBACK (scroll_new_row_editing_started),
2009-06-16 15:51:09 +00:00
diff --git a/modules/other/gail/gailtreeview.c b/modules/other/gail/gailtreeview.c
2009-06-16 16:44:53 +00:00
index d615a45..d305ae0 100644
2009-06-16 15:51:09 +00:00
--- a/modules/other/gail/gailtreeview.c
+++ b/modules/other/gail/gailtreeview.c
@@ -867,7 +867,7 @@ gail_tree_view_ref_child (AtkObject *obj,
gtk_tree_view_column_cell_set_cell_data (tv_col, tree_model, &iter,
is_expander, is_expanded);
- renderer_list = gtk_tree_view_column_get_cell_renderers (tv_col);
+ renderer_list = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (tv_col));
/* If there are more than one renderer in the list, make a container */
2009-06-16 16:44:53 +00:00
@@ -2127,7 +2127,7 @@ gail_tree_view_get_cell_area (GailCellParent *parent,
GtkCellRenderer *renderer;
cell_index = atk_object_get_index_in_parent (ATK_OBJECT (cell));
- renderers = gtk_tree_view_column_get_cell_renderers (tv_col);
2009-06-16 18:32:50 +00:00
+ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (tv_col));
2009-06-16 16:44:53 +00:00
renderer = g_list_nth_data (renderers, cell_index);
found = gtk_tree_view_column_cell_get_position (tv_col, renderer, &cell_start, &cell_width);
@@ -2180,7 +2180,7 @@ gail_tree_view_grab_cell_focus (GailCellParent *parent,
*/
GList *renderers;
- renderers = gtk_tree_view_column_get_cell_renderers (tv_col);
+ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (tv_col));
if (cell_info->in_use) {
index = atk_object_get_index_in_parent (cell_object);
renderer = g_list_nth_data (renderers, index);
@@ -3177,7 +3177,7 @@ update_cell_value (GailRendererCell *renderer_cell,
gtk_tree_view_column_cell_set_cell_data (cell_info->cell_col_ref,
tree_model, &iter, is_expander, is_expanded);
}
- renderers = gtk_tree_view_column_get_cell_renderers (cell_info->cell_col_ref);
2009-06-16 18:54:40 +00:00
+ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (cell_info->cell_col_ref));
2009-06-16 16:44:53 +00:00
gail_return_val_if_fail (renderers, FALSE);
/*
@@ -4001,7 +4001,7 @@ toggle_cell_toggled (GailCell *cell)
gail_return_if_fail (path);
pathstring = gtk_tree_path_to_string (path);
- renderers = gtk_tree_view_column_get_cell_renderers (cell_info->cell_col_ref);
+ renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (cell_info->cell_col_ref));
gail_return_if_fail (renderers);
/*