diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-07-25 00:44:50 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-07-25 07:45:22 +0000 |
commit | 9ccf2e04c84776c8f23420ce9fdbfabb3735e75f (patch) | |
tree | 36ada62286fdd03b03a1b1d5dcd98b997732e02e /ui/qt/wireshark_application.cpp | |
parent | 35b4487538dc88a5687c5e3a99c8c70c099fdfa8 (diff) |
Make Capture -> Refresh Interfaces work.
Add a "refresh the local interfaces" method to WiresharkApplication,
which reloads the interface list and emits the "interface list changed"
signal, and invoke it from the Capture -> Refresh Interfaces menu item.
Change-Id: I9641e4b341eb44d773c556691d8bb9dac776ea9d
Reviewed-on: https://code.wireshark.org/review/3195
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/wireshark_application.cpp')
-rw-r--r-- | ui/qt/wireshark_application.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp index 7630530c23..4e524f1ac3 100644 --- a/ui/qt/wireshark_application.cpp +++ b/ui/qt/wireshark_application.cpp @@ -706,6 +706,24 @@ void WiresharkApplication::ifChangeEventsAvailable() #endif } +void WiresharkApplication::refreshLocalInterfaces() +{ +#ifdef HAVE_LIBPCAP + /* + * Reload the local interface list. + */ + scan_local_interfaces(main_window_update); + + /* + * Now emit a signal to indicate that the list changed, so that all + * places displaying the list will get updated. + * + * XXX - only if it *did* change. + */ + emit localInterfaceListChanged(); +#endif +} + void WiresharkApplication::allSystemsGo() { QString display_filter = NULL; |