rpms/contact-lookup-applet/F-8 contact-lookup-applet-ebook-sources.patch, NONE, 1.1 contact-lookup-applet-search.patch, NONE, 1.1 contact-lookup-applet.spec, 1.24, 1.25
Brian Pepple (bpepple)
fedora-extras-commits at redhat.com
Tue Nov 13 00:34:58 UTC 2007
- Previous message (by thread): rpms/libdrm/devel libdrm-2.4.0-no-freaking-mknod.patch, NONE, 1.1 libdrm.spec, 1.29, 1.30 libdrm-2.3.0-default-mode.patch, 1.1, NONE
- Next message (by thread): rpms/python-pygments/F-8 .cvsignore, 1.2, 1.3 python-pygments.spec, 1.2, 1.3 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: bpepple
Update of /cvs/pkgs/rpms/contact-lookup-applet/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32112
Modified Files:
contact-lookup-applet.spec
Added Files:
contact-lookup-applet-ebook-sources.patch
contact-lookup-applet-search.patch
Log Message:
* Mon Nov 12 2007 Brian Pepple <bpepple at fedoraproject.org> - 0.16-4
- Add sources patch to remove the need to set autocompletion. (Bastien Nocera)
- Add search patch to not search if ebook hasn't been opened yet.
contact-lookup-applet-ebook-sources.patch:
--- NEW FILE contact-lookup-applet-ebook-sources.patch ---
--- trunk/src/e-contact-entry.c 2007/11/01 10:14:04 264
+++ trunk/src/e-contact-entry.c 2007/11/12 16:03:14 265
@@ -213,6 +213,8 @@
}
}
+/* This is the maximum number of entries that GTK+ will show */
+#define MAX_ENTRIES 15
/**
* Callback from the EBookView that more contacts matching the query have been found. Add these to
* the model if we still want more contacts, or stop the view.
@@ -222,6 +224,7 @@
{
EntryLookup *lookup;
guint max_height;
+ int i;
g_return_if_fail (user_data != NULL);
g_return_if_fail (contacts != NULL);
@@ -229,8 +232,7 @@
max_height = entry_height (GTK_WIDGET (lookup->entry));
- /* TODO: the completion only shows 15 results, so stop after that many. */
- for (; contacts != NULL; contacts = g_list_next (contacts)) {
+ for (i = 0; contacts != NULL && i < MAX_ENTRIES; contacts = g_list_next (contacts)) {
GtkTreeIter iter;
EContact *contact;
EContactPhoto *photo;
@@ -243,8 +245,8 @@
string = lookup->entry->priv->display_func (contact, lookup->entry->priv->display_data);
} else {
/* Make sure that we actually have an email address to show */
- if (e_contact_get_const (contact, E_CONTACT_EMAIL_1)) {
- string = g_strdup_printf ("%s <%s>", (char*)e_contact_get_const (contact, E_CONTACT_NAME_OR_ORG), (char*)e_contact_get_const (contact, E_CONTACT_EMAIL_1));
+ if (e_contact_get_const (contact, E_CONTACT_EMAIL_1)) {
+ string = g_strdup_printf ("%s <%s>", (char*)e_contact_get_const (contact, E_CONTACT_NAME_OR_ORG), (char*)e_contact_get_const (contact, E_CONTACT_EMAIL_1));
}
else {
string = g_strdup_printf ("%s", (char*)e_contact_get_const (contact, E_CONTACT_NAME_OR_ORG));
@@ -461,35 +463,30 @@
for (m = sources; m != NULL; m = m->next) {
ESource *source = m->data;
const char *p;
+ ESource *s = e_source_copy (source);
+ EntryLookup *lookup;
+ char *uri;
- p = e_source_get_property (source, "completion");
-
- if (p != NULL && strcmp (p, "true") == 0) {
- ESource *s = e_source_copy (source);
- EntryLookup *lookup;
- char *uri;
-
- uri = g_strdup_printf("%s/%s", e_source_group_peek_base_uri (group), e_source_peek_relative_uri (source));
- e_source_set_absolute_uri (s, uri);
- g_free (uri);
-
- /* Now add those to the lookup entries list */
- lookup = g_new0 (EntryLookup, 1);
- lookup->entry = entry;
- lookup->open = FALSE;
-
- if ((lookup->book = e_book_new (s, &error)) == NULL) {
- /* TODO handle this better, fire the error signal I guess */
- g_warning (error->message);
- g_error_free (error);
- g_free (lookup);
- } else {
- entry->priv->lookup_entries = g_list_append (entry->priv->lookup_entries, lookup);
- e_book_async_open(lookup->book, TRUE, (EBookCallback)book_opened_cb, lookup);
- }
-
- g_object_unref (s);
+ uri = g_strdup_printf("%s/%s", e_source_group_peek_base_uri (group), e_source_peek_relative_uri (source));
+ e_source_set_absolute_uri (s, uri);
+ g_free (uri);
+
+ /* Now add those to the lookup entries list */
+ lookup = g_new0 (EntryLookup, 1);
+ lookup->entry = entry;
+ lookup->open = FALSE;
+
+ if ((lookup->book = e_book_new (s, &error)) == NULL) {
+ /* TODO handle this better, fire the error signal I guess */
+ g_warning (error->message);
+ g_error_free (error);
+ g_free (lookup);
+ } else {
+ entry->priv->lookup_entries = g_list_append (entry->priv->lookup_entries, lookup);
+ e_book_async_open(lookup->book, TRUE, (EBookCallback)book_opened_cb, lookup);
}
+
+ g_object_unref (s);
}
}
contact-lookup-applet-search.patch:
--- NEW FILE contact-lookup-applet-search.patch ---
--- trunk/src/e-contact-entry.c 2007/10/31 20:51:10 262
+++ trunk/src/e-contact-entry.c 2007/10/31 20:52:04 263
@@ -95,6 +95,7 @@
*/
typedef struct _EntryLookup {
EContactEntry *entry;
+ gboolean open;
EBook *book;
EBookView *bookview;
} EntryLookup;
@@ -374,11 +375,16 @@
}
gtk_list_store_clear (entry->priv->store);
-
+
query = create_query (entry, gtk_editable_get_chars (editable, 0, -1));
for (l = entry->priv->lookup_entries; l != NULL; l = l->next) {
EntryLookup *lookup;
lookup = (EntryLookup*)l->data;
+
+ /* If the book isn't open yet, skip this source */
+ if (!lookup->open)
+ continue;
+
if (e_book_async_get_book_view (lookup->book, query, NULL, 11, (EBookBookViewCallback)bookview_cb, lookup) != 0) {
g_signal_emit (entry, signals[ERROR], 0, _("Cannot create searchable view."));
}
@@ -402,6 +408,7 @@
g_signal_emit (lookup->entry, signals[ERROR], 0, stringify_ebook_error (status));
return;
}
+ lookup->open = TRUE;
g_signal_emit (lookup->entry, signals[STATE_CHANGE], 0, TRUE);
}
@@ -469,6 +476,7 @@
/* Now add those to the lookup entries list */
lookup = g_new0 (EntryLookup, 1);
lookup->entry = entry;
+ lookup->open = FALSE;
if ((lookup->book = e_book_new (s, &error)) == NULL) {
/* TODO handle this better, fire the error signal I guess */
Index: contact-lookup-applet.spec
===================================================================
RCS file: /cvs/pkgs/rpms/contact-lookup-applet/F-8/contact-lookup-applet.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- contact-lookup-applet.spec 21 Aug 2007 14:39:22 -0000 1.24
+++ contact-lookup-applet.spec 13 Nov 2007 00:34:26 -0000 1.25
@@ -1,12 +1,14 @@
Name: contact-lookup-applet
Version: 0.16
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Contact Lookup Applet
Group: Applications/Communications
License: GPLv2+
URL: http://www.burtonini.com/blog//computers/contact-lookup-applet-0.13
Source0: http://www.burtonini.com/computing/%{name}-%{version}.tar.gz
+Patch0: %{name}-search.patch
+Patch1: %{name}-ebook-sources.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gnome-panel-devel >= 2.9.4
@@ -23,6 +25,8 @@
%prep
%setup -q
+%patch0 -p1 -b .search
+%patch1 -p1 -b .sources
%build
@@ -51,6 +55,10 @@
%changelog
+* Mon Nov 12 2007 Brian Pepple <bpepple at fedoraproject.org> - 0.16-4
+- Add sources patch to remove the need to set autocompletion. (Bastien Nocera)
+- Add search patch to not search if ebook hasn't been opened yet.
+
* Tue Aug 21 2007 Brian Pepple <bpepple at fedoraproject.org> - 0.16-3
- Rebuild.
- Previous message (by thread): rpms/libdrm/devel libdrm-2.4.0-no-freaking-mknod.patch, NONE, 1.1 libdrm.spec, 1.29, 1.30 libdrm-2.3.0-default-mode.patch, 1.1, NONE
- Next message (by thread): rpms/python-pygments/F-8 .cvsignore, 1.2, 1.3 python-pygments.spec, 1.2, 1.3 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list