Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
2c40dc8c
Commit
2c40dc8c
authored
Oct 04, 2007
by
Pierre-Luc Beaudoin
Browse files
Configuration window's account list gets updated
parent
0f2fc64d
Changes
3
Hide whitespace changes
Inline
Side-by-side
sflphone-gtk/src/configwindow.c
View file @
2c40dc8c
...
...
@@ -27,6 +27,7 @@
#include
<gtk/gtk.h>
/** Local variables */
gboolean
dialogOpen
=
FALSE
;
GtkListStore
*
account_store
;
GtkWidget
*
addButton
;
GtkWidget
*
editButton
;
...
...
@@ -36,31 +37,34 @@ account_t * selectedAccount;
/** Fills the treelist with accounts */
void
fill_account_list
()
config_window_
fill_account_list
()
{
GtkTreeIter
iter
;
if
(
dialogOpen
)
{
GtkTreeIter
iter
;
gtk_list_store_clear
(
account_store
);
int
i
;
for
(
i
=
0
;
i
<
account_list_get_size
();
i
++
)
{
account_t
*
a
=
account_list_get_nth
(
i
);
if
(
a
)
{
gtk_list_store_append
(
account_store
,
&
iter
);
gtk_list_store_set
(
account_store
,
&
iter
,
0
,
g_hash_table_lookup
(
a
->
properties
,
ACCOUNT_ALIAS
),
// Name
1
,
g_hash_table_lookup
(
a
->
properties
,
ACCOUNT_TYPE
),
// Protocol
2
,
account_state_name
(
a
->
state
),
// Status
3
,
a
,
// Pointer
-
1
);
gtk_list_store_clear
(
account_store
);
int
i
;
for
(
i
=
0
;
i
<
account_list_get_size
();
i
++
)
{
account_t
*
a
=
account_list_get_nth
(
i
);
if
(
a
)
{
gtk_list_store_append
(
account_store
,
&
iter
);
gtk_list_store_set
(
account_store
,
&
iter
,
0
,
g_hash_table_lookup
(
a
->
properties
,
ACCOUNT_ALIAS
),
// Name
1
,
g_hash_table_lookup
(
a
->
properties
,
ACCOUNT_TYPE
),
// Protocol
2
,
account_state_name
(
a
->
state
),
// Status
3
,
a
,
// Pointer
-
1
);
}
}
gtk_widget_set_sensitive
(
GTK_WIDGET
(
editButton
),
FALSE
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
deleteButton
),
FALSE
);
}
}
gtk_widget_set_sensitive
(
GTK_WIDGET
(
editButton
),
FALSE
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
deleteButton
),
FALSE
);
}
}
/**
* Delete an account
...
...
@@ -224,7 +228,7 @@ create_accounts_tab()
gtk_widget_show_all
(
ret
);
fill_account_list
();
config_window_
fill_account_list
();
return
ret
;
}
...
...
@@ -235,6 +239,8 @@ show_config_window ()
GtkDialog
*
dialog
;
GtkWidget
*
notebook
;
GtkWidget
*
tab
;
dialogOpen
=
TRUE
;
dialog
=
GTK_DIALOG
(
gtk_dialog_new_with_buttons
(
"Preferences"
,
GTK_WINDOW
(
get_main_window
()),
...
...
@@ -258,6 +264,8 @@ show_config_window ()
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
tab
);
gtk_dialog_run
(
dialog
);
dialogOpen
=
FALSE
;
gtk_widget_destroy
(
GTK_WIDGET
(
dialog
));
}
...
...
sflphone-gtk/src/configwindow.h
View file @
2c40dc8c
...
...
@@ -26,6 +26,6 @@
* @brief The Preferences window.
*/
void
show_config_window
(
);
void
config_window_fill_account_list
(
);
#endif
sflphone-gtk/src/dbus.c
View file @
2c40dc8c
...
...
@@ -17,12 +17,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include
<accountlist.h>
#include
<calllist.h>
#include
<callmanager-glue.h>
#include
<configurationmanager-glue.h>
#include
<calllist.h>
#include
<accountlist.h>
#include
<marshaller.h>
#include
<configwindow.h>
#include
<mainwindow.h>
#include
<marshaller.h>
#include
<sliders.h>
#include
<dbus.h>
...
...
@@ -142,7 +143,7 @@ accounts_changed_cb (DBusGProxy *proxy,
{
g_print
(
"Accounts changed
\n
"
);
sflphone_fill_account_list
();
// TODO reload
list
config_window_fill_account_
list
();
}
gboolean
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment