rpms/devhelp/devel devhelp-0.9.3-dont-crash-on-typeahead.patch, NONE, 1.1 devhelp.spec, 1.20, 1.21
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Apr 14 19:49:37 UTC 2005
Update of /cvs/dist/rpms/devhelp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv5415
Modified Files:
devhelp.spec
Added Files:
devhelp-0.9.3-dont-crash-on-typeahead.patch
Log Message:
- Don't crash on typeahead (bug #154398)
devhelp-0.9.3-dont-crash-on-typeahead.patch:
dh-keyword-model.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
--- NEW FILE devhelp-0.9.3-dont-crash-on-typeahead.patch ---
--- devhelp-0.9.3/src/dh-keyword-model.c 25 Mar 2005 00:06:13 -0000
+++ devhelp-0.9.3/src/dh-keyword-model.c 14 Apr 2005 19:37:17 -0000
@@ -205,7 +205,7 @@ keyword_model_get_iter (GtkTreeModel *tr
DhKeywordModel *model;
DhKeywordModelPriv *priv;
GList *node;
- gint i;
+ const gint *indices;
g_return_val_if_fail (DH_IS_KEYWORD_MODEL (tree_model), FALSE);
g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE);
@@ -213,13 +213,17 @@ keyword_model_get_iter (GtkTreeModel *tr
model = DH_KEYWORD_MODEL (tree_model);
priv = model->priv;
- i = gtk_tree_path_get_indices (path)[0];
+ indices = gtk_tree_path_get_indices (path);
- if (i >= g_list_length (priv->keyword_words)) {
+ if (indices == NULL) {
return FALSE;
}
- node = g_list_nth (priv->keyword_words, i);
+ if (indices[0] >= g_list_length (priv->keyword_words)) {
+ return FALSE;
+ }
+
+ node = g_list_nth (priv->keyword_words, indices[0]);
iter->stamp = priv->stamp;
iter->user_data = node;
@@ -242,18 +246,14 @@ keyword_model_get_path (GtkTreeModel *tr
priv = model->priv;
- for (node = priv->keyword_words; node; node = node->next)
- {
- if ((gpointer)node->data == (gpointer)iter->user_data)
- break;
- i++;
- }
+ i = g_list_position (priv->keyword_words, iter->user_data);
- if (node == NULL) {
+ if (i < 0) {
return NULL;
}
path = gtk_tree_path_new ();
+
gtk_tree_path_append_index (path, i);
return path;
Index: devhelp.spec
===================================================================
RCS file: /cvs/dist/rpms/devhelp/devel/devhelp.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- devhelp.spec 10 Mar 2005 22:05:33 -0000 1.20
+++ devhelp.spec 14 Apr 2005 19:49:35 -0000 1.21
@@ -4,7 +4,7 @@
Summary: API document browser
Name: devhelp
Version: 0.9.3
-Release: 4
+Release: 5
License: GPL
Group: Development/Tools
Url: http://ftp.gnome.org/pub/gnome/sources/devhelp/
@@ -27,6 +27,8 @@
BuildRequires: intltool
BuildRequires: gettext
+Patch0: devhelp-0.9.3-dont-crash-on-typeahead.patch
+
%description
A API document browser for GNOME 2.
@@ -43,6 +45,7 @@
%prep
%setup -q
+%patch0 -p1 -b .dont-crash-on-typeahead
%build
@@ -102,6 +105,9 @@
%{_libdir}/pkgconfig/*
%changelog
+* Thu Apr 14 2005 Ray Strode <rstrode at redhat.com> 0.9.3-5
+- Don't crash on typeahead (bug #154398)
+
* Wed Mar 9 2005 Christopher Aillon <caillon at redhat.com> 0.9.3-4
- Depend on mozilla 1.7.6
More information about the fedora-cvs-commits
mailing list