[network-manager-applet/NETWORKMANAGER_APPLET_0_7] editor: don't use deprecated GTK functions
- From: Dan Williams <dcbw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [network-manager-applet/NETWORKMANAGER_APPLET_0_7] editor: don't use deprecated GTK functions
- Date: Fri, 16 Oct 2009 04:52:01 +0000 (UTC)
commit d07510d0b1da758955e91a39b64a52d8c805fbb4
Author: Dan Williams <dcbw redhat com>
Date: Thu Oct 15 21:51:18 2009 -0700
editor: don't use deprecated GTK functions
src/connection-editor/ip4-routes-dialog.c | 7 ++++++-
src/connection-editor/page-ip4.c | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/connection-editor/ip4-routes-dialog.c b/src/connection-editor/ip4-routes-dialog.c
index af6001d..7f01882 100644
--- a/src/connection-editor/ip4-routes-dialog.c
+++ b/src/connection-editor/ip4-routes-dialog.c
@@ -209,11 +209,16 @@ route_add_clicked (GtkButton *button, gpointer user_data)
path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
column = gtk_tree_view_get_column (GTK_TREE_VIEW (widget), COL_ADDRESS);
+#if GTK_CHECK_VERSION(2,12,0)
+ cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
+#else
+ cells = gtk_tree_view_column_get_cell_renderers (column);
+#endif
+
/* FIXME: using cells->data is pretty fragile but GTK apparently doesn't
* have a way to get a cell renderer from a column based on path or iter
* or whatever.
*/
- cells = gtk_tree_view_column_get_cell_renderers (column);
gtk_tree_view_set_cursor_on_cell (GTK_TREE_VIEW (widget), path, column, cells->data, TRUE);
g_list_free (cells);
diff --git a/src/connection-editor/page-ip4.c b/src/connection-editor/page-ip4.c
index bc23a4a..592d8dd 100644
--- a/src/connection-editor/page-ip4.c
+++ b/src/connection-editor/page-ip4.c
@@ -414,11 +414,16 @@ addr_add_clicked (GtkButton *button, gpointer user_data)
path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
column = gtk_tree_view_get_column (priv->addr_list, COL_ADDRESS);
+#if GTK_CHECK_VERSION(2,12,0)
+ cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
+#else
+ cells = gtk_tree_view_column_get_cell_renderers (column);
+#endif
+
/* FIXME: using cells->data is pretty fragile but GTK apparently doesn't
* have a way to get a cell renderer from a column based on path or iter
* or whatever.
*/
- cells = gtk_tree_view_column_get_cell_renderers (column);
gtk_tree_view_set_cursor_on_cell (priv->addr_list, path, column, cells->data, TRUE);
g_list_free (cells);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]