From 192b62f97b19a02d6c9203bdcb9b58cee1831f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Irene=20R=C3=BCngeler?= Date: Mon, 8 Apr 2013 08:13:20 +0000 Subject: [PATCH] Set the default interface as selected. svn path=/trunk/; revision=48788 --- ui/gtk/main_welcome.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/gtk/main_welcome.c b/ui/gtk/main_welcome.c index e880a7e477..ea99a6119d 100644 --- a/ui/gtk/main_welcome.c +++ b/ui/gtk/main_welcome.c @@ -935,6 +935,11 @@ update_capture_box(void) if (!device.hidden) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, ICON, gtk_image_get_pixbuf(GTK_IMAGE(capture_get_if_icon(&device))), IFACE_DESCR, device.display_name, IFACE_NAME, device.name, -1); + if (global_capture_opts.num_selected == 0 && strcmp(device.name, prefs.capture_device) == 0) { + device.selected = TRUE; + global_capture_opts.all_ifaces = g_array_remove_index(global_capture_opts.all_ifaces, i); + g_array_insert_val(global_capture_opts.all_ifaces, i, device); + } if (device.selected) { gtk_tree_selection_select_iter(entry, &iter); }