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
c35d24e9
Commit
c35d24e9
authored
16 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
Restore adding account - ticket #1172
parent
7d3c309f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/managerimpl.cpp
+21
-3
21 additions, 3 deletions
src/managerimpl.cpp
with
21 additions
and
3 deletions
src/managerimpl.cpp
+
21
−
3
View file @
c35d24e9
...
...
@@ -2159,7 +2159,7 @@ ManagerImpl::getAccountList()
// Otherelse, load the custom one
// ie according to the saved order
else
{
for
(
i
=
0
;
i
<
account_order
.
size
();
i
++
)
{
// This account has not been loaded, so we ignore it
if
(
(
iter
=
_accountMap
.
find
(
account_order
[
i
]))
!=
_accountMap
.
end
()
)
...
...
@@ -2171,6 +2171,8 @@ ManagerImpl::getAccountList()
}
}
}
}
return
v
;
...
...
@@ -2269,11 +2271,17 @@ ManagerImpl::addAccount(const std::map< std::string, std::string >& details)
{
/** @todo Deal with both the _accountMap and the Configuration */
std
::
string
accountType
=
(
*
details
.
find
(
CONFIG_ACCOUNT_TYPE
)).
second
;
std
::
string
accountType
,
account_list
;
Account
*
newAccount
;
std
::
stringstream
accountID
;
AccountID
newAccountID
;
accountID
<<
"Account:"
<<
time
(
NULL
);
AccountID
newAccountID
=
accountID
.
str
();
newAccountID
=
accountID
.
str
();
// Get the type
accountType
=
(
*
details
.
find
(
CONFIG_ACCOUNT_TYPE
)).
second
;
/** @todo Verify the uniqueness, in case a program adds accounts, two in a row. */
if
(
accountType
==
"SIP"
)
{
...
...
@@ -2289,6 +2297,16 @@ ManagerImpl::addAccount(const std::map< std::string, std::string >& details)
_accountMap
[
newAccountID
]
=
newAccount
;
setAccountDetails
(
accountID
.
str
(),
details
);
// Add the newly created account in the account order list
account_list
=
getConfigString
(
PREFERENCES
,
CONFIG_ACCOUNTS_ORDER
);
if
(
account_list
!=
""
)
{
newAccountID
+=
"/"
;
// Prepend the new account
account_list
.
insert
(
0
,
newAccountID
);
setConfig
(
PREFERENCES
,
CONFIG_ACCOUNTS_ORDER
,
account_list
);
}
saveConfig
();
if
(
_dbus
)
_dbus
->
getConfigurationManager
()
->
accountsChanged
();
...
...
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