aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/gtk/capture_dlg.c2
-rw-r--r--ui/gtk/capture_if_dlg.c15
-rw-r--r--ui/gtk/capture_if_dlg.h3
-rw-r--r--ui/gtk/iface_lists.c17
-rw-r--r--ui/gtk/iface_lists.h6
-rw-r--r--ui/gtk/main.c1
6 files changed, 23 insertions, 21 deletions
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c
index c2a3c2220e..d03370d8bb 100644
--- a/ui/gtk/capture_dlg.c
+++ b/ui/gtk/capture_dlg.c
@@ -266,8 +266,6 @@ activate_monitor(GtkTreeViewColumn *tree_column, GtkCellRenderer *renderer,
GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
#endif
-extern gint if_list_comparator_alph (const void *first_arg, const void *second_arg);
-
/* stop the currently running capture */
void
capture_stop_cb(GtkWidget *w _U_, gpointer d _U_)
diff --git a/ui/gtk/capture_if_dlg.c b/ui/gtk/capture_if_dlg.c
index 72025bde53..fa95aebd20 100644
--- a/ui/gtk/capture_if_dlg.c
+++ b/ui/gtk/capture_if_dlg.c
@@ -395,21 +395,6 @@ capture_if_destroy_cb(GtkWidget *win _U_, gpointer user_data _U_)
/*
- * Sorts the Interface List in alphabetical order
- */
-gint if_list_comparator_alph (const void *first_arg, const void *second_arg){
- const if_info_t *first = first_arg, *second = second_arg;
-
- if (first != NULL && first->description != NULL &&
- second != NULL && second->description != NULL) {
- return g_ascii_strcasecmp(first->description, second->description);
- } else {
- return 0;
- }
-}
-
-
-/*
* Used to retrieve the interface icon.
*/
GtkWidget * capture_get_if_icon(interface_t *device)
diff --git a/ui/gtk/capture_if_dlg.h b/ui/gtk/capture_if_dlg.h
index 946ccaff53..7ef5a3eb35 100644
--- a/ui/gtk/capture_if_dlg.h
+++ b/ui/gtk/capture_if_dlg.h
@@ -72,9 +72,6 @@ select_all_interfaces(gboolean enable);
void
destroy_if_window(void);
-gint
-if_list_comparator_alph (const void *first_arg, const void *second_arg);
-
#endif /* HAVE_LIBPCAP */
#endif /* capture_if_dlg.h */
diff --git a/ui/gtk/iface_lists.c b/ui/gtk/iface_lists.c
index f099913d22..ac8c227575 100644
--- a/ui/gtk/iface_lists.c
+++ b/ui/gtk/iface_lists.c
@@ -50,6 +50,23 @@
capture_options global_capture_opts;
/*
+ * Used when sorting an interface list into alphabetical order by
+ * their descriptions.
+ */
+gint
+if_list_comparator_alph(const void *first_arg, const void *second_arg)
+{
+ const if_info_t *first = first_arg, *second = second_arg;
+
+ if (first != NULL && first->description != NULL &&
+ second != NULL && second->description != NULL) {
+ return g_ascii_strcasecmp(first->description, second->description);
+ } else {
+ return 0;
+ }
+}
+
+/*
* Fetch the list of local interfaces with capture_interface_list()
* and set the list of "all interfaces" in *capture_opts to include
* those interfaces.
diff --git a/ui/gtk/iface_lists.h b/ui/gtk/iface_lists.h
index 7c14a56e83..2d955ec9d1 100644
--- a/ui/gtk/iface_lists.h
+++ b/ui/gtk/iface_lists.h
@@ -28,6 +28,12 @@
#ifdef HAVE_LIBPCAP
/*
+ * Used when sorting an interface list into alphabetical order by
+ * their descriptions.
+ */
+extern gint if_list_comparator_alph(const void *first_arg, const void *second_arg);
+
+/*
* Get the global interface list. Generate it if we haven't
* done so already.
*/
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index 84d293d7ba..cd99cfab5f 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -119,7 +119,6 @@
#include "../capture_ifinfo.h"
#include "../capture.h"
#include "../capture_sync.h"
-extern gint if_list_comparator_alph (const void *first_arg, const void *second_arg);
#endif
#ifdef _WIN32