diff options
author | Wolfgang Ulbrich <[email protected]> | 2015-11-29 19:38:47 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2015-12-01 20:24:36 +0100 |
commit | 95131f1b6b9eb6a8bfa7d5d39c12d6d29fea8f49 (patch) | |
tree | e655f2b09762a89a602b35de18ba4997542dd6ba | |
parent | e2624dc7ea05cb8a91f71c6ae13495cc51a24567 (diff) | |
download | mate-system-monitor-95131f1b6b9eb6a8bfa7d5d39c12d6d29fea8f49.tar.bz2 mate-system-monitor-95131f1b6b9eb6a8bfa7d5d39c12d6d29fea8f49.tar.xz |
GTK3: Drop use of deprecated treeview API. gtk_tree_view_set_rules_hint
taken from:
https://git.gnome.org/browse/gnome-system-monitor/commit/?id=7fefa84
-rw-r--r-- | src/disks.cpp | 2 | ||||
-rw-r--r-- | src/lsof.cpp | 3 | ||||
-rw-r--r-- | src/memmaps.cpp | 2 | ||||
-rw-r--r-- | src/openfiles.cpp | 2 | ||||
-rw-r--r-- | src/procproperties.cpp | 2 | ||||
-rw-r--r-- | src/proctable.cpp | 2 |
6 files changed, 12 insertions, 1 deletions
diff --git a/src/disks.cpp b/src/disks.cpp index a0159ba..a28983a 100644 --- a/src/disks.cpp +++ b/src/disks.cpp @@ -334,7 +334,9 @@ create_disk_view(ProcData *procdata) g_signal_connect(G_OBJECT(disk_tree), "row-activated", G_CALLBACK(open_dir), NULL); procdata->disk_list = disk_tree; gtk_container_add(GTK_CONTAINER(scrolled), disk_tree); +#if !GTK_CHECK_VERSION(3,0,0) gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(disk_tree), TRUE); +#endif g_object_unref(G_OBJECT(model)); /* icon + device */ diff --git a/src/lsof.cpp b/src/lsof.cpp index aaf2fbd..6854de2 100644 --- a/src/lsof.cpp +++ b/src/lsof.cpp @@ -248,8 +248,9 @@ void procman_lsof(ProcData *procdata) GtkWidget *tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); g_object_unref(model); +#if !GTK_CHECK_VERSION(3,0,0) gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tree), TRUE); - +#endif GtkTreeViewColumn *column; GtkCellRenderer *renderer; diff --git a/src/memmaps.cpp b/src/memmaps.cpp index 2c8909d..eb52ad9 100644 --- a/src/memmaps.cpp +++ b/src/memmaps.cpp @@ -344,7 +344,9 @@ create_memmapsdata (ProcData *procdata) ); tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); +#if !GTK_CHECK_VERSION(3,0,0) gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (tree), TRUE); +#endif g_object_unref (G_OBJECT (model)); for (i = 0; i < MMAP_COL_MAX; i++) { diff --git a/src/openfiles.cpp b/src/openfiles.cpp index 2c3020c..891ff2f 100644 --- a/src/openfiles.cpp +++ b/src/openfiles.cpp @@ -260,7 +260,9 @@ create_openfiles_tree (ProcData *procdata) ); tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); +#if !GTK_CHECK_VERSION(3,0,0) gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (tree), TRUE); +#endif g_object_unref (G_OBJECT (model)); for (i = 0; i < NUM_OPENFILES_COL-1; i++) { diff --git a/src/procproperties.cpp b/src/procproperties.cpp index 2e6cda9..200e6f5 100644 --- a/src/procproperties.cpp +++ b/src/procproperties.cpp @@ -185,7 +185,9 @@ create_procproperties_tree (ProcData *procdata) ); tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); +#if !GTK_CHECK_VERSION(3,0,0) gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (tree), TRUE); +#endif g_object_unref (G_OBJECT (model)); for (i = 0; i < NUM_COLS; i++) { diff --git a/src/proctable.cpp b/src/proctable.cpp index fb7a9ce..97a51a2 100644 --- a/src/proctable.cpp +++ b/src/proctable.cpp @@ -334,7 +334,9 @@ proctable_new (ProcData * const procdata) search_equal_func, NULL, NULL); +#if !GTK_CHECK_VERSION(3,0,0) gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (proctree), TRUE); +#endif g_object_unref (G_OBJECT (model)); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (proctree)); |