Back out parts of 38112, as pointed out by Stig Bj\370rlykke:
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 19 Jul 2011 17:40:23 +0000 (17:40 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 19 Jul 2011 17:40:23 +0000 (17:40 +0000)
The changes in profile_dlg.c, uat_gui.c and new_packet_list.c does not
work.  The tooltip is not displayed, and it's not possible to get the
context menu from a column header in the packet list.
...
I guess gtk_tree_view_column_get_widget() does not return
column->button, which is the widget we use.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38117 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/new_packet_list.c
gtk/profile_dlg.c
gtk/uat_gui.c

index e04ed820c87acc090e12ca35dbe302c806b0bcc2..45c1b21a9c2350a8930a439e4b3b7e660f4606c0 100644 (file)
@@ -831,9 +831,9 @@ create_view_and_model(void)
                /* 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(gtk_tree_view_column_get_widget(col), tooltip_text);
+               gtk_widget_set_tooltip_text(col->button, tooltip_text);
                g_free(tooltip_text);
-               g_signal_connect(gtk_tree_view_column_get_widget(col), "button_press_event",
+               g_signal_connect(col->button, "button_press_event",
                                 G_CALLBACK(new_packet_list_column_button_pressed_cb), col);
 
                if (i == 0) {  /* Default sort on first column */
index 32b318d45d9d32529c4ac7b905ee8178943dc2cd..29f1a0b8e9df083e9b59961fd5c3ecae62e2c90b 100644 (file)
@@ -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(gtk_tree_view_column_get_widget(column), "Global profiles will be copied to users profiles when used");
+  gtk_widget_set_tooltip_text(column->button, "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));
index 484495a449bae4c89cbc21faefc67aa5cfc8c314..e6a36aa37274c494ca340345435a454dc828c101 100644 (file)
@@ -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(gtk_tree_view_column_get_widget(column), f[colnum].desc);
+                       gtk_widget_set_tooltip_text(column->button, f[colnum].desc);
 
                /*
                gtk_clist_set_column_title(GTK_CLIST(rep->clist), colnum, f[colnum].title);