From b4da51927874017ab849f0377f263a7c3d7319d2 Mon Sep 17 00:00:00 2001 From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Date: Mon, 21 Apr 2008 12:37:03 -0400 Subject: [PATCH] Ticket#61 resolved - call_list_remove when no accounts --- sflphone-gtk/src/actions.c | 8 ++++++++ sflphone-gtk/src/configwindow.c | 1 + sflphone-gtk/src/sflnotify.c | 5 ++--- sflphone-gtk/src/sflphone_const.h | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index 1eaa1c32b8..2025c43794 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -590,9 +590,17 @@ sflphone_place_call ( call_t * c ) if(c->state == CALL_STATE_DIALING) { if( account_list_get_size() == 0 ) + { notify_no_accounts(); + call_list_remove(current_calls , c->callID); + update_call_tree_remove(current_calls, c); + } else if( account_list_get_by_state( ACCOUNT_STATE_REGISTERED ) == NULL ) + { notify_no_registered_accounts(); + call_list_remove(current_calls , c->callID); + update_call_tree_remove(current_calls, c); + } else { account_t * current = account_list_get_current(); diff --git a/sflphone-gtk/src/configwindow.c b/sflphone-gtk/src/configwindow.c index d43ec5b6e5..e89ef3c984 100644 --- a/sflphone-gtk/src/configwindow.c +++ b/sflphone-gtk/src/configwindow.c @@ -1360,6 +1360,7 @@ show_accounts_window( void ) gtk_container_add(GTK_CONTAINER(accountFrame) , tab); gtk_dialog_run( dialog ); + dialogOpen=FALSE; gtk_widget_destroy(GTK_WIDGET(dialog)); } diff --git a/sflphone-gtk/src/sflnotify.c b/sflphone-gtk/src/sflnotify.c index 14b17ff8af..d29fec3dc7 100644 --- a/sflphone-gtk/src/sflnotify.c +++ b/sflphone-gtk/src/sflnotify.c @@ -34,8 +34,6 @@ notify_incoming_call( call_t* c ) (gchar*)g_hash_table_lookup(account_list_get_by_id(c->accountID)->properties , ACCOUNT_ALIAS) ) ; callerid = g_markup_printf_escaped(_("<i>From:</i> %s") , c->from); - - //pixbuf = gdk_pixbuf_new_from_file(ICON_DIR "/sflphone.png", NULL); pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/ring.svg", NULL); notification = notify_notification_new( title, @@ -175,8 +173,9 @@ notify_no_accounts( ) void setup_accounts_cb( NotifyNotification *notification, gpointer data ) { + //gtk_widget_set_parent( show_accounts_window() , GTK_WIDGET(get_main_window())); show_accounts_window(); - //g_object_unref( notification ); + g_object_unref( notification ); } void diff --git a/sflphone-gtk/src/sflphone_const.h b/sflphone-gtk/src/sflphone_const.h index b3b565949d..9ddd22e2a2 100644 --- a/sflphone-gtk/src/sflphone_const.h +++ b/sflphone-gtk/src/sflphone_const.h @@ -87,6 +87,6 @@ /** Desktop notifications - Time before to close the notification*/ #define __TIMEOUT_MODE "default" /** Desktop notifications - Time before to close the notification*/ -#define __TIMEOUT_TIME 30000 // 30 secondes +#define __TIMEOUT_TIME 18000 // 30 secondes #endif -- GitLab