Note why refresh_local_interface_lists() is being called in various
authorGuy Harris <guy@alum.mit.edu>
Tue, 26 Nov 2013 09:33:56 +0000 (09:33 -0000)
committerGuy Harris <guy@alum.mit.edu>
Tue, 26 Nov 2013 09:33:56 +0000 (09:33 -0000)
cases.

svn path=/trunk/; revision=53597

ui/gtk/capture_dlg.c
ui/gtk/gtk_iface_monitor.c
ui/gtk/main_menubar.c
ui/gtk/main_welcome.c
ui/gtk/prefs_capture.c

index cb502b294259913bd84c2cf00d4cf32457044577..f63f3fa76e4198c64bcb476bfc65711d7214c9fa 100644 (file)
@@ -3800,7 +3800,9 @@ apply_local_cb(GtkWidget *win _U_, gpointer *data _U_)
     hide_interface(g_strdup(new_hide));
 
     /* Refresh all places that are displaying an interface list
-       that includes local interfaces. */
+       that includes local interfaces, in case we've changed
+       a property of the interface list that changes how it's
+       displayed. */
     refresh_local_interface_lists();
 
     /* save changes to the preferences file */
@@ -3823,6 +3825,9 @@ capture_dlg_refresh_if (void)
   update_properties_all();
 }
 
+/*
+ * We've been asked to rescan the system looking for interfaces.
+ */
 static void
 rescan_local_cb(GtkWidget *button _U_, gpointer *data _U_)
 {
index 4c134aac70c653deb70db5f05b36ccf2f406b4a8..78187f11e6cba40d207caf23a1d3c90db47b132b 100644 (file)
@@ -73,6 +73,11 @@ gtk_iface_mon_event_cb(const char *iface, int up)
     if (present == up)
         return;
 
+    /*
+     * We've been told that there's a new interface or that an old
+     * interface is gone; reload the list and refresh all places
+     * that are displaying the list.
+     */
     refresh_local_interface_lists();
 }
 
index 4c9d9c24b77fffd888cdf74abf32ec1557f9473a..b10cf129648dbeace745cdb8d138d590fc87741e 100644 (file)
@@ -837,6 +837,9 @@ capture_filters_action_cb(GtkAction *action _U_, gpointer user_data _U_)
     cfilter_dialog_cb(NULL /* GtkWidget *w _U_ */);
 }
 
+/*
+ * We've been asked to rescan the system looking for interfaces.
+ */
 static void
 refresh_interfaces_action_cb(GtkAction *action _U_, gpointer user_data _U_)
 {
index ee6bac8bf04b9f9cc35d877b0c541bf1f8d83dc6..857cdb6c1a88703cad9af3f846e3da881f4fc450 100644 (file)
@@ -971,6 +971,9 @@ update_capture_box(void)
     gtk_tree_selection_set_select_function(GTK_TREE_SELECTION(entry), on_selection_changed, (gpointer)&changed, NULL);
 }
 
+/*
+ * We've been asked to rescan the system looking for interfaces.
+ */
 static void
 refresh_interfaces_cb(GtkWidget *w _U_, gpointer user_data _U_)
 {
index 4d89f6d3f995c45d0dc2d8420dbf783228f0296b..c1c424b9adeec8b545ba1540ccd2d5928e716a03 100644 (file)
@@ -1029,7 +1029,8 @@ ifopts_edit_ok_cb(GtkWidget *w _U_, gpointer parent_w)
        }
 
        /* Update everything that shows an interface list that includes
-          local interfaces. */
+          local interfaces, as we may have changed something that
+          affects how those lists are displayed. */
        refresh_local_interface_lists();
 
        /* Now nuke this window. */