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
c422357e
Commit
c422357e
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#2467] Open address book without creating it if not existant ()
e_book_async_open(book, FALSE, eds_async_open_callback, had)
parent
ade95148
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-client-gnome/src/contacts/addressbook/eds.c
+25
-19
25 additions, 19 deletions
sflphone-client-gnome/src/contacts/addressbook/eds.c
sflphone-client-gnome/src/contacts/searchbar.c
+2
-0
2 additions, 0 deletions
sflphone-client-gnome/src/contacts/searchbar.c
with
27 additions
and
19 deletions
sflphone-client-gnome/src/contacts/addressbook/eds.c
+
25
−
19
View file @
c422357e
...
@@ -275,23 +275,25 @@ pixbuf_from_contact(EContact *contact)
...
@@ -275,23 +275,25 @@ pixbuf_from_contact(EContact *contact)
static
void
static
void
eds_async_open_callback
(
EBook
*
book
,
EBookStatus
status
,
gpointer
closure
)
eds_async_open_callback
(
EBook
*
book
,
EBookStatus
status
,
gpointer
closure
)
{
{
Open_Handler_And_Data
*
had
=
(
Open_Handler_And_Data
*
)
closure
;
Open_Handler_And_Data
*
had
=
(
Open_Handler_And_Data
*
)
closure
;
remaining_books_to_open
--
;
remaining_books_to_open
--
;
if
(
status
==
E_BOOK_ERROR_OK
)
DEBUG
(
"eds_async_open_callback remaining book to open: %i"
,
remaining_books_to_open
);
{
book_data_t
*
book_data
=
g_new
(
book_data_t
,
1
);
if
(
status
==
E_BOOK_ERROR_OK
)
{
book_data
->
active
=
FALSE
;
book_data
->
name
=
g_strdup
(
e_source_peek_name
(
e_book_get_source
(
book
)));
book_data_t
*
book_data
=
g_new
(
book_data_t
,
1
);
book_data
->
uid
=
g_strdup
(
e_source_peek_uid
(
e_book_get_source
(
book
)));
book_data
->
active
=
FALSE
;
book_data
->
ebook
=
book
;
book_data
->
name
=
g_strdup
(
e_source_peek_name
(
e_book_get_source
(
book
)));
books_data
=
g_slist_prepend
(
books_data
,
book_data
);
book_data
->
uid
=
g_strdup
(
e_source_peek_uid
(
e_book_get_source
(
book
)));
had
->
handler
();
book_data
->
ebook
=
book
;
books_data
=
g_slist_prepend
(
books_data
,
book_data
);
had
->
handler
();
}
}
else
else
{
{
WARN
(
"Got error %d when opening book"
,
status
);
WARN
(
"Got error %d when opening book"
,
status
);
}
}
}
}
...
@@ -302,14 +304,15 @@ void
...
@@ -302,14 +304,15 @@ void
init
(
OpenAsyncHandler
callback
)
init
(
OpenAsyncHandler
callback
)
{
{
GSList
*
list
,
*
l
;
GSList
*
list
,
*
l
;
ESourceList
*
source_list
;
ESourceList
*
source_list
=
NULL
;
remaining_books_to_open
=
0
;
remaining_books_to_open
=
0
;
books_data
=
NULL
;
books_data
=
NULL
;
source_list
=
e_source_list_new_for_gconf_default
(
source_list
=
e_source_list_new_for_gconf_default
(
"/apps/evolution/addressbook/sources"
);
"/apps/evolution/addressbook/sources"
);
if
(
source_list
==
NULL
)
if
(
source_list
==
NULL
)
{
{
DEBUG
(
"Error could not initialize source list for addressbook"
);
return
;
return
;
}
}
...
@@ -320,6 +323,7 @@ init(OpenAsyncHandler callback)
...
@@ -320,6 +323,7 @@ init(OpenAsyncHandler callback)
for
(
l
=
list
;
l
!=
NULL
;
l
=
l
->
next
)
for
(
l
=
list
;
l
!=
NULL
;
l
=
l
->
next
)
{
{
ESourceGroup
*
group
=
l
->
data
;
ESourceGroup
*
group
=
l
->
data
;
GSList
*
sources
=
NULL
,
*
m
;
GSList
*
sources
=
NULL
,
*
m
;
sources
=
e_source_group_peek_sources
(
group
);
sources
=
e_source_group_peek_sources
(
group
);
...
@@ -330,10 +334,12 @@ init(OpenAsyncHandler callback)
...
@@ -330,10 +334,12 @@ init(OpenAsyncHandler callback)
if
(
book
!=
NULL
)
if
(
book
!=
NULL
)
{
{
// Keep count of remaining books to open
// Keep count of remaining books to open
remaining_books_to_open
++
;
DEBUG
(
"init addressbook %i"
,
remaining_books_to_open
);
remaining_books_to_open
++
;
// Asynchronous open
// Asynchronous open
e_book_async_open
(
book
,
TRU
E
,
eds_async_open_callback
,
had
);
e_book_async_open
(
book
,
FALS
E
,
eds_async_open_callback
,
had
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
sflphone-client-gnome/src/contacts/searchbar.c
+
2
−
0
View file @
c422357e
...
@@ -36,6 +36,8 @@ GdkPixbuf *missed_pixbuf = NULL;
...
@@ -36,6 +36,8 @@ GdkPixbuf *missed_pixbuf = NULL;
void
searchbar_entry_changed
(
GtkEntry
*
entry
,
gchar
*
arg1
UNUSED
,
gpointer
data
UNUSED
)
void
searchbar_entry_changed
(
GtkEntry
*
entry
,
gchar
*
arg1
UNUSED
,
gpointer
data
UNUSED
)
{
{
DEBUG
(
"searchbar_entry_changed"
);
if
(
active_calltree
==
contacts
)
{
if
(
active_calltree
==
contacts
)
{
addressbook_search
(
entry
);
addressbook_search
(
entry
);
}
}
...
...
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