[gnome-panel/gtk3] Don't access GtkTreeViewColumn->editable_widget directly



commit 71e451ec577394aadfe8863703b215888829fd0e
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Wed Jan 5 18:28:46 2011 -0800

    Don't access GtkTreeViewColumn->editable_widget directly
    
    This member has been sealed. Use gtk_cell_area_get_edit_widget() instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=627455
    
    Signed-off-by: Germán Póo-Caamaño <gpoo gnome org>

 applets/wncklet/workspace-switcher.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c
index 5c791c8..543d1c1 100644
--- a/applets/wncklet/workspace-switcher.c
+++ b/applets/wncklet/workspace-switcher.c
@@ -812,6 +812,9 @@ close_dialog (GtkWidget *button,
 {
 	PagerData *pager = data;
 	GtkTreeViewColumn *col;
+	GtkCellArea *area;
+	GtkCellEditable *edit_widget;
+
 
 	/* This is a hack. The "editable" signal for GtkCellRenderer is emitted
 	only on button press or focus cycle. Hence when the user changes the
@@ -820,9 +823,12 @@ close_dialog (GtkWidget *button,
 	to stop the editing. Thanks to Paolo for a better crack than the one I had.
 	*/
 
-	col = gtk_tree_view_get_column(GTK_TREE_VIEW (pager->workspaces_tree),0);
-	if (col->GSEAL (editable_widget) != NULL && GTK_IS_CELL_EDITABLE (col->GSEAL (editable_widget)))
-	    gtk_cell_editable_editing_done(col->GSEAL (editable_widget));
+	col = gtk_tree_view_get_column (GTK_TREE_VIEW (pager->workspaces_tree), 0);
+	area = gtk_cell_layout_get_area (GTK_CELL_LAYOUT (col));
+	edit_widget = gtk_cell_area_get_edit_widget (area);
+
+	if (edit_widget)
+		gtk_cell_editable_editing_done (edit_widget);
 
 	gtk_widget_destroy (pager->properties_dialog);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]