[Gd-chatter] r10977 - trunk/libraries/gui-sniffer

andreas at gwydiondylan.org andreas at gwydiondylan.org
Tue Nov 21 20:03:11 CET 2006


Author: andreas
Date: Tue Nov 21 20:03:09 2006
New Revision: 10977

Modified:
   trunk/libraries/gui-sniffer/gui-sniffer.dylan
Log:
job: 7299

Context menus 101.

Modified: trunk/libraries/gui-sniffer/gui-sniffer.dylan
==============================================================================
--- trunk/libraries/gui-sniffer/gui-sniffer.dylan	(original)
+++ trunk/libraries/gui-sniffer/gui-sniffer.dylan	Tue Nov 21 20:03:09 2006
@@ -438,6 +438,7 @@
          widths: #[30, 60, 150, 150, 100, 500],
          items: #[],
          text-style: $text-style,
+         popup-menu-callback: display-popup-menu,
          value-changed-callback: method(x) show-packet(frame) end);
 
   pane packet-tree-view (frame)
@@ -518,6 +519,24 @@
   menu-item "Capture" = *interface-command-table*;
 end;
 
+define command-table *popup-menu-command-table* (*global-command-table*)
+  menu-item "Follow TCP Stream" = follow-tcp-stream;
+end;
+
+define method display-popup-menu (sheet, object, #key x, y)
+  let frame = sheet.sheet-frame;
+  let menu = make-menu-from-command-table-menu
+               (command-table-menu(*popup-menu-command-table*),
+                frame, frame-manager(frame),
+                command-table: *popup-menu-command-table*,
+                owner: frame);
+  display-menu(menu);
+end;
+
+define method follow-tcp-stream (frame :: <gui-sniffer-frame>)
+  //
+end;
+
 define method open-pcap-file (frame :: <gui-sniffer-frame>)
   let file = choose-file(frame: frame, direction: #"input");
   if (file)



More information about the chatter mailing list