Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
4dd47998
Commit
4dd47998
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#2467] Search for string longer than 3 fasten addressbook queries
parent
c422357e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sflphone-client-gnome/src/contacts/addressbook.c
+22
-17
22 additions, 17 deletions
sflphone-client-gnome/src/contacts/addressbook.c
with
22 additions
and
17 deletions
sflphone-client-gnome/src/contacts/addressbook.c
+
22
−
17
View file @
4dd47998
...
@@ -32,17 +32,21 @@ void
...
@@ -32,17 +32,21 @@ void
addressbook_search
(
GtkEntry
*
entry
)
addressbook_search
(
GtkEntry
*
entry
)
{
{
AddressBook_Config
*
addressbook_config
;
gchar
*
query
=
gtk_entry_get_text
(
GTK_ENTRY
(
entry
));
if
(
strlen
(
query
)
>=
3
)
{
// Activate waiting layer
AddressBook_Config
*
addressbook_config
;
activateWaitingLayer
();
// Activate waiting layer
activateWaitingLayer
();
// Load the address book parameters
// Load the address book parameters
addressbook_config_load_parameters
(
&
addressbook_config
);
addressbook_config_load_parameters
(
&
addressbook_config
);
// Start the asynchronous search as soon as we have an entry */
search_async
(
gtk_entry_get_text
(
GTK_ENTRY
(
entry
)),
addressbook_config
->
max_results
,
&
handler_async_search
,
addressbook_config
);
// Start the asynchronous search as soon as we have an entry */
}
search_async
(
gtk_entry_get_text
(
GTK_ENTRY
(
entry
)),
addressbook_config
->
max_results
,
&
handler_async_search
,
addressbook_config
);
}
}
/**
/**
...
@@ -84,6 +88,7 @@ addressbook_is_active()
...
@@ -84,6 +88,7 @@ addressbook_is_active()
static
void
static
void
addressbook_config_books
()
addressbook_config_books
()
{
{
gchar
**
config_book_uid
;
gchar
**
config_book_uid
;
book_data_t
*
book_data
;
book_data_t
*
book_data
;
gchar
**
list
;
gchar
**
list
;
...
@@ -91,21 +96,21 @@ addressbook_config_books()
...
@@ -91,21 +96,21 @@ addressbook_config_books()
// Retrieve list of books
// Retrieve list of books
list
=
(
gchar
**
)
dbus_get_addressbook_list
();
list
=
(
gchar
**
)
dbus_get_addressbook_list
();
if
(
list
)
if
(
list
)
{
{
for
(
config_book_uid
=
list
;
*
config_book_uid
;
config_book_uid
++
)
for
(
config_book_uid
=
list
;
*
config_book_uid
;
config_book_uid
++
)
{
{
// Get corresponding book data
// Get corresponding book data
book_data
=
books_get_book_data_by_uid
(
*
config_book_uid
);
book_data
=
books_get_book_data_by_uid
(
*
config_book_uid
);
// If book_data exists
// If book_data exists
if
(
book_data
!=
NULL
)
if
(
book_data
!=
NULL
)
{
{
book_data
->
active
=
TRUE
;
book_data
->
active
=
TRUE
;
}
}
}
}
g_strfreev
(
list
);
g_strfreev
(
list
);
}
}
// Update buttons
// Update buttons
update_actions
();
update_actions
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment