* #26594: gnome: fix deletion of history entries

This commit is contained in:
Tristan Matthews
2013-06-28 11:55:24 -04:00
parent 685fc3606e
commit c01a9bac7a
2 changed files with 13 additions and 14 deletions

View File

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

View File

@ -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);
callable_obj_t *call;
SFLPhoneClient *client;
} EditNumberData;
g_debug("Remove the call from the history");
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)
{