Ethereal-dev: [ethereal-dev] ui issue "delete" versus "stop" capture

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Nathan Neulinger <nneul@xxxxxxx>
Date: Sun, 19 Dec 1999 12:15:22 -0600
How hard would it be to have ethereal treat clicking on a close box of a
window the same as clicking on 'stop'. 

I've noticed recently that if I click on the close box instead of 'stop'
to stop a capture, it starts spewing gtk assertions:

Gtk-CRITICAL **: file gtklabel.c: line 260 (gtk_label_set_text):
assertion `GTK_IS_LABEL (label)' failed.

Gtk-WARNING **: invalid cast from `(unknown)' to `GtkLabel'

It looks like the capture subprocess isn't handling that close the same
way as the stop button. Seems to me it should just be a matter of adding
the right signal handler.

We have this:

  gtk_signal_connect(GTK_OBJECT(stop_bt), "clicked",
    GTK_SIGNAL_FUNC(capture_stop_cb), (gpointer) &ld);

Could we not just add:

  gtk_signal_connect(GTK_OBJECT(cap_w), "delete_event",
    GTK_SIGNAL_FUNC(capture_stop_cb), (gpointer) &ld);

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@xxxxxxx
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216