diff options
-rw-r--r-- | gtk/new_packet_list.c | 7 | ||||
-rw-r--r-- | gtk/old-gtk-compat.h | 1 | ||||
-rw-r--r-- | gtk/profile_dlg.c | 4 | ||||
-rw-r--r-- | gtk/uat_gui.c | 2 |
4 files changed, 6 insertions, 8 deletions
diff --git a/gtk/new_packet_list.c b/gtk/new_packet_list.c index 9fe7d55258..7738dc06cd 100644 --- a/gtk/new_packet_list.c +++ b/gtk/new_packet_list.c @@ -830,12 +830,9 @@ create_view_and_model(void) gtk_tree_view_append_column(GTK_TREE_VIEW(packetlist->view), col); - /* XXX Breaks the GTK+ API, but this is the only way to attach a signal to - * a GtkTreeView column header. See GTK bug #141937. - */ - gtk_widget_set_tooltip_text(col->button, tooltip_text); + gtk_widget_set_tooltip_text(gtk_tree_view_column_get_button(col), tooltip_text); g_free(tooltip_text); - g_signal_connect(col->button, "button_press_event", + g_signal_connect(gtk_tree_view_column_get_button(col), "button_press_event", G_CALLBACK(new_packet_list_column_button_pressed_cb), col); if (i == 0) { /* Default sort on first column */ diff --git a/gtk/old-gtk-compat.h b/gtk/old-gtk-compat.h index 00293b098e..434ad35e1c 100644 --- a/gtk/old-gtk-compat.h +++ b/gtk/old-gtk-compat.h @@ -78,6 +78,7 @@ # define gtk_widget_get_style_context(x) gtk_widget_get_style(x) # define gtk_style_context_get_color(x,y,z) gdkcolor_to_color_t(&z, &x->text[y]) # define gtk_style_context_get_color_background(x,y,z) gdkcolor_to_color_t(&z, &x->base[y]) +# define gtk_tree_view_column_get_button(x) x->button #endif #endif diff --git a/gtk/profile_dlg.c b/gtk/profile_dlg.c index 29f1a0b8e9..16d719f5d4 100644 --- a/gtk/profile_dlg.c +++ b/gtk/profile_dlg.c @@ -49,7 +49,7 @@ #include "gtk/gtkglobals.h" #include "gtk/help_dlg.h" #include "gtk/recent.h" - +#include "gtk/old-gtk-compat.h" enum { NAME_COLUMN, GLOBAL_COLUMN, @@ -862,7 +862,7 @@ profile_dialog_new(void) renderer = gtk_cell_renderer_toggle_new(); column = gtk_tree_view_column_new_with_attributes("Global", renderer, "active", GLOBAL_COLUMN, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(profile_l), column); - gtk_widget_set_tooltip_text(column->button, "Global profiles will be copied to users profiles when used"); + gtk_widget_set_tooltip_text(gtk_tree_view_column_get_button(column), "Global profiles will be copied to users profiles when used"); gtk_tree_view_column_set_visible(column, has_global); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(profile_l)); diff --git a/gtk/uat_gui.c b/gtk/uat_gui.c index 0fd6f1cb3a..dc6ee7b53e 100644 --- a/gtk/uat_gui.c +++ b/gtk/uat_gui.c @@ -914,7 +914,7 @@ static GtkWidget* uat_window(void* u) { gtk_tree_view_column_set_sizing(column,GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column (rep->list, column); if (f[colnum].desc != NULL) - gtk_widget_set_tooltip_text(column->button, f[colnum].desc); + gtk_widget_set_tooltip_text(gtk_tree_view_column_get_button(column), f[colnum].desc); /* gtk_clist_set_column_title(GTK_CLIST(rep->clist), colnum, f[colnum].title); |