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

andreas at gwydiondylan.org andreas at gwydiondylan.org
Mon Dec 17 03:01:51 CET 2007


Author: andreas
Date: Mon Dec 17 03:01:50 2007
New Revision: 11550

Modified:
   trunk/libraries/gui-sniffer/command-line.dylan
   trunk/libraries/gui-sniffer/commands.dylan
   trunk/libraries/gui-sniffer/gui-sniffer.dylan
   trunk/libraries/gui-sniffer/main.dylan
Log:
job: 7299

Cosmetic changes.


Modified: trunk/libraries/gui-sniffer/command-line.dylan
==============================================================================
--- trunk/libraries/gui-sniffer/command-line.dylan	(original)
+++ trunk/libraries/gui-sniffer/command-line.dylan	Mon Dec 17 03:01:50 2007
@@ -12,8 +12,19 @@
     (mode :: <nnv-shell-mode>,
      buffer :: <basic-shell-buffer>, section :: <basic-shell-section>)
  => (complete? :: <boolean>, message :: false-or(<string>))
-  //--- This is where DylanWorks mode decides if there's a complete form
-  values(#t, #f)
+  let text = as(<string>, section);
+  let is-complete? = #f;
+  let message = #f;
+  block()
+    let (command, complete?, text) 
+      = parse-command-line(frame-window(*editor-frame*).command-line-server, text); 
+    if (complete?)
+      is-complete? := #t;
+    end
+  exception (e :: <condition>)
+    message := condition-to-string(e);
+  end;
+  values(is-complete?, message)
 end method shell-input-complete?;
 
 define method do-process-shell-input

Modified: trunk/libraries/gui-sniffer/commands.dylan
==============================================================================
--- trunk/libraries/gui-sniffer/commands.dylan	(original)
+++ trunk/libraries/gui-sniffer/commands.dylan	Mon Dec 17 03:01:50 2007
@@ -196,9 +196,9 @@
   apply-filter(context.nnv-context);
 end;
 
-define command-group nnv
-    (summary: "Network Night Vision commands",
-     documentation: "The set of commands provided by Network Night Vision.")
+define command-group network
+    (summary: "Networking commands",
+     documentation: "The set of commands for managing the network.")
   command ping;
   command dhcp-client;
   command set-ip-address;
@@ -207,8 +207,14 @@
   command show-arp-table;
   command show-forwarding-table;
   command filter;
+end command-group;
+
+define command-group nnv
+    (summary: "Network Night Vision commands",
+     documentation: "The set of commands provided by Network Night Vision.")
   group basic;
   group property;
+  group network;
 end command-group;
 
 define method context-command-group

Modified: trunk/libraries/gui-sniffer/gui-sniffer.dylan
==============================================================================
--- trunk/libraries/gui-sniffer/gui-sniffer.dylan	(original)
+++ trunk/libraries/gui-sniffer/gui-sniffer.dylan	Mon Dec 17 03:01:50 2007
@@ -510,17 +510,17 @@
   pane sniffer-status-bar (frame)
     make(<status-bar>, label: "Network Night Vision");
 
-  pane open-button (frame)
-    make(<push-button>, label: "open",
+  pane load-button (frame)
+    make(<push-button>, label: "Load",
          activate-callback: method(x) open-pcap-file(frame) end);
   pane save-button (frame)
-    make(<push-button>, label: "save",
+    make(<push-button>, label: "Save",
          activate-callback: method(x) save-pcap-file(frame) end);
-  pane play-button (frame)
-    make(<push-button>, label: "play",
+  pane capture-button (frame)
+    make(<push-button>, label: "Capture",
          activate-callback: method(x) open-interface(frame) end);
   pane stop-button (frame)
-    make(<push-button>, label: "stop", enabled?: #f,
+    make(<push-button>, label: "Stop", enabled?: #f,
          activate-callback: method(x) close-interface(frame) end);
     
   pane sniffer-tool-bar (frame)
@@ -528,10 +528,10 @@
          height: 18,
          resizable?: #f,
          child: horizontally ()
-                  frame.open-button;
+                  frame.load-button;
                   frame.save-button;
                   make(<separator>, orientation: #"vertical");
-                  frame.play-button;
+                  frame.capture-button;
                   frame.stop-button;
                 end);
 
@@ -557,7 +557,7 @@
 end;
 
 define command-table *file-command-table* (*global-command-table*)
-  menu-item "Open pcap file..." = open-pcap-file;
+  menu-item "Load pcap file..." = open-pcap-file;
   menu-item "Save to pcap file..." = save-pcap-file;
   menu-item "About" = show-about-box;
   menu-item "Exit" = exit-application;
@@ -837,9 +837,9 @@
     frame.listening-socket := ethernet-socket;
     gadget-label(frame.sniffer-status-bar) := concatenate("Capturing ", interface-name);
     command-enabled?(open-pcap-file, frame) := #f;
-    gadget-enabled?(frame.open-button) := #f;
+    gadget-enabled?(frame.load-button) := #f;
     command-enabled?(open-interface, frame) := #f;
-    gadget-enabled?(frame.play-button) := #f;
+    gadget-enabled?(frame.capture-button) := #f;
     command-enabled?(close-interface, frame) := #t;
     gadget-enabled?(frame.stop-button) := #t;
   end;
@@ -853,9 +853,9 @@
   disconnect(frame, frame.listening-socket);
   frame.listening-socket := #f;
   command-enabled?(open-pcap-file, frame) := #t;
-  gadget-enabled?(frame.open-button) := #t;
+  gadget-enabled?(frame.load-button) := #t;
   command-enabled?(open-interface, frame) := #t;
-  gadget-enabled?(frame.play-button) := #t;
+  gadget-enabled?(frame.capture-button) := #t;
   command-enabled?(close-interface, frame) := #f;
   gadget-enabled?(frame.stop-button) := #f;
 end;
@@ -883,7 +883,6 @@
   = concatenate("Network Night Vision 0.0.2\n",
                 "(c) 2005 - 2007 Andreas Bogk, Hannes Mehnert\n",
                 "All Rights Reserved. Free for non-commercial use.\n",
-                "\n",
                 "http://www.networknightvision.com/");
 
 define frame <about-box> (<dialog-frame>)

Modified: trunk/libraries/gui-sniffer/main.dylan
==============================================================================
--- trunk/libraries/gui-sniffer/main.dylan	(original)
+++ trunk/libraries/gui-sniffer/main.dylan	Mon Dec 17 03:01:50 2007
@@ -13,7 +13,7 @@
   frame-mapped?(gui-sniffer) := #t;
   *standard-output* := gui-sniffer.nnv-shell-pane.command-line-server.server-output-stream;
   write(*standard-output*, $about-text);
-  new-line(*standard-output*);
+  format(*standard-output*, "\n\nType 'help' down here to get started.\n");
   recenter-window(gui-sniffer.nnv-shell-pane, gui-sniffer.nnv-shell-pane.window-point.bp-line, #"bottom");
   start-frame(gui-sniffer);
 end;



More information about the chatter mailing list