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
ef9e6983
Commit
ef9e6983
authored
14 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#5695] Fix absolute addressbook URI for local addressbooks
parent
2c68d1bf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-client-gnome/src/contacts/addressbook/eds.c
+10
-14
10 additions, 14 deletions
sflphone-client-gnome/src/contacts/addressbook/eds.c
sflphone-client-gnome/src/contacts/addressbook/eds.h
+1
-0
1 addition, 0 deletions
sflphone-client-gnome/src/contacts/addressbook/eds.h
with
11 additions
and
14 deletions
sflphone-client-gnome/src/contacts/addressbook/eds.c
+
10
−
14
View file @
ef9e6983
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
#include
<pango/pango.h>
#include
<pango/pango.h>
#include
"eds.h"
#include
"eds.h"
#include
<addressbook-config.h>
#include
<addressbook-config.h>
#include
<libedataserver
ui
/e-
passwords
.h>
#include
<libedataserver/e-
source
.h>
/**
/**
* Structure used to store search callback and data
* Structure used to store search callback and data
...
@@ -74,6 +74,7 @@ static const int pixbuf_size = 32;
...
@@ -74,6 +74,7 @@ static const int pixbuf_size = 32;
static
gchar
*
current_uri
=
NULL
;
static
gchar
*
current_uri
=
NULL
;
static
gchar
*
current_uid
=
NULL
;
static
gchar
*
current_uid
=
NULL
;
static
gchar
*
current_name
=
"Default"
;
static
gchar
*
current_name
=
"Default"
;
static
book_data_t
*
current_book
=
NULL
;
static
EBookQueryTest
current_test
=
E_BOOK_QUERY_BEGINS_WITH
;
static
EBookQueryTest
current_test
=
E_BOOK_QUERY_BEGINS_WITH
;
...
@@ -539,12 +540,9 @@ fill_books_data ()
...
@@ -539,12 +540,9 @@ fill_books_data ()
book_data
->
isdefault
=
FALSE
;
book_data
->
isdefault
=
FALSE
;
}
}
if
(
strcmp
(
absuri
+
strlen
(
absuri
)
-
1
,
"/"
)
==
0
)
book_data
->
uri
=
g_strjoin
(
""
,
absuri
,
e_source_peek_relative_uri
(
source
),
NULL
);
book_data
->
uri
=
g_strjoin
(
""
,
absuri
,
e_source_peek_relative_uri
(
source
),
NULL
);
else
book_data
->
uri
=
g_strjoin
(
"/"
,
absuri
,
e_source_peek_relative_uri
(
source
),
NULL
);
book_data
->
source
=
e_source_copy
(
source
);
// authenticate_source (book_data, source);
// authenticate_source (book_data, source);
books_data
=
g_slist_prepend
(
books_data
,
book_data
);
books_data
=
g_slist_prepend
(
books_data
,
book_data
);
...
@@ -637,16 +635,13 @@ search_async_by_contacts (const char *query, int max_results, SearchAsyncHandler
...
@@ -637,16 +635,13 @@ search_async_by_contacts (const char *query, int max_results, SearchAsyncHandler
ERROR
(
"Addressbook: Error: Current addressbook uri not specified uri"
);
ERROR
(
"Addressbook: Error: Current addressbook uri not specified uri"
);
}
}
DEBUG
(
"Addressbook: Opening addressbook: %s"
,
current_uri
);
DEBUG
(
"Addressbook: Opening addressbook:
uri:
%s"
,
current_uri
);
DEBUG
(
"Addressbook: Opening addressbook: %s"
,
current_name
);
DEBUG
(
"Addressbook: Opening addressbook:
name:
%s"
,
current_name
);
if
(
strcmp
(
current_name
,
"Default"
)
==
0
)
{
ESource
*
source
=
e_source_new_with_absolute_uri
(
current_name
,
current_uri
);
book
=
e_book_new_default_addressbook
(
&
err
);
}
book
=
e_book_new
(
source
,
&
err
);
else
{
book
=
e_book_new_from_uri
(
current_uri
,
&
err
);
}
if
(
err
)
{
if
(
err
)
{
ERROR
(
"Addressbook: Error: Could not open new book: %s"
,
err
->
message
);
ERROR
(
"Addressbook: Error: Could not open new book: %s"
,
err
->
message
);
...
@@ -701,6 +696,7 @@ set_current_addressbook (const gchar *name)
...
@@ -701,6 +696,7 @@ set_current_addressbook (const gchar *name)
current_uri
=
book_data
->
uri
;
current_uri
=
book_data
->
uri
;
current_uid
=
book_data
->
uid
;
current_uid
=
book_data
->
uid
;
current_name
=
book_data
->
name
;
current_name
=
book_data
->
name
;
current_book
=
book_data
;
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
sflphone-client-gnome/src/contacts/addressbook/eds.h
+
1
−
0
View file @
ef9e6983
...
@@ -72,6 +72,7 @@ typedef struct {
...
@@ -72,6 +72,7 @@ typedef struct {
gchar
*
uid
;
gchar
*
uid
;
gchar
*
uri
;
gchar
*
uri
;
gchar
*
name
;
gchar
*
name
;
ESource
*
source
;
gboolean
active
;
gboolean
active
;
gboolean
isdefault
;
gboolean
isdefault
;
}
book_data_t
;
}
book_data_t
;
...
...
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