Wireshark-bugs: [Wireshark-bugs] [Bug 7129] New: menus, main window title, icons are not reset w
Date: Tue, 17 Apr 2012 02:20:41 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7129

           Summary: menus, main window title, icons are not reset when
                    capture is interrupted before any data arrives
           Product: Wireshark
           Version: SVN
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Low
         Component: Wireshark
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: wireshark@xxxxxxxxx


Build Information:
TShark 1.7.2 (SVN Rev 42105 from /trunk)

Copyright 1998-2012 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (32-bit) with GLib 2.28.8, with libpcap, with libz 1.2.5, with POSIX
capabilities (Linux), without SMI, without c-ares, without ADNS, without Lua,
without Python, with GnuTLS 2.10.5, with Gcrypt 1.4.6, with MIT Kerberos,
without GeoIP.

Running on Linux 2.6.42 with locale en_US.UTF-8, with
libpcap version 1.1.1, with libz 1.2.5.

Built using gcc 4.6.3
--
Dear all,

when I run a capture from a named pipe

mkfifo myPipe

wireshark -k -i myPipe

and press the stop icon before any data arrives on the pipe, the window
title, icon and menus are left in the status they had during the capture.

As a consequence, I can't access File/Open and other menu items.

When a capture is started, capture_cb_capture_prepared is sent and
main_capture_callback()'s sub-functions grey out the menus. If Stop is
pressed before any data arrives, the capture's state goes from
CAPTURE_PREPARING to CAPTURE_STOPPED and capture_cb_capture_failed is sent.

Normally, when a capture terminates, capture_cb_capture_fixed_finished or
_update_finished are sent, they reset menus, title and icon to a reasonable
state.

I've been thinking about this for a while and propose to reset things when we
capture_cb_capture_failed as well. I know there's capture_cb_capture_stopping
but this is sent only when the user presses Stop, not when dumpcap is killed.

The attached patch adds a simple function main_capture_cb_capture_failed() to
reset menus, window title and icon.

Thanks for review and merging,

   Martin

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.