ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] interface options patch

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

From: Nathan Jennings <njen@xxxxxxxxxxxxx>
Date: Mon, 08 Sep 2003 22:40:16 -0400
Hello,

Attached patch contains two small tweaks to "capture_prefs.c": a) adds Ethereal icon to window b) allows ESC key to cancel dialog.

This patch is against what I sent yesterday.

-Nathan
--- gtk/capture_prefs.c	Mon Sep  8 22:25:56 2003
+++ gtk/capture_prefs.c	Mon Sep  8 22:19:07 2003
@@ -39,6 +39,7 @@
 #include "prefs.h"
 #include "prefs_dlg.h"
 #include "ui_util.h"
+#include "dlg_utils.h"
 #include "simple_dialog.h"
 #include "pcap-util.h"
 #include "main.h"
@@ -220,14 +221,10 @@
 	gtk_window_set_title(GTK_WINDOW(ifopts_edit_dlg), 
 			"Ethereal: Preferences: Interface Options");
 	SIGNAL_CONNECT(ifopts_edit_dlg, "destroy", ifopts_edit_destroy_cb, NULL);
+	SIGNAL_CONNECT(ifopts_edit_dlg, "realize", window_icon_realize_cb, NULL);
 	gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(ifopts_edit_dlg)->vbox),
 			5);
 	
-	/*
-	 * XXX - What code can be put here, or somewhere else, to get the Ethereal 
-	 *		 icon loaded for this window?
-	 */
-	
 	/* create old options frame */
 	old_opts_fr = gtk_frame_new("Previously saved options");
 	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(ifopts_edit_dlg)->vbox), 
@@ -370,7 +367,7 @@
 	/* Catch the "key_press_event" signal in the window, so that we can
 	   catch the ESC key being pressed and act as if the "Cancel" button
 	   had been selected. */
-	/*dlg_set_cancel(ifopts_edit_dlg, cancel_bt);*/
+	dlg_set_cancel(ifopts_edit_dlg, cancel_bt);
 	
 	gtk_widget_show(ifopts_edit_dlg);
 }