summaryrefslogtreecommitdiff
path: root/gtk/proto_draw.c
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2008-04-07 03:46:01 +0000
committerStephen Fisher <steve@stephen-fisher.com>2008-04-07 03:46:01 +0000
commita398bebdaf691ceeaec536d8c657505d45906451 (patch)
treeefcad19ed10aefd15f38131bcd29eabcc6b08486 /gtk/proto_draw.c
parent0a381cca292a228b851e0300a4a428d9c5792a33 (diff)
downloadwireshark-a398bebdaf691ceeaec536d8c657505d45906451.tar.gz
Remove GTK1 code and change ugly version checking statements into
GTK_CHECK_VERSION(). svn path=/trunk/; revision=24826
Diffstat (limited to 'gtk/proto_draw.c')
-rw-r--r--gtk/proto_draw.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gtk/proto_draw.c b/gtk/proto_draw.c
index 72deb424b0..ab1830c810 100644
--- a/gtk/proto_draw.c
+++ b/gtk/proto_draw.c
@@ -889,7 +889,7 @@ savehex_save_clicked_cb(GtkWidget * w _U_, gpointer data _U_)
const guint8 *data_p = NULL;
const char *file = NULL;
-#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2
+#if GTK_CHECK_VERSION(2,4,0)
file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(savehex_dlg));
#else
file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(savehex_dlg));
@@ -993,7 +993,7 @@ void savehex_cb(GtkWidget * w _U_, gpointer data _U_)
SIGNAL_CONNECT(savehex_dlg, "destroy", savehex_dlg_destroy_cb, NULL);
-#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2
+#if GTK_CHECK_VERSION(2,4,0)
if (gtk_dialog_run(GTK_DIALOG(savehex_dlg)) == GTK_RESPONSE_ACCEPT) {
savehex_save_clicked_cb(savehex_dlg, savehex_dlg);
} else {
@@ -1739,11 +1739,7 @@ proto_tree_draw_node(proto_node *node, gpointer data)
proto_tree_children_foreach(node, proto_tree_draw_node, &info);
path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
if (is_expanded)
-/* #if GTK_MINOR_VERSION >= 2 */
gtk_tree_view_expand_to_path(info.tree_view, path);
-/*#else
- gtk_tree_view_expand_row(info.tree_view, path, FALSE);
-#endif*/
else
gtk_tree_view_collapse_row(info.tree_view, path);
gtk_tree_path_free(path);