[devhelp] - Fix broken schemas file, and "disabled_books" usage (#624198)
Bastien Nocera
hadess at fedoraproject.org
Thu Sep 9 14:37:00 UTC 2010
commit b3021774c731a519082b53fb8ee59b84814445e3
Author: Bastien Nocera <hadess at hadess.net>
Date: Thu Sep 9 15:37:04 2010 +0100
- Fix broken schemas file, and "disabled_books" usage (#624198)
0001-Fix-broken-schemas-file.patch | 27 +++++++
0002-Fix-use-of-disabled_books.patch | 127 ++++++++++++++++++++++++++++++++++
devhelp.spec | 12 +++-
3 files changed, 165 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-broken-schemas-file.patch b/0001-Fix-broken-schemas-file.patch
new file mode 100644
index 0000000..b59e8b2
--- /dev/null
+++ b/0001-Fix-broken-schemas-file.patch
@@ -0,0 +1,27 @@
+From 8f13eaeb35a14f0fee8804e1b5860344f8a2a4d1 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Thu, 9 Sep 2010 15:17:02 +0100
+Subject: [PATCH 1/2] Fix broken schemas file
+
+WARNING: no <list_type> specified for schema of type list
+WARNING: invalid or missing list_type for schema (/schemas/apps/devhelp/state/main/contents/books_disabled)
+WARNING: failed to install schema `/schemas/apps/devhelp/state/main/contents/books_disabled', locale `C': Schema specifies type list but doesn't specify the type of the list elements
+---
+ data/devhelp.schemas.in | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/data/devhelp.schemas.in b/data/devhelp.schemas.in
+index eebeb72..c30d76a 100644
+--- a/data/devhelp.schemas.in
++++ b/data/devhelp.schemas.in
+@@ -131,6 +131,7 @@
+ <applyto>/apps/devhelp/state/main/contents/books_disabled</applyto>
+ <owner>devhelp</owner>
+ <type>list</type>
++ <list_type>string</list_type>
+ <default></default>
+ <locale name="C">
+ <short>Books disabled</short>
+--
+1.7.2.3
+
diff --git a/0002-Fix-use-of-disabled_books.patch b/0002-Fix-use-of-disabled_books.patch
new file mode 100644
index 0000000..3cc4484
--- /dev/null
+++ b/0002-Fix-use-of-disabled_books.patch
@@ -0,0 +1,127 @@
+From 923222cdb5db06aade198de26ce777308b4cf960 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Thu, 9 Sep 2010 15:17:52 +0100
+Subject: [PATCH 2/2] Fix use of "disabled_books"
+
+The schemas actually requires books_disabled instead.
+---
+ src/dh-book-manager.c | 20 ++++++++++----------
+ src/dh-util.c | 16 ++++++++--------
+ 2 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/src/dh-book-manager.c b/src/dh-book-manager.c
+index 9549c5a..5726439 100644
+--- a/src/dh-book-manager.c
++++ b/src/dh-book-manager.c
+@@ -106,11 +106,11 @@ dh_book_manager_init (DhBookManager *book_manager)
+ }
+
+ static void
+-book_manager_clean_list_of_disabled_books (GSList *disabled_books)
++book_manager_clean_list_of_books_disabled (GSList *books_disabled)
+ {
+ GSList *sl;
+
+- for (sl = disabled_books; sl; sl = g_slist_next (sl)) {
++ for (sl = books_disabled; sl; sl = g_slist_next (sl)) {
+ g_free (sl->data);
+ }
+ g_slist_free (sl);
+@@ -119,11 +119,11 @@ book_manager_clean_list_of_disabled_books (GSList *disabled_books)
+ static void
+ book_manager_check_status_from_conf (DhBookManager *book_manager)
+ {
+- GSList *disabled_books, *sl;
++ GSList *books_disabled, *sl;
+
+- disabled_books = dh_util_state_load_disabled_books ();
++ books_disabled = dh_util_state_load_books_disabled ();
+
+- for (sl = disabled_books; sl; sl = g_slist_next (sl)) {
++ for (sl = books_disabled; sl; sl = g_slist_next (sl)) {
+ DhBook *book;
+
+ book = dh_book_manager_get_book_by_name (book_manager,
+@@ -133,7 +133,7 @@ book_manager_check_status_from_conf (DhBookManager *book_manager)
+ }
+ }
+
+- book_manager_clean_list_of_disabled_books (disabled_books);
++ book_manager_clean_list_of_books_disabled (books_disabled);
+ }
+
+ static void
+@@ -372,7 +372,7 @@ void
+ dh_book_manager_update (DhBookManager *book_manager)
+ {
+ DhBookManagerPriv *priv;
+- GSList *disabled_books = NULL;
++ GSList *books_disabled = NULL;
+ GList *l;
+
+ g_return_if_fail (book_manager);
+@@ -384,20 +384,20 @@ dh_book_manager_update (DhBookManager *book_manager)
+ DhBook *book = DH_BOOK (l->data);
+
+ if (!dh_book_get_enabled (book)) {
+- disabled_books = g_slist_append (disabled_books,
++ books_disabled = g_slist_append (books_disabled,
+ g_strdup (dh_book_get_name (book)));
+ }
+ }
+
+ /* Store in conf */
+- dh_util_state_store_disabled_books (disabled_books);
++ dh_util_state_store_books_disabled (books_disabled);
+
+ /* Emit signal to notify others */
+ g_signal_emit (book_manager,
+ signals[DISABLED_BOOK_LIST_UPDATED],
+ 0);
+
+- book_manager_clean_list_of_disabled_books (disabled_books);
++ book_manager_clean_list_of_books_disabled (books_disabled);
+ }
+
+ DhBookManager *
+diff --git a/src/dh-util.c b/src/dh-util.c
+index 85a25d6..2453c9b 100644
+--- a/src/dh-util.c
++++ b/src/dh-util.c
+@@ -465,25 +465,25 @@ dh_util_state_manage_paned (GtkPaned *paned,
+ }
+
+ GSList *
+-dh_util_state_load_disabled_books (void)
++dh_util_state_load_books_disabled (void)
+ {
+ gchar *key;
+- GSList *disabled_books = NULL;
++ GSList *books_disabled = NULL;
+
+- key = util_state_get_key ("main/contents", "disabled_books");
+- ige_conf_get_string_list (ige_conf_get (), key, &disabled_books);
++ key = util_state_get_key ("main/contents", "books_disabled");
++ ige_conf_get_string_list (ige_conf_get (), key, &books_disabled);
+ g_free(key);
+
+- return disabled_books;
++ return books_disabled;
+ }
+
+ void
+-dh_util_state_store_disabled_books (GSList *disabled_books)
++dh_util_state_store_books_disabled (GSList *books_disabled)
+ {
+ gchar *key;
+
+- key = util_state_get_key ("main/contents", "disabled_books");
+- ige_conf_set_string_list (ige_conf_get (), key, disabled_books);
++ key = util_state_get_key ("main/contents", "books_disabled");
++ ige_conf_set_string_list (ige_conf_get (), key, books_disabled);
+ g_free(key);
+ }
+
+--
+1.7.2.3
+
diff --git a/devhelp.spec b/devhelp.spec
index d9db080..4176a1d 100644
--- a/devhelp.spec
+++ b/devhelp.spec
@@ -6,7 +6,7 @@
Name: devhelp
Version: 2.90.5
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2+
Group: Development/Tools
Summary: API documention browser
@@ -18,6 +18,11 @@ Source: http://download.gnome.org/sources/devhelp/2.90/devhelp-%{version}.tar.bz
Patch0: devhelp-gtk3.patch
Patch1: 0001-pkgconfig-Require-webkitgtk-3.0-instead-of-webkit-3..patch
Patch2: 0002-Use-double-quotes-for-including-dh-headers.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=629174
+# https://bugzilla.redhat.com/show_bug.cgi?id=624198
+Patch3: 0001-Fix-broken-schemas-file.patch
+Patch4: 0002-Fix-use-of-disabled_books.patch
+
### Dependencies ###
Requires(pre): GConf2 >= 2.14
@@ -56,6 +61,8 @@ into other applications such as IDEs.
%patch0 -p1 -b .gtk3
%patch1 -p1 -b .pkgconfig
%patch2 -p1 -b .double-quotes
+%patch3 -p1 -b .schema
+%patch4 -p1 -b .disabled-books
# force regeneration
rm data/devhelp.schemas
@@ -143,6 +150,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%{_libdir}/pkgconfig/*
%changelog
+* Thu Sep 09 2010 Bastien Nocera <bnocera at redhat.com> 2.90.5-5
+- Fix broken schemas file, and "disabled_books" usage (#624198)
+
* Mon Aug 23 2010 Matthias Clasen <mclasen at redhat.com> - 2.90.5-4
- Incorporate a few upstream fixes
More information about the scm-commits
mailing list