summaryrefslogtreecommitdiff
path: root/ui/qt/interface_frame.cpp
diff options
context:
space:
mode:
authorRoland Knall <roland.knall@br-automation.com>2016-12-27 10:14:32 +0100
committerRoland Knall <rknall@gmail.com>2016-12-27 11:55:51 +0000
commit9d47bf993932c064c60ea79592a06f0ffd383fd6 (patch)
tree82c7bf282defab09fec6ecf75d889df5c51387d2 /ui/qt/interface_frame.cpp
parent8e6953a64b0b785918d4a234e1eb09de21cfb5b8 (diff)
downloadwireshark-9d47bf993932c064c60ea79592a06f0ffd383fd6.tar.gz
InterfaceList: Add check for remote interface
Add a check, to allow the filtering of remote only interfaces. Also add the necessary options to the type menu. Change-Id: Ib82519362454094f64abf1cbe6d7bc917990d7ac Reviewed-on: https://code.wireshark.org/review/19438 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/interface_frame.cpp')
-rw-r--r--ui/qt/interface_frame.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/ui/qt/interface_frame.cpp b/ui/qt/interface_frame.cpp
index 64af22da68..58175143a2 100644
--- a/ui/qt/interface_frame.cpp
+++ b/ui/qt/interface_frame.cpp
@@ -133,6 +133,17 @@ QMenu * InterfaceFrame::getSelectionMenu()
++it;
}
+#ifdef HAVE_PCAP_REMOTE
+ if ( proxyModel->remoteInterfacesExist() )
+ {
+ QAction * toggleRemoteAction = new QAction(tr("Remote interfaces"), this);
+ toggleRemoteAction->setCheckable(true);
+ toggleRemoteAction->setChecked(! proxyModel->remoteDisplay());
+ connect(toggleRemoteAction, SIGNAL(triggered()), this, SLOT(toggleRemoteInterfaces()));
+ contextMenu->addAction(toggleRemoteAction);
+ }
+#endif
+
contextMenu->addSeparator();
QAction * toggleHideAction = new QAction(tr("Show hidden interfaces"), this);
toggleHideAction->setCheckable(true);
@@ -214,6 +225,14 @@ void InterfaceFrame::toggleHiddenInterfaces()
emit typeSelectionChanged();
}
+#ifdef HAVE_PCAP_REMOTE
+void InterfaceFrame::toggleRemoteInterfaces()
+{
+ proxyModel->toggleRemoteDisplay();
+ emit typeSelectionChanged();
+}
+#endif
+
void InterfaceFrame::resetInterfaceTreeDisplay()
{
if ( proxyModel->rowCount() == 0 )