[gnome-control-center] User accounts: Load languages async
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] User accounts: Load languages async
- Date: Thu, 24 Feb 2011 03:13:20 +0000 (UTC)
commit 8053c9561dc1289a9d5912922454145b832455de
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 23 22:06:49 2011 -0500
User accounts: Load languages async
https://bugzilla.gnome.org/show_bug.cgi?id=643096
panels/user-accounts/um-language-dialog.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/panels/user-accounts/um-language-dialog.c b/panels/user-accounts/um-language-dialog.c
index 41acc24..8e19a8f 100644
--- a/panels/user-accounts/um-language-dialog.c
+++ b/panels/user-accounts/um-language-dialog.c
@@ -190,6 +190,14 @@ remove_timeout (gpointer data,
g_source_remove (timeout);
}
+static void
+remove_async (gpointer data)
+{
+ guint async_id = GPOINTER_TO_UINT (data);
+
+ g_source_remove (async_id);
+}
+
static gboolean
finish_um_language_chooser (gpointer user_data)
{
@@ -199,6 +207,7 @@ finish_um_language_chooser (gpointer user_data)
GtkWindow *parent;
GHashTable *user_langs;
guint timeout;
+ guint async_id;
/* Did we get called after the widget was destroyed? */
if (chooser == NULL)
@@ -208,7 +217,8 @@ finish_um_language_chooser (gpointer user_data)
model = gtk_tree_view_get_model (GTK_TREE_VIEW (list));
user_langs = g_object_get_data (G_OBJECT (chooser), "user-langs");
- cc_common_language_add_available_languages (GTK_LIST_STORE (model), user_langs);
+ async_id = cc_common_language_add_available_languages_async (GTK_LIST_STORE (model), user_langs);
+ g_object_set_data_full (G_OBJECT (chooser), "language-async", GUINT_TO_POINTER (async_id), remove_async);
parent = gtk_window_get_transient_for (GTK_WINDOW (chooser));
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (parent)), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]