diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-11-25 21:50:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-11-25 21:50:58 +0000 |
commit | e2735b15e0fbd85f74b5504f3c3f4fa18804fc5c (patch) | |
tree | 87a2166d3d34795b18231f044a0d17a67df7f4e3 /ui/qt/capture_interfaces_dialog.cpp | |
parent | 2c9ea8a51fc4fbeabd37f9aad6f00fdbfa7bb6c1 (diff) | |
download | wireshark-e2735b15e0fbd85f74b5504f3c3f4fa18804fc5c.tar.gz |
No libpcap, no capturing, no capture interfaces. Ifdef the entire
capture interfaces dialog code, *and* the code that calls it, under
HAVE_LIBPCAP.
Still more stuff to remove from the no-pcap UI, such as the Capture
menu, the capture filter in the main window, and the list of interfaces
in the main window.
svn path=/trunk/; revision=53582
Diffstat (limited to 'ui/qt/capture_interfaces_dialog.cpp')
-rw-r--r-- | ui/qt/capture_interfaces_dialog.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index c01d9d6e16..06db6577f2 100644 --- a/ui/qt/capture_interfaces_dialog.cpp +++ b/ui/qt/capture_interfaces_dialog.cpp @@ -27,16 +27,16 @@ #include "config.h" +#ifdef HAVE_LIBPCAP + #include <glib.h> #include <QSpacerItem> #include <QTimer> -#ifdef HAVE_LIBPCAP #include "capture_ui_utils.h" #include "ui/capture_globals.h" #include "ui/iface_lists.h" -#endif #include "ui/ui_util.h" #include "ui/utf8_entities.h" @@ -55,10 +55,8 @@ CaptureInterfacesDialog::CaptureInterfacesDialog(QWidget *parent) : { ui->setupUi(this); -#ifdef HAVE_LIBPCAP stat_timer_ = NULL; stat_cache_ = NULL; -#endif connect(ui->tbInterfaces,SIGNAL(itemPressed(QTableWidgetItem *)),this,SLOT(tableItemPressed(QTableWidgetItem *))); connect(ui->tbInterfaces,SIGNAL(itemClicked(QTableWidgetItem *)),this,SLOT(tableItemClicked(QTableWidgetItem *))); @@ -68,7 +66,6 @@ void CaptureInterfacesDialog::tableItemClicked(QTableWidgetItem * item) { Q_UNUSED(item) -#ifdef HAVE_LIBPCAP interface_t device; global_capture_opts.num_selected = 0; @@ -93,7 +90,6 @@ void CaptureInterfacesDialog::tableItemClicked(QTableWidgetItem * item) g_array_insert_val(global_capture_opts.all_ifaces, row, device); } } -#endif } CaptureInterfacesDialog::~CaptureInterfacesDialog() @@ -106,7 +102,6 @@ void CaptureInterfacesDialog::SetTab(int index) ui->tabWidget->setCurrentIndex(index); } -#ifdef HAVE_LIBPCAP void CaptureInterfacesDialog::on_capturePromModeCheckBox_toggled(bool checked) { prefs.capture_prom_mode = checked; @@ -152,7 +147,6 @@ void CaptureInterfacesDialog::on_cbResolveTransportNames_toggled(bool checked) { gbl_resolv_flags.transport_name = checked; } -#endif void CaptureInterfacesDialog::on_bStart_clicked() { @@ -172,7 +166,6 @@ void CaptureInterfacesDialog::on_bStop_clicked() void CaptureInterfacesDialog::UpdateInterfaces() { -#ifdef HAVE_LIBPCAP ui->cbPcap->setCurrentIndex(!prefs.capture_pcap_ng); ui->capturePromModeCheckBox->setChecked(prefs.capture_prom_mode); @@ -322,13 +315,10 @@ void CaptureInterfacesDialog::UpdateInterfaces() connect(stat_timer_, SIGNAL(timeout()), this, SLOT(updateStatistics())); stat_timer_->start(stat_update_interval_); } - -#endif } void CaptureInterfacesDialog::updateStatistics(void) { -#ifdef HAVE_LIBPCAP //guint diff; QList<int> *points = NULL; @@ -380,29 +370,25 @@ void CaptureInterfacesDialog::updateStatistics(void) // g_array_insert_val(global_capture_opts.all_ifaces, if_idx, device); } -#endif } void CaptureInterfacesDialog::on_tbInterfaces_hideEvent(QHideEvent *evt) { Q_UNUSED(evt); -#ifdef HAVE_LIBPCAP if (stat_timer_) stat_timer_->stop(); if (stat_cache_) { capture_stat_stop(stat_cache_); stat_cache_ = NULL; } -#endif } void CaptureInterfacesDialog::on_tbInterfaces_showEvent(QShowEvent *evt) { Q_UNUSED(evt); -#ifdef HAVE_LIBPCAP if (stat_timer_) stat_timer_->start(stat_update_interval_); -#endif } +#endif /* HAVE_LIBPCAP */ /* * Editor modelines |