Skip to content
Snippets Groups Projects
Commit 850354ed authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

[#1214] Enable / Disable history

parent 6138fc9b
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,9 @@ static void history_enabled_cb (GtkWidget *widget)
{
history_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
gtk_widget_set_sensitive (GTK_WIDGET (history_value), history_enabled);
// Toggle it through D-Bus
dbus_set_history_enabled ();
}
......@@ -743,8 +746,6 @@ void save_configuration_parameters (void) {
// History config
dbus_set_history_limit (history_limit);
// Toggle it through D-Bus
dbus_set_history_enabled ();
}
......
......@@ -80,10 +80,13 @@ calllist_reset (calltab_t* tab)
void calllist_add_history_entry (callable_obj_t *obj)
{
// TODO Check if history is enabled
int state = dbus_get_history_enabled ();
if (state == 1)
{
g_queue_push_tail (history->callQueue, (gpointer *) obj);
calltree_add_call (history, obj);
}
}
void
calllist_add (calltab_t* tab, callable_obj_t * c)
......
......@@ -417,8 +417,8 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c)
void calltree_add_history_entry (callable_obj_t * c)
{
//if (calllist_get_size (history) > dbus_get_max_calls ())
// return;
if (dbus_get_history_enabled () == 0)
return;
GdkPixbuf *pixbuf=NULL;
GtkTreeIter iter;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment