aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-29 20:35:11 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-29 20:37:22 +0800
commit889cbf11540c152be0e1c2d63758e5da8bd10a5f (patch)
tree06390032031f315f751e5b5f107cf901b9b24971 /src
parent9af483fa1412dcabc982f1908b23c979039f211c (diff)
downloadgsoc2013-empathy-889cbf11540c152be0e1c2d63758e5da8bd10a5f.tar
gsoc2013-empathy-889cbf11540c152be0e1c2d63758e5da8bd10a5f.tar.gz
gsoc2013-empathy-889cbf11540c152be0e1c2d63758e5da8bd10a5f.tar.bz2
gsoc2013-empathy-889cbf11540c152be0e1c2d63758e5da8bd10a5f.tar.lz
gsoc2013-empathy-889cbf11540c152be0e1c2d63758e5da8bd10a5f.tar.xz
gsoc2013-empathy-889cbf11540c152be0e1c2d63758e5da8bd10a5f.tar.zst
gsoc2013-empathy-889cbf11540c152be0e1c2d63758e5da8bd10a5f.zip
accounts-dialog: use gtk_list_store_insert_with_values()
Prevent a crash when using a11y as GTK+ may want to look at the content of the row as soon it's added. See the bug for details. https://bugzilla.gnome.org/show_bug.cgi?id=670601
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index b7b8aa39c..bab9dac29 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -1974,19 +1974,24 @@ accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
if (gtk_tree_selection_count_selected_rows (selection) == 0)
selected = TRUE;
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ gtk_list_store_insert_with_values (GTK_LIST_STORE (model), &iter, -1,
+ COL_NAME, name,
+ COL_STATUS, status,
+ COL_ACCOUNT, account,
+ COL_ACCOUNT_SETTINGS, settings,
+ -1);
}
else
{
selected = gtk_tree_selection_iter_is_selected (selection, &iter);
- }
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COL_NAME, name,
- COL_STATUS, status,
- COL_ACCOUNT, account,
- COL_ACCOUNT_SETTINGS, settings,
- -1);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ COL_NAME, name,
+ COL_STATUS, status,
+ COL_ACCOUNT, account,
+ COL_ACCOUNT_SETTINGS, settings,
+ -1);
+ }
if (selected)
{