Skip to content
Snippets Groups Projects
Commit 2c40dc8c authored by Pierre-Luc Beaudoin's avatar Pierre-Luc Beaudoin
Browse files

Configuration window's account list gets updated

parent 0f2fc64d
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
/** Local variables */ /** Local variables */
gboolean dialogOpen = FALSE;
GtkListStore *account_store; GtkListStore *account_store;
GtkWidget * addButton; GtkWidget * addButton;
GtkWidget * editButton; GtkWidget * editButton;
...@@ -36,7 +37,9 @@ account_t * selectedAccount; ...@@ -36,7 +37,9 @@ account_t * selectedAccount;
/** Fills the treelist with accounts */ /** Fills the treelist with accounts */
void void
fill_account_list () config_window_fill_account_list ()
{
if(dialogOpen)
{ {
GtkTreeIter iter; GtkTreeIter iter;
...@@ -62,6 +65,7 @@ fill_account_list () ...@@ -62,6 +65,7 @@ fill_account_list ()
gtk_widget_set_sensitive( GTK_WIDGET(editButton), FALSE); gtk_widget_set_sensitive( GTK_WIDGET(editButton), FALSE);
gtk_widget_set_sensitive( GTK_WIDGET(deleteButton), FALSE); gtk_widget_set_sensitive( GTK_WIDGET(deleteButton), FALSE);
} }
}
/** /**
* Delete an account * Delete an account
*/ */
...@@ -224,7 +228,7 @@ create_accounts_tab() ...@@ -224,7 +228,7 @@ create_accounts_tab()
gtk_widget_show_all(ret); gtk_widget_show_all(ret);
fill_account_list(); config_window_fill_account_list();
return ret; return ret;
} }
...@@ -236,6 +240,8 @@ show_config_window () ...@@ -236,6 +240,8 @@ show_config_window ()
GtkWidget * notebook; GtkWidget * notebook;
GtkWidget * tab; GtkWidget * tab;
dialogOpen = TRUE;
dialog = GTK_DIALOG(gtk_dialog_new_with_buttons ("Preferences", dialog = GTK_DIALOG(gtk_dialog_new_with_buttons ("Preferences",
GTK_WINDOW(get_main_window()), GTK_WINDOW(get_main_window()),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
...@@ -259,6 +265,8 @@ show_config_window () ...@@ -259,6 +265,8 @@ show_config_window ()
gtk_dialog_run (dialog); gtk_dialog_run (dialog);
dialogOpen = FALSE;
gtk_widget_destroy (GTK_WIDGET(dialog)); gtk_widget_destroy (GTK_WIDGET(dialog));
} }
...@@ -26,6 +26,6 @@ ...@@ -26,6 +26,6 @@
* @brief The Preferences window. * @brief The Preferences window.
*/ */
void show_config_window ( ); void show_config_window ( );
void config_window_fill_account_list ( );
#endif #endif
...@@ -17,12 +17,13 @@ ...@@ -17,12 +17,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include <accountlist.h>
#include <calllist.h>
#include <callmanager-glue.h> #include <callmanager-glue.h>
#include <configurationmanager-glue.h> #include <configurationmanager-glue.h>
#include <calllist.h> #include <configwindow.h>
#include <accountlist.h>
#include <marshaller.h>
#include <mainwindow.h> #include <mainwindow.h>
#include <marshaller.h>
#include <sliders.h> #include <sliders.h>
#include <dbus.h> #include <dbus.h>
...@@ -142,7 +143,7 @@ accounts_changed_cb (DBusGProxy *proxy, ...@@ -142,7 +143,7 @@ accounts_changed_cb (DBusGProxy *proxy,
{ {
g_print ("Accounts changed\n"); g_print ("Accounts changed\n");
sflphone_fill_account_list(); sflphone_fill_account_list();
// TODO reload list config_window_fill_account_list();
} }
gboolean gboolean
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment