aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/prefs_capture.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-28 08:13:21 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-28 08:13:21 +0000
commit5e7ca579ceeb21b355831bd2c5de6742e8e9a14b (patch)
tree29f58015c96ff0d14b989ca24a3771795d2737dc /ui/gtk/prefs_capture.c
parent234628c616e21b5f0d45984cd67016e976491290 (diff)
Detangle the code that manages the interface list on the welcome screen:
fill_capture_box(): if there are interfaces on which to capture, constructs the interface list, otherwise destroys the interface list and puts up a message. update_capture_box(): updates the interface list to reflect current reality. welcome_if_panel_reload(): if there is an interface list, and if there are interfaces on which to capture (so that we still want that list), updates the list by calling update_capture_box(), otherwise creates or destroys it by calling fill_capture_box() (as either it doesn't exist but now needs to or does exist but needs to go away). Have refresh_local_interface_lists(), which re-fetches the list of local interfaces and updates every interface list that includes local interfaces, and refresh_non_local_interface_lists(), which only updates interface lists that (also) include interfaces other than local interfaces (such as pipes and remote interfaces). Call them in the apprpriate places (if we know the list of local interfaces has been updated, call refresh_local_interface_lists(), otherwise, if we know interfaces other than local interfaces have been added or removed, call refresh_non_local_interface_lists()). Don't have any routine that updates the interface list for one widget update the interface list for any other widget; leave the global updating of interface lists up to refresh_local_interface_lists() and refresh_non_local_interface_lists() - only call one of them if any interface lists are to be updated. svn path=/trunk/; revision=43517
Diffstat (limited to 'ui/gtk/prefs_capture.c')
-rw-r--r--ui/gtk/prefs_capture.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/gtk/prefs_capture.c b/ui/gtk/prefs_capture.c
index e300e2f653..1dda51c06e 100644
--- a/ui/gtk/prefs_capture.c
+++ b/ui/gtk/prefs_capture.c
@@ -620,8 +620,9 @@ ifopts_edit_ok_cb(GtkWidget *w _U_, gpointer parent_w)
ifopts_write_new_hide();
}
- /* Update welcome page */
- welcome_if_panel_reload ();
+ /* Update everything that shows an interface list that includes
+ local interfaces. */
+ refresh_local_interface_lists();
/* Now nuke this window. */
gtk_grab_remove(GTK_WIDGET(parent_w));