[gnome-applets] mini-commander: Access the editable widget via gtk_cell_area_get_edit_widget
- From: Christopher Aillon <caillon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] mini-commander: Access the editable widget via gtk_cell_area_get_edit_widget
- Date: Sun, 1 May 2011 22:10:00 +0000 (UTC)
commit beae0dcaf5bb05794473027d1f86dfcde4b98009
Author: Christopher Aillon <caillon redhat com>
Date: Fri Mar 25 17:18:01 2011 -0700
mini-commander: Access the editable widget via gtk_cell_area_get_edit_widget
GtkTreeViewColumn->editable_widget was sealed in GTK+ 3
https://bugzilla.gnome.org/show_bug.cgi?id=646473
mini-commander/src/preferences.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/mini-commander/src/preferences.c b/mini-commander/src/preferences.c
index 3e5920b..138b473 100644
--- a/mini-commander/src/preferences.c
+++ b/mini-commander/src/preferences.c
@@ -640,6 +640,8 @@ preferences_response (MCPrefsDialog *dialog,
case GTK_RESPONSE_CLOSE:
default: {
GtkTreeViewColumn *col;
+ GtkCellArea *area;
+ GtkCellEditable *edit_widget;
dialog = &mc->prefs_dialog;
@@ -647,12 +649,16 @@ preferences_response (MCPrefsDialog *dialog,
* close the dialog while editing.
*/
col = gtk_tree_view_get_column (GTK_TREE_VIEW (dialog->macros_tree), 0);
- if (col->editable_widget && GTK_IS_CELL_EDITABLE (col->editable_widget))
- gtk_cell_editable_editing_done (col->editable_widget);
+ 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);
col = gtk_tree_view_get_column (GTK_TREE_VIEW (dialog->macros_tree), 1);
- if (col->editable_widget && GTK_IS_CELL_EDITABLE (col->editable_widget))
- gtk_cell_editable_editing_done (col->editable_widget);
+ 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_hide (dialog->dialog);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]