From d3977c883a87d0551e49df58b9717ee75afeb95a Mon Sep 17 00:00:00 2001 From: areversat <areversat@laptop33.(none)> Date: Mon, 28 Apr 2008 17:48:54 -0400 Subject: [PATCH] Add history search --- sflphone-gtk/src/Makefile.am | 3 ++- sflphone-gtk/src/actions.c | 2 ++ sflphone-gtk/src/calltab.h | 1 + sflphone-gtk/src/calltree.c | 1 + sflphone-gtk/src/mainwindow.c | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sflphone-gtk/src/Makefile.am b/sflphone-gtk/src/Makefile.am index 0813772403..7e151680e8 100644 --- a/sflphone-gtk/src/Makefile.am +++ b/sflphone-gtk/src/Makefile.am @@ -12,6 +12,7 @@ sflphone_gtk_SOURCES = \ menus.c \ calltab.c \ calltree.c \ + historyfilter.c \ actions.c \ configwindow.c \ accountlist.c \ @@ -25,7 +26,7 @@ sflphone_gtk_SOURCES = \ noinst_HEADERS = actions.h dbus.h sflnotify.h mainwindow.h calllist.h dialpad.h codeclist.h assistant.h\ callmanager-glue.h errors.h sflphone_const.h configurationmanager-glue.h instance-glue.h menus.h calltab.h calltree.h configwindow.h \ - accountlist.h accountwindow.h marshaller.h sliders.h statusicon.h + historyfilter.h accountlist.h accountwindow.h marshaller.h sliders.h statusicon.h EXTRA_DIST = marshaller.list sflphone_gtk_LDADD = $(DEPS_LIBS) -lnotify diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index 5f1e7d12c3..5b19077c17 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -193,6 +193,8 @@ sflphone_init() int i; current_calls = calltab_init(); history = calltab_init(); + histfilter = create_filter(history->store); + gtk_tree_view_set_model(GTK_TREE_VIEW(history->view), GTK_TREE_MODEL(histfilter)); account_list_init (); codec_list_init(); if(!dbus_connect ()){ diff --git a/sflphone-gtk/src/calltab.h b/sflphone-gtk/src/calltab.h index cbeab8f434..dcc47b2605 100644 --- a/sflphone-gtk/src/calltab.h +++ b/sflphone-gtk/src/calltab.h @@ -23,6 +23,7 @@ #include <calllist.h> #include <gtk/gtk.h> +GtkTreeModel* histfilter; calltab_t* calltab_init(); diff --git a/sflphone-gtk/src/calltree.c b/sflphone-gtk/src/calltree.c index 6704db7d17..d36b0df598 100644 --- a/sflphone-gtk/src/calltree.c +++ b/sflphone-gtk/src/calltree.c @@ -152,6 +152,7 @@ toggle_history(GtkToggleToolButton *toggle_tool_button, sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (active_calltree->view)); g_signal_emit_by_name(sel, "changed"); toolbar_update_buttons(); + gtk_tree_model_filter_refilter(histfilter); } diff --git a/sflphone-gtk/src/mainwindow.c b/sflphone-gtk/src/mainwindow.c index 2796d6f518..66d6ba0736 100644 --- a/sflphone-gtk/src/mainwindow.c +++ b/sflphone-gtk/src/mainwindow.c @@ -27,6 +27,7 @@ #include <mainwindow.h> #include <menus.h> #include <sliders.h> +#include <historyfilter.h> #include <gtk/gtk.h> -- GitLab