Skip to content
Snippets Groups Projects
Commit 6d0544b0 authored by Florian DESPORTES's avatar Florian DESPORTES
Browse files

Prevent from opening two assistants

parent 950784c3
Branches
Tags
No related merge requests found
...@@ -41,11 +41,13 @@ set_account_type( GtkWidget* widget , gpointer data ) ...@@ -41,11 +41,13 @@ set_account_type( GtkWidget* widget , gpointer data )
static void close_callback( void ) static void close_callback( void )
{ {
gtk_widget_destroy(wiz->assistant); gtk_widget_destroy(wiz->assistant);
g_free(wiz); wiz = NULL;
} }
static void cancel_callback( void ) static void cancel_callback( void )
{ {
gtk_widget_destroy(wiz->assistant); gtk_widget_destroy(wiz->assistant);
g_free(wiz); wiz = NULL;
} }
static void static void
...@@ -98,6 +100,7 @@ enable_stun( GtkWidget* widget ) ...@@ -98,6 +100,7 @@ enable_stun( GtkWidget* widget )
void void
build_wizard( void ) build_wizard( void )
{ {
if(!wiz){
wiz = ( struct _wizard* )g_malloc( sizeof( struct _wizard)); wiz = ( struct _wizard* )g_malloc( sizeof( struct _wizard));
current = g_new0(account_t, 1); current = g_new0(account_t, 1);
current->properties = g_hash_table_new(NULL, g_str_equal); current->properties = g_hash_table_new(NULL, g_str_equal);
...@@ -123,7 +126,7 @@ build_wizard( void ) ...@@ -123,7 +126,7 @@ build_wizard( void )
gtk_widget_show_all(wiz->assistant); gtk_widget_show_all(wiz->assistant);
gtk_assistant_update_buttons_state(GTK_ASSISTANT(wiz->assistant)); gtk_assistant_update_buttons_state(GTK_ASSISTANT(wiz->assistant));
}
} }
GtkWidget* GtkWidget*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment