From 3e697b527686121c817065dbffc35b5826042846 Mon Sep 17 00:00:00 2001 From: Emmanuel Milou <emilou@emilou-desktop.(none)> Date: Fri, 29 May 2009 17:35:28 -0400 Subject: [PATCH] Clean up some gnome client warnings --- sflphone-client-gnome/src/assistant.c | 5 +--- sflphone-client-gnome/src/call.c | 2 -- .../src/config/accountwindow.c | 2 +- .../src/config/accountwindow.h | 2 ++ sflphone-client-gnome/src/config/audioconf.c | 4 +-- .../src/config/configwindow.c | 10 +++---- .../src/config/hooks-config.h | 1 + sflphone-client-gnome/src/contacts/calltree.c | 30 ------------------- sflphone-client-gnome/src/contacts/history.c | 1 - .../src/contacts/searchbar.c | 2 -- sflphone-client-gnome/src/dbus/dbus.c | 6 ++-- sflphone-client-gnome/src/dbus/dbus.h | 2 +- sflphone-client-gnome/src/toolbar.h | 1 + 13 files changed, 17 insertions(+), 51 deletions(-) diff --git a/sflphone-client-gnome/src/assistant.c b/sflphone-client-gnome/src/assistant.c index 374ea0539f..30bfa13e2d 100644 --- a/sflphone-client-gnome/src/assistant.c +++ b/sflphone-client-gnome/src/assistant.c @@ -135,8 +135,7 @@ static void iax_apply_callback( void ) { sprintf(message, MESSAGE_SUMMARY, gtk_entry_get_text (GTK_ENTRY(wiz->iax_alias)), gtk_entry_get_text (GTK_ENTRY(wiz->iax_server)), - gtk_entry_get_text (GTK_ENTRY(wiz->iax_username)), - gtk_entry_get_text (GTK_ENTRY(wiz->iax_password)) + gtk_entry_get_text (GTK_ENTRY(wiz->iax_username)) ) ; gtk_label_set_text (GTK_LABEL(wiz->label_summary), message); } @@ -231,7 +230,6 @@ GtkWidget* build_sfl_or_account() { GtkWidget* build_sip_account_configuration( void ) { GtkWidget* table; GtkWidget* label; - GtkWidget* image; wiz->sip_account = create_vbox( GTK_ASSISTANT_PAGE_CONTENT , _("SIP account configuration") , _("Please fill the following information:")); // table @@ -327,7 +325,6 @@ GtkWidget* build_email_configuration( void ) { GtkWidget* build_iax_account_configuration( void ) { GtkWidget* label; GtkWidget* table; - GtkWidget* image; wiz->iax_account = create_vbox( GTK_ASSISTANT_PAGE_CONFIRM , _("IAX2 account configuration") , _("Please fill the following information:")); diff --git a/sflphone-client-gnome/src/call.c b/sflphone-client-gnome/src/call.c index 535089ce50..db54481f02 100644 --- a/sflphone-client-gnome/src/call.c +++ b/sflphone-client-gnome/src/call.c @@ -89,8 +89,6 @@ void create_new_call (gchar *to, gchar *from, call_state_t state, gchar *account call->_start = 0; call->_stop = 0; - DEBUG () - call_id = g_new0(gchar, 30); g_sprintf(call_id, "%d", rand()); call->callID = g_strdup (call_id); diff --git a/sflphone-client-gnome/src/config/accountwindow.c b/sflphone-client-gnome/src/config/accountwindow.c index 1058d295b6..412c8936df 100644 --- a/sflphone-client-gnome/src/config/accountwindow.c +++ b/sflphone-client-gnome/src/config/accountwindow.c @@ -21,6 +21,7 @@ #include <actions.h> #include <mainwindow.h> #include <accountlist.h> +#include <accountwindow.h> // From version 2.16, gtk provides the functionalities libsexy used to provide #if GTK_CHECK_VERSION(2,16,0) @@ -71,7 +72,6 @@ is_iax_enabled(void) show_account_window (account_t * a) { gint response; - GtkWidget *image; currentAccount = a; diff --git a/sflphone-client-gnome/src/config/accountwindow.h b/sflphone-client-gnome/src/config/accountwindow.h index 2b393a332d..c7e5e53e0b 100644 --- a/sflphone-client-gnome/src/config/accountwindow.h +++ b/sflphone-client-gnome/src/config/accountwindow.h @@ -24,6 +24,8 @@ * @brief The window to edit account details. */ +#include "utils.h" +#include "configwindow.h" /** * Display the main account widget diff --git a/sflphone-client-gnome/src/config/audioconf.c b/sflphone-client-gnome/src/config/audioconf.c index 7d4e0ee0ac..eba7d7e438 100644 --- a/sflphone-client-gnome/src/config/audioconf.c +++ b/sflphone-client-gnome/src/config/audioconf.c @@ -393,9 +393,9 @@ codec_active_toggled(GtkCellRendererToggle *renderer UNUSED, gchar *path, gpoint // printf("%s, %s\n", name, srate); // codec_list_get_by_name(name); - if ((strcmp(name,"speex")==0) && (strcmp(srate,"8 kHz")==0)) + if ((g_strcasecmp(name,"speex")==0) && (g_strcasecmp(srate,"8 kHz")==0)) codec = codec_list_get_by_payload(110); - else if ((strcmp(name,"speex")==0) && (strcmp(srate,"16 kHz")==0)) + else if ((g_strcasecmp(name,"speex")==0) && (g_strcasecmp(srate,"16 kHz")==0)) codec = codec_list_get_by_payload(111); else codec = codec_list_get_by_name(name); diff --git a/sflphone-client-gnome/src/config/configwindow.c b/sflphone-client-gnome/src/config/configwindow.c index 983cb2e207..68341875aa 100644 --- a/sflphone-client-gnome/src/config/configwindow.c +++ b/sflphone-client-gnome/src/config/configwindow.c @@ -758,7 +758,12 @@ create_recording_settings () return ret; } +void save_configuration_parameters (void) { + addressbook_config_save_parameters (); + hooks_save_parameters (); + +} /** * Show configuration window with tabs @@ -890,9 +895,4 @@ void config_window_set_stun_visible() gtk_widget_set_sensitive( GTK_WIDGET(stunFrame), TRUE ); } -void save_configuration_parameters (void) { - addressbook_config_save_parameters (); - hooks_save_parameters (); - -} diff --git a/sflphone-client-gnome/src/config/hooks-config.h b/sflphone-client-gnome/src/config/hooks-config.h index d4651fbe37..3d8c303b0a 100644 --- a/sflphone-client-gnome/src/config/hooks-config.h +++ b/sflphone-client-gnome/src/config/hooks-config.h @@ -24,6 +24,7 @@ #include <glib/gtypes.h> #include "actions.h" +#include "utils.h" G_BEGIN_DECLS diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 34b9dbe689..d9e06066de 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -149,32 +149,6 @@ button_pressed(GtkWidget* widget, GdkEventButton *event, gpointer user_data UNUS return FALSE; } - - static gboolean -on_key_released (GtkWidget *widget UNUSED, - GdkEventKey *event, - gpointer user_data UNUSED) -{ - DEBUG("key-release-event signal cought by on_key_released callback \n"); - // If a modifier key is pressed, it's a shortcut, pass along - if(event->state & GDK_CONTROL_MASK || - event->state & GDK_MOD1_MASK || - event->keyval == 60 || // < - event->keyval == 62 || // > - event->keyval == 34 || // " - event->keyval == 65361 || // left arrow - event->keyval == 65363 || // right arrow - event->keyval >= 65470 || // F-keys - event->keyval == 32 // space - ) - return FALSE; - else - sflphone_keypad(event->keyval, event->string); - - - return TRUE; -} - /** * Reset call tree */ @@ -451,10 +425,6 @@ calltree_add_call (calltab_t* tab, call_t * c) GdkPixbuf *pixbuf=NULL; GtkTreeIter iter; - GtkTreeSelection* sel; - GtkTreeModel *model; - GtkTreePath *path; - // New call in the list gchar * description; diff --git a/sflphone-client-gnome/src/contacts/history.c b/sflphone-client-gnome/src/contacts/history.c index f60bb78641..0c99c597d9 100644 --- a/sflphone-client-gnome/src/contacts/history.c +++ b/sflphone-client-gnome/src/contacts/history.c @@ -57,7 +57,6 @@ static GtkTreeModel* history_create_filter (GtkTreeModel* child) { GtkTreeModel* ret; - GtkTreePath *path; DEBUG("Create Filter\n"); ret = gtk_tree_model_filter_new(child, NULL); diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c index b2c1ae6215..4851c4f06f 100644 --- a/sflphone-client-gnome/src/contacts/searchbar.c +++ b/sflphone-client-gnome/src/contacts/searchbar.c @@ -87,8 +87,6 @@ searchbar_init(calltab_t *tab) GtkWidget* searchbar_new(gchar* searchbar_type) { - // GtkWidget * searchbox; - GtkWidget* image; GtkWidget* ret = gtk_hbox_new(FALSE, 0); #if GTK_CHECK_VERSION(2,16,0) diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index e395c73b97..d3b6dd97f5 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -540,10 +540,10 @@ dbus_set_account_details(account_t *a) } } -guint +gchar* dbus_add_account(account_t *a) { - gint accountId; + gchar* accountId; GError *error = NULL; org_sflphone_SFLphone_ConfigurationManager_add_account ( configurationManagerProxy, @@ -556,7 +556,7 @@ dbus_add_account(account_t *a) error->message); g_error_free (error); } - return (guint) accountId; + return accountId; } void diff --git a/sflphone-client-gnome/src/dbus/dbus.h b/sflphone-client-gnome/src/dbus/dbus.h index 7d6c02686d..1a489703cd 100644 --- a/sflphone-client-gnome/src/dbus/dbus.h +++ b/sflphone-client-gnome/src/dbus/dbus.h @@ -120,7 +120,7 @@ void dbus_send_register( gchar* accountID , const guint expire ); * ConfigurationManager - Add an account to the list * @param a The account to add */ -guint dbus_add_account(account_t *a); +gchar* dbus_add_account(account_t *a); /** * ConfigurationManager - Remove an account from the list diff --git a/sflphone-client-gnome/src/toolbar.h b/sflphone-client-gnome/src/toolbar.h index bddeb2cb7d..7c967cfc34 100644 --- a/sflphone-client-gnome/src/toolbar.h +++ b/sflphone-client-gnome/src/toolbar.h @@ -24,6 +24,7 @@ #include <gtk/gtk.h> #include <menus.h> #include <sflphone_const.h> +#include <actions.h> GtkWidget * toolbar; GtkToolItem * pickupButton; -- GitLab