diff --git a/sflphone-client-gnome/src/config/accountconfigdialog.c b/sflphone-client-gnome/src/config/accountconfigdialog.c index 8ced5a8759a137ba2448dea3a87fff80bd649ba3..8567d3bfdb72234085c8d2bca4248933ccd4159f 100644 --- a/sflphone-client-gnome/src/config/accountconfigdialog.c +++ b/sflphone-client-gnome/src/config/accountconfigdialog.c @@ -811,18 +811,30 @@ GtkWidget * create_advanced_tab(account_t **a) iface_list = (gchar**) dbus_get_all_ip_interface(); gchar ** iface = NULL; + // flag to determine if local_address is found + gboolean iface_found = FALSE; + if (iface_list != NULL) { + + // fill the iterface combo box for (iface = iface_list; *iface; iface++) { DEBUG("Interface %s", *iface); gtk_list_store_append(ipInterfaceListStore, &iter ); gtk_list_store_set(ipInterfaceListStore, &iter, 0, *iface, -1 ); - current_local_address_iter = iter; - if (g_strcmp0(*iface, local_address) == 0) { + // set the current local address + if (!iface_found && (g_strcmp0(*iface, local_address) == 0)) { DEBUG("Setting active local address combo box"); current_local_address_iter = iter; + iface_found = TRUE; } } + + if(!iface_found) { + DEBUG("Did not find local ip address, take fisrt in the list"); + gtk_tree_model_get_iter_first(GTK_TREE_MODEL(ipInterfaceListStore), ¤t_local_address_iter); + } + } localAddressCombo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(ipInterfaceListStore)); diff --git a/sflphone-client-gnome/src/config/preferencesdialog.c b/sflphone-client-gnome/src/config/preferencesdialog.c index bf8ba55b0f5ccce30a582aa67a15167b2b60a063..595210f4ca36f345b2848f8314b1e4aa83565670 100644 --- a/sflphone-client-gnome/src/config/preferencesdialog.c +++ b/sflphone-client-gnome/src/config/preferencesdialog.c @@ -241,22 +241,36 @@ GtkWidget* create_direct_ip_calls_tab() gchar ** iface_list = NULL; iface_list = (gchar**) dbus_get_all_ip_interface(); gchar ** iface = NULL; + + gboolean iface_found = FALSE; if (iface_list != NULL) { + + // init interface list with first one + // iface = iface_list; + // g_hash_table_replace(directIpCallsProperties, g_strdup(LOCAL_ADDRESS), g_strdup((gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(localAddressCombo)))); + for (iface = iface_list; *iface; iface++) { DEBUG("Interface %s", *iface); gtk_list_store_append(ipInterfaceListStore, &iter ); gtk_list_store_set(ipInterfaceListStore, &iter, 0, *iface, -1 ); - current_local_address_iter = iter; - if (g_strcmp0(*iface, local_address) == 0) { + if (!iface_found && (g_strcmp0(*iface, local_address) == 0)) { DEBUG("Setting active local address combo box"); current_local_address_iter = iter; + iface_found = TRUE; } } + + if(!iface_found) { + DEBUG("Did not find local ip address, take fisrt in the list"); + gtk_tree_model_get_iter_first(GTK_TREE_MODEL(ipInterfaceListStore), ¤t_local_address_iter); + } } + + localAddressCombo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(ipInterfaceListStore)); gtk_label_set_mnemonic_widget(GTK_LABEL(localAddressLabel), localAddressCombo); gtk_table_attach ( GTK_TABLE( table ), localAddressCombo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index 4cd91db08037968747aeca10ebe74c9a0ae971f1..3f1d30a3851948017898fc22f5fae9042f452393 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -230,7 +230,7 @@ conference_changed_cb (DBusGProxy *proxy UNUSED, const gchar* state, void * foo UNUSED ) { - DEBUG ("-------------------- Conference changed ---------------------\n"); + // sflphone_display_transfer_status("Transfer successfull"); conference_obj_t* changed_conf = conferencelist_get(confID); gchar** participants; @@ -1630,6 +1630,7 @@ dbus_get_dialpad() void dbus_set_dialpad( ) { + GError* error = NULL; org_sflphone_SFLphone_ConfigurationManager_set_dialpad( configurationManagerProxy, @@ -2359,7 +2360,7 @@ GHashTable* dbus_get_tls_settings_default(void) gchar ** dbus_get_all_ip_interface(void) { GError *error = NULL; - char ** array; + gchar ** array; if(!org_sflphone_SFLphone_ConfigurationManager_get_all_ip_interface ( configurationManagerProxy, &array, &error)) {