From 3563c779e05d0405755fcfeb0d0efd262dfda8a4 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.net> Date: Fri, 15 May 2009 11:56:52 -0400 Subject: [PATCH] [#1404] Clear GTK-Critical Bug at client startup --- sflphone-client-gnome/src/actions.c | 2 +- sflphone-client-gnome/src/contacts/history.c | 12 ++++++++++-- sflphone-client-gnome/src/contacts/searchbar.c | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 20359285fb..2153c921de 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -78,7 +78,7 @@ status_bar_display_account () acc = account_list_get_current (); if(acc){ - msg = g_markup_printf_escaped(_("Connected to %s (%s)") , + msg = g_markup_printf_escaped(_("Registered to %s (%s)") , (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS), (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE)); } diff --git a/sflphone-client-gnome/src/contacts/history.c b/sflphone-client-gnome/src/contacts/history.c index 541624870d..7999bf3b25 100644 --- a/sflphone-client-gnome/src/contacts/history.c +++ b/sflphone-client-gnome/src/contacts/history.c @@ -32,14 +32,20 @@ static gboolean history_is_visible (GtkTreeModel*, GtkTreeIter*, gpointer); void history_search(GtkEntry* entry UNUSED){ - gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(history_filter)); + + if(history_filter != NULL) { + + gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(history_filter)); + + } } void history_init(){ - + history_filter = history_create_filter(GTK_TREE_MODEL(history->store)); gtk_tree_view_set_model(GTK_TREE_VIEW(history->view), GTK_TREE_MODEL(history_filter)); + } void history_set_searchbar_widget(GtkWidget *searchbar){ @@ -51,7 +57,9 @@ static GtkTreeModel* history_create_filter (GtkTreeModel* child) { GtkTreeModel* ret; + GtkTreePath *path; + DEBUG("Create Filter\n"); ret = gtk_tree_model_filter_new(child, NULL); gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(ret), history_is_visible, NULL, NULL); return GTK_TREE_MODEL(ret); diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c index 4d4a133182..cad09e0670 100644 --- a/sflphone-client-gnome/src/contacts/searchbar.c +++ b/sflphone-client-gnome/src/contacts/searchbar.c @@ -28,7 +28,7 @@ const GdkColor GRAY_COLOR = { 0, 30000, 30000, 30000 }; GtkWidget * searchbox; -void searchbar_entry_changed (GtkEntry* entry, gchar* arg1 UNUSED, gpointer data UNUSED) { +void searchbar_entry_changed (GtkEntry* entry, gchar* arg1 UNUSED, gpointer data UNUSED){ // gtk_widget_grab_focus (GTK_WIDGET(searchbox)); if (active_calltree == contacts) { -- GitLab