Set the default interface as selected.

svn path=/trunk/; revision=48788
This commit is contained in:
Irene Rüngeler 2013-04-08 08:13:20 +00:00
parent 616fb80a01
commit 192b62f97b
1 changed files with 5 additions and 0 deletions

View File

@ -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);
}