From 083f8250ca6c933bf046674361bb3cc46362f6d4 Mon Sep 17 00:00:00 2001
From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
Date: Tue, 20 May 2008 17:27:40 -0400
Subject: [PATCH] GTK warnings removal

---
 sflphone-gtk/src/actions.c       | 2 +-
 sflphone-gtk/src/historyfilter.c | 5 ++++-
 sflphone-gtk/src/menus.c         | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c
index be4603583e..b98a75e06f 100644
--- a/sflphone-gtk/src/actions.c
+++ b/sflphone-gtk/src/actions.c
@@ -197,7 +197,7 @@ sflphone_init()
 	int i;
 	current_calls = calltab_init();
 	history = calltab_init();	
-	histfilter = create_filter(GTK_TREE_MODEL(history->store));
+	if(SHOW_SEARCHBAR)  histfilter = create_filter(GTK_TREE_MODEL(history->store));
 	account_list_init ();
         codec_list_init();
 	if(!dbus_connect ()){
diff --git a/sflphone-gtk/src/historyfilter.c b/sflphone-gtk/src/historyfilter.c
index 86aa6f4111..0f68c8ba38 100644
--- a/sflphone-gtk/src/historyfilter.c
+++ b/sflphone-gtk/src/historyfilter.c
@@ -31,6 +31,8 @@ create_filter(GtkTreeModel* child)
 gboolean
 is_visible(GtkTreeModel* model, GtkTreeIter* iter, gpointer data)
 {
+  if( SHOW_SEARCHBAR )
+  {
 	GValue val = {0, };
 	gchar* text;
 	gchar* search = (gchar*)gtk_entry_get_text(GTK_ENTRY(filter_entry));
@@ -42,6 +44,8 @@ is_visible(GtkTreeModel* model, GtkTreeIter* iter, gpointer data)
 		return g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
  	}
 	return TRUE;
+  }
+  return TRUE;
 } 
 
 void
@@ -56,7 +60,6 @@ clear_filter_entry_if_default(GtkWidget* widget, gpointer user_data)
 {
 	if(g_ascii_strncasecmp(gtk_entry_get_text(GTK_ENTRY(filter_entry)), "Search", 6) == 0)
 		gtk_entry_set_text(GTK_ENTRY(filter_entry), "");
-	
 }
 
 GtkWidget*
diff --git a/sflphone-gtk/src/menus.c b/sflphone-gtk/src/menus.c
index 764a9f28bc..d9f8acfd2d 100644
--- a/sflphone-gtk/src/menus.c
+++ b/sflphone-gtk/src/menus.c
@@ -499,7 +499,7 @@ clear_history( void* foo )
     dialog = gtk_message_dialog_new_with_markup ( GTK_WINDOW(get_main_window()),
 							    GTK_DIALOG_DESTROY_WITH_PARENT,
 							    GTK_MESSAGE_INFO,
-							    GTK_BUTTONS_OK,
+							    GTK_BUTTONS_CLOSE,
 							    markup);
     response = gtk_dialog_run (GTK_DIALOG(dialog));
     gtk_widget_destroy (GTK_WIDGET(dialog));
-- 
GitLab