mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
Merge branch 'pierre-luc' of git+ssh://repos-sflphone-git@sflphone.org/~/sflphone into pierre-luc
This commit is contained in:
@ -65,50 +65,46 @@ static GtkTreeModel* history_create_filter (GtkTreeModel* child)
|
||||
|
||||
static gboolean history_is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSED)
|
||||
{
|
||||
if (SHOW_SEARCHBAR)
|
||||
GValue val, obj;
|
||||
|
||||
callable_obj_t *history_entry = NULL;
|
||||
gchar* text = NULL;
|
||||
gchar* search = (gchar*)gtk_entry_get_text(GTK_ENTRY(history_searchbar_widget));
|
||||
memset (&val, 0, sizeof(val));
|
||||
memset (&obj, 0, sizeof(obj));
|
||||
|
||||
// Fetch the call description
|
||||
gtk_tree_model_get_value (GTK_TREE_MODEL(model), iter, 1, &val);
|
||||
if(G_VALUE_HOLDS_STRING(&val)){
|
||||
text = (gchar *)g_value_get_string(&val);
|
||||
}
|
||||
|
||||
// Fetch the call type
|
||||
gtk_tree_model_get_value (GTK_TREE_MODEL(model), iter, 2, &obj);
|
||||
if (G_VALUE_HOLDS_POINTER (&obj)){
|
||||
history_entry = (gpointer) g_value_get_pointer (&obj);
|
||||
}
|
||||
|
||||
if(text != NULL)
|
||||
{
|
||||
GValue val, obj;
|
||||
|
||||
callable_obj_t *history_entry = NULL;
|
||||
gchar* text = NULL;
|
||||
gchar* search = (gchar*)gtk_entry_get_text(GTK_ENTRY(history_searchbar_widget));
|
||||
memset (&val, 0, sizeof(val));
|
||||
memset (&obj, 0, sizeof(obj));
|
||||
|
||||
// Fetch the call description
|
||||
gtk_tree_model_get_value (GTK_TREE_MODEL(model), iter, 1, &val);
|
||||
if(G_VALUE_HOLDS_STRING(&val)){
|
||||
text = (gchar *)g_value_get_string(&val);
|
||||
}
|
||||
|
||||
// Fetch the call type
|
||||
gtk_tree_model_get_value (GTK_TREE_MODEL(model), iter, 2, &obj);
|
||||
if (G_VALUE_HOLDS_POINTER (&obj)){
|
||||
history_entry = (gpointer) g_value_get_pointer (&obj);
|
||||
}
|
||||
|
||||
if(text != NULL)
|
||||
if (history_entry)
|
||||
{
|
||||
if (history_entry)
|
||||
// Filter according to the type of call
|
||||
// MISSED, INCOMING, OUTGOING, ALL
|
||||
if ((int)get_current_history_search_type () == SEARCH_ALL)
|
||||
return g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
|
||||
else
|
||||
{
|
||||
// Filter according to the type of call
|
||||
// MISSED, INCOMING, OUTGOING, ALL
|
||||
if ((int)get_current_history_search_type () == SEARCH_ALL)
|
||||
return g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
|
||||
else
|
||||
{
|
||||
// We need a match on the history_state_t and the current search type
|
||||
return (history_entry->_history_state + 1) == (int)get_current_history_search_type () &&
|
||||
g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
|
||||
}
|
||||
// We need a match on the history_state_t and the current search type
|
||||
return (history_entry->_history_state + 1) == (int)get_current_history_search_type () &&
|
||||
g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up
|
||||
g_value_unset (&val);
|
||||
g_value_unset (&obj);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Clean up
|
||||
g_value_unset (&val);
|
||||
g_value_unset (&obj);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -34,6 +34,8 @@
|
||||
#include <actions.h>
|
||||
#include <string.h>
|
||||
|
||||
#define DEFAULT_DBUS_TIMEOUT 30000
|
||||
|
||||
DBusGConnection * connection;
|
||||
DBusGProxy * callManagerProxy;
|
||||
DBusGProxy * configurationManagerProxy;
|
||||
@ -389,6 +391,12 @@ dbus_connect ()
|
||||
"errorAlert", G_TYPE_INT , G_TYPE_INVALID);
|
||||
dbus_g_proxy_connect_signal (configurationManagerProxy,
|
||||
"errorAlert", G_CALLBACK(error_alert), NULL, NULL);
|
||||
|
||||
/* Defines a default timeout for the proxies */
|
||||
dbus_g_proxy_set_default_timeout(callManagerProxy, DEFAULT_DBUS_TIMEOUT);
|
||||
dbus_g_proxy_set_default_timeout(instanceProxy, DEFAULT_DBUS_TIMEOUT);
|
||||
dbus_g_proxy_set_default_timeout(configurationManagerProxy, DEFAULT_DBUS_TIMEOUT);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -197,21 +197,9 @@ create_main_window ()
|
||||
gtk_box_pack_start (GTK_BOX (vbox), history->tree, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), contacts->tree, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
|
||||
|
||||
// gtk_box_pack_start (GTK_BOX (vbox), current_calls->searchbar, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
|
||||
// gtk_box_pack_start (GTK_BOX (vbox), history->searchbar, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
|
||||
// gtk_box_pack_start (GTK_BOX (vbox), contacts ->searchbar, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), subvbox, FALSE /*expand*/, FALSE /*fill*/, 0 /*padding*/);
|
||||
|
||||
|
||||
// if( SHOW_SEARCHBAR ){
|
||||
// filterEntry = create_filter_entry();
|
||||
// gtk_box_pack_start (GTK_BOX (subvbox), filterEntry, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
|
||||
// gtk_widget_show_all ( filterEntry );
|
||||
// }
|
||||
|
||||
|
||||
if( SHOW_VOLUME ){
|
||||
if( SHOW_VOLUME ){
|
||||
speaker_control = create_slider("speaker");
|
||||
gtk_box_pack_end (GTK_BOX (subvbox), speaker_control, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
|
||||
gtk_widget_show_all (speaker_control);
|
||||
@ -350,22 +338,6 @@ main_window_volume_controls( gboolean *state ){
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
main_window_searchbar( gboolean *state UNUSED){
|
||||
if( !SHOW_SEARCHBAR )
|
||||
{
|
||||
// filterEntry = create_filter_entry();
|
||||
// gtk_box_pack_start (GTK_BOX (subvbox), filterEntry, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
|
||||
// gtk_widget_show_all (filterEntry);
|
||||
// *state = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// gtk_container_remove( GTK_CONTAINER(subvbox) , filterEntry );
|
||||
// *state = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
statusbar_push_message(const gchar * message, guint id)
|
||||
{
|
||||
|
@ -90,8 +90,6 @@ void statusbar_push_message( const gchar* message , guint id );
|
||||
*/
|
||||
void statusbar_pop_message( guint id );
|
||||
|
||||
void main_window_searchbar( gboolean *state );
|
||||
|
||||
//static gboolean
|
||||
//on_key_released (GtkWidget *widget, GdkEventKey *event,
|
||||
// gpointer user_data);
|
||||
|
@ -614,16 +614,7 @@ view_volume_controls (GtkImageMenuItem *imagemenuitem UNUSED,
|
||||
dbus_set_volume_controls( state );
|
||||
}
|
||||
|
||||
/*
|
||||
static void
|
||||
view_searchbar (GtkImageMenuItem *imagemenuitem UNUSED,
|
||||
void* foo UNUSED)
|
||||
{
|
||||
gboolean state;
|
||||
main_window_searchbar( &state );
|
||||
dbus_set_searchbar( state );
|
||||
}
|
||||
*/
|
||||
|
||||
GtkWidget *
|
||||
create_view_menu()
|
||||
{
|
||||
|
@ -77,8 +77,6 @@ log4c_category_t* log4c_sfl_gtk_category;
|
||||
#define SHOW_DIALPAD ( dbus_get_dialpad() )
|
||||
/** Show/Hide the volume controls */
|
||||
#define SHOW_VOLUME ( dbus_get_volume_controls() )
|
||||
/** Show/Hide the dialpad */
|
||||
#define SHOW_SEARCHBAR ( dbus_get_searchbar() )
|
||||
/** Show/Hide the alsa configuration panel */
|
||||
#define SHOW_ALSA_CONF ( dbus_get_audio_manager() == ALSA )
|
||||
|
||||
|
Reference in New Issue
Block a user