aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-01-04 14:10:16 -0800
committerGuy Harris <guy@alum.mit.edu>2017-01-04 22:10:48 +0000
commit26430ff647eff817aebdf7425f866f6d7f0f9860 (patch)
treef6545f703f207fe9f0b84d723823dd3db50143bd /ui
parentf7124f64a8bafe70cb52cfeb225265d229befa66 (diff)
Include extcap binaries in the count of things to point out during startup.
The GTK+ version, at least, crashes if there are more "doing XXX..." items put up than the calculated count, so, now that we're putting up items for extcap binaries, we need to count the extcap binaries. Clean up some stuff we found doing this (indentation, a _U_ on something that's used). Change-Id: I1f88042b64ce4b9ae352de37689677c694e3770b Reviewed-on: https://code.wireshark.org/review/19549 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk/about_dlg.c6
-rw-r--r--ui/qt/splash_overlay.cpp9
2 files changed, 14 insertions, 1 deletions
diff --git a/ui/gtk/about_dlg.c b/ui/gtk/about_dlg.c
index 802d9c6a79..5568f602ff 100644
--- a/ui/gtk/about_dlg.c
+++ b/ui/gtk/about_dlg.c
@@ -39,6 +39,9 @@
#ifdef HAVE_LUA
#include <epan/wslua/init_wslua.h>
#endif
+#ifdef HAVE_EXTCAP
+#include "../../extcap.h"
+#endif
#include "../../log.h"
#include "../../register.h"
@@ -258,6 +261,9 @@ splash_update(register_action_e action, const char *message, gpointer client_dat
#ifdef HAVE_LUA
ul_count += wslua_count_plugins (); /* get count of lua plugins */
#endif
+#ifdef HAVE_EXTCAP
+ ul_count += extcap_count(); /* get count of extcap binaries */
+#endif
}
main_lb = (GtkWidget *)g_object_get_data(G_OBJECT(win), "protocol_label");
diff --git a/ui/qt/splash_overlay.cpp b/ui/qt/splash_overlay.cpp
index 36d814d4f0..2b9785c55f 100644
--- a/ui/qt/splash_overlay.cpp
+++ b/ui/qt/splash_overlay.cpp
@@ -33,6 +33,10 @@
#include "epan/wslua/init_wslua.h"
#endif
+#ifdef HAVE_EXTCAP
+#include "../../extcap.h"
+#endif
+
// Uncomment to slow the update progress
//#define THROTTLE_STARTUP 1
@@ -58,7 +62,10 @@ SplashOverlay::SplashOverlay(QWidget *parent) :
// RA_DISSECTORS -> RA_PLUGIN_REGISTER) minus two.
int register_add = 5;
#ifdef HAVE_LUA
- register_add += wslua_count_plugins(); /* get count of lua plugins */
+ register_add += wslua_count_plugins(); /* get count of lua plugins */
+#endif
+#ifdef HAVE_EXTCAP
+ register_add += extcap_count(); /* get count of extcap binaries */
#endif
so_ui_->progressBar->setMaximum((int)register_count() + register_add);
elapsed_timer_.start();