diff --git a/gnome/src/contacts/calllist.c b/gnome/src/contacts/calllist.c index 3fab976964f2d4a5fc822f9c0edf6701398fb525..351a54eb3537174cbe0722276235d0c1c4666f72 100644 --- a/gnome/src/contacts/calllist.c +++ b/gnome/src/contacts/calllist.c @@ -165,6 +165,10 @@ calllist_remove_call(calltab_t* tab, const gchar * callID, SFLPhoneClient *clien g_queue_remove(tab->callQueue, call); } + /* If removing a call from the history, don't add it back to the history! */ + if (calltab_has_name(tab, HISTORY)) + return; + /* Don't save empty (i.e. started dialing, then deleted) calls */ if (call->_peer_number && strlen(call->_peer_number) > 0) { calllist_add_call(history_tab, call); diff --git a/gnome/src/uimanager.c b/gnome/src/uimanager.c index a7e8a5c7259651ca97f39173531236b38587c0cf..ecaa74f1aadf3d9235fac216935a97150400fccf 100644 --- a/gnome/src/uimanager.c +++ b/gnome/src/uimanager.c @@ -760,20 +760,21 @@ call_configuration_assistant(G_GNUC_UNUSED GtkAction *action, G_GNUC_UNUSED gpoi build_wizard(); } -static void -remove_from_history(G_GNUC_UNUSED GtkAction *action, SFLPhoneClient *client) +typedef struct { - callable_obj_t* call = calltab_get_selected_call(history_tab); - - g_debug("Remove the call from the history"); + callable_obj_t *call; + SFLPhoneClient *client; +} EditNumberData; - if (call == NULL) { +static void +remove_from_history(G_GNUC_UNUSED GtkAction *action, EditNumberData *data) +{ + if (data->call == NULL) { g_warning("Call is NULL"); return; } - calllist_remove_from_history(call, client); - update_actions(client); + calllist_remove_from_history(data->call, data->client); } static void @@ -1187,12 +1188,6 @@ fail: return NULL; } -typedef struct -{ - callable_obj_t *call; - SFLPhoneClient *client; -} EditNumberData; - static void edit_number_cb(G_GNUC_UNUSED GtkWidget *widget, EditNumberData *data) {