Commit bec7dd15 authored by Tristan Matthews's avatar Tristan Matthews

* #9490: cleanup

parent e69030fb
......@@ -75,8 +75,7 @@ static gint get_state_struct(gconstpointer a, gconstpointer b)
void account_list_init()
{
if (accountQueue)
account_list_free();
account_list_free();
accountQueue = g_queue_new();
}
......@@ -200,9 +199,11 @@ void account_list_free_elm(gpointer elm, gpointer data UNUSED)
void account_list_free()
{
g_queue_foreach(accountQueue, account_list_free_elm, NULL);
g_queue_free(accountQueue);
accountQueue = NULL;
if (accountQueue) {
g_queue_foreach(accountQueue, account_list_free_elm, NULL);
g_queue_free(accountQueue);
accountQueue = NULL;
}
}
void
......
......@@ -57,7 +57,6 @@
#include "actions.h"
#include "dbus/dbus.h"
#include "logger.h"
#include "config/accountlistconfigdialog.h"
#include "contacts/calltab.h"
#include "contacts/searchbar.h"
#include "contacts/addrbookfactory.h"
......@@ -122,13 +121,12 @@ static gboolean is_direct_call(callable_obj_t * c)
void
status_bar_display_account()
{
gchar* msg;
statusbar_pop_message(__MSG_ACCOUNT_DEFAULT);
account_t *acc = account_list_get_current();
status_tray_icon_online(acc != NULL);
gchar* msg;
if (acc) {
msg = g_markup_printf_escaped("%s %s (%s)" ,
_("Using account"),
......@@ -253,7 +251,6 @@ void sflphone_fill_account_list(void)
// Set the current account message number
current_account_set_message_number(current_account_get_message_number());
account_store_fill();
}
gboolean sflphone_init(GError **error)
......
......@@ -172,7 +172,8 @@ void sflphone_fill_ip2ip_profile(void);
GHashTable *sflphone_get_ip2ip_properties(void);
/**
* Initialize the accounts data structure
* Get a list of accounts from the daemon and load them into account_t
* structures.
*/
void sflphone_fill_account_list();
......
......@@ -44,7 +44,6 @@
static const int CONTEXT_ID_REGISTRATION = 0;
static GtkWidget *add_button;
static GtkWidget *edit_button;
static GtkWidget *delete_button;
static GtkWidget *move_down_button;
......@@ -516,7 +515,7 @@ create_account_list()
g_signal_connect(G_OBJECT(move_down_button), "clicked",
G_CALLBACK(move_down_cb), tree_view);
add_button = gtk_button_new_from_stock(GTK_STOCK_ADD);
GtkWidget *add_button = gtk_button_new_from_stock(GTK_STOCK_ADD);
g_signal_connect_swapped(G_OBJECT(add_button), "clicked",
G_CALLBACK(add_account_cb), NULL);
gtk_box_pack_start(GTK_BOX(button_box), add_button, FALSE, FALSE, 0);
......
......@@ -112,7 +112,6 @@ main(int argc, char *argv[])
set_minimized(TRUE);
}
status_bar_display_account();
sflphone_fill_history();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment