[devhelp] language: start with n_books_enabled=1
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] language: start with n_books_enabled=1
- Date: Mon, 20 Dec 2010 15:24:05 +0000 (UTC)
commit 23390194c1ffa511195d242f7fec90ac59e222e3
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon Dec 20 16:23:43 2010 +0100
language: start with n_books_enabled=1
src/dh-book-manager.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/dh-book-manager.c b/src/dh-book-manager.c
index 1d92d1b..4416d7f 100644
--- a/src/dh-book-manager.c
+++ b/src/dh-book-manager.c
@@ -810,8 +810,10 @@ book_manager_inc_language (DhBookManager *book_manager,
return;
}
- /* Add new element to list if not found */
+ /* Add new element to list if not found. Language must start with
+ * with n_books_enabled=1. */
language = dh_language_new (language_name);
+ dh_language_inc_n_books_enabled (language);
priv->languages = g_list_prepend (priv->languages,
language);
/* Emit signal to notify others */
@@ -835,8 +837,7 @@ book_manager_dec_language (DhBookManager *book_manager,
g_assert (li != NULL);
/* If language count reaches zero, remove from list */
- if (dh_language_dec_n_books_enabled (li->data))
- {
+ if (dh_language_dec_n_books_enabled (li->data)) {
dh_language_free (li->data);
priv->languages = g_list_delete_link (priv->languages, li);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]