Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
2c40dc8c
Commit
2c40dc8c
authored
17 years ago
by
Pierre-Luc Beaudoin
Browse files
Options
Downloads
Patches
Plain Diff
Configuration window's account list gets updated
parent
0f2fc64d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sflphone-gtk/src/configwindow.c
+31
-23
31 additions, 23 deletions
sflphone-gtk/src/configwindow.c
sflphone-gtk/src/configwindow.h
+1
-1
1 addition, 1 deletion
sflphone-gtk/src/configwindow.h
sflphone-gtk/src/dbus.c
+5
-4
5 additions, 4 deletions
sflphone-gtk/src/dbus.c
with
37 additions
and
28 deletions
sflphone-gtk/src/configwindow.c
+
31
−
23
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
));
}
...
...
This diff is collapsed.
Click to expand it.
sflphone-gtk/src/configwindow.h
+
1
−
1
View file @
2c40dc8c
...
...
@@ -26,6 +26,6 @@
* @brief The Preferences window.
*/
void
show_config_window
(
);
void
config_window_fill_account_list
(
);
#endif
This diff is collapsed.
Click to expand it.
sflphone-gtk/src/dbus.c
+
5
−
4
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment