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>
This commit is contained in:
parent
35b4487538
commit
9ccf2e04c8
|
@ -286,6 +286,7 @@ private slots:
|
|||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
void on_actionCaptureOptions_triggered();
|
||||
void on_actionCaptureRefreshInterfaces_triggered();
|
||||
#endif
|
||||
|
||||
void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
|
||||
|
|
|
@ -2390,6 +2390,11 @@ void MainWindow::on_actionCaptureOptions_triggered()
|
|||
capture_interfaces_dialog_.raise();
|
||||
capture_interfaces_dialog_.activateWindow();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionCaptureRefreshInterfaces_triggered()
|
||||
{
|
||||
wsApp->refreshLocalInterfaces();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -74,6 +74,7 @@ public:
|
|||
void emitAppSignal(AppSignal signal);
|
||||
void emitStatCommandSignal(const QString &menu_path, const char *arg, void *userdata);
|
||||
void allSystemsGo();
|
||||
void refreshLocalInterfaces();
|
||||
e_prefs * readConfigurationFiles(char **gdp_path, char **dp_path);
|
||||
QList<recent_item_status *> recentItems() const;
|
||||
void addRecentItem(const QString &filename, qint64 size, bool accessible);
|
||||
|
|
Loading…
Reference in New Issue