Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-macos
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-macos
Commits
b7ee3ed0
Commit
b7ee3ed0
authored
10 years ago
by
Alexandre Lision
Browse files
Options
Downloads
Patches
Plain Diff
accounts: add account reordering feature
Refs #67077 Change-Id: I41b148143e433e0224e4259ea9ebf27605222083
parent
53428a5d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AccountsVC.mm
+12
-0
12 additions, 0 deletions
AccountsVC.mm
with
12 additions
and
0 deletions
AccountsVC.mm
+
12
−
0
View file @
b7ee3ed0
...
...
@@ -161,11 +161,20 @@ public:
[
self
.
ringTabItem
setView
:
self
.
ringVC
.
view
];
}
-
(
IBAction
)
moveUp
:(
id
)
sender
{
AccountModel
::
instance
()
->
moveUp
();
}
-
(
IBAction
)
moveDown
:(
id
)
sender
{
AccountModel
::
instance
()
->
moveDown
();
}
-
(
IBAction
)
removeAccount
:(
id
)
sender
{
if
(
treeController
.
selectedNodes
.
count
>
0
)
{
QModelIndex
qIdx
=
[
treeController
toQIdx
:[
treeController
selectedNodes
][
0
]];
AccountModel
::
instance
()
->
remove
(
qIdx
);
AccountModel
::
instance
()
->
save
();
}
}
-
(
IBAction
)
addAccount
:(
id
)
sender
{
...
...
@@ -175,6 +184,7 @@ public:
AccountModel
:
:
instance
()
->
protocolModel
()
->
data
(
qIdx
,
Qt
::
DisplayRole
).
toString
().
toNSString
(),
nil
];
Account
*
newAcc
=
AccountModel
::
instance
()
->
add
([
newAccName
UTF8String
],
qIdx
);
AccountModel
::
instance
()
->
save
();
}
-
(
IBAction
)
protocolSelectedChanged
:(
id
)
sender
{
...
...
@@ -336,6 +346,7 @@ public:
if
([[
treeController
selectedNodes
]
count
]
>
0
)
{
QModelIndex
qIdx
=
[
treeController
toQIdx
:[
treeController
selectedNodes
][
0
]];
//Update details view
AccountModel
::
instance
()
->
selectionModel
()
->
setCurrentIndex
(
qIdx
,
QItemSelectionModel
::
ClearAndSelect
);
Account
*
acc
=
AccountModel
::
instance
()
->
getAccountByModelIndex
(
qIdx
);
switch
(
acc
->
protocol
())
{
...
...
@@ -359,6 +370,7 @@ public:
[
self
.
accountDetailsView
setHidden
:
NO
];
}
else
{
[
self
.
accountDetailsView
setHidden
:
YES
];
AccountModel
::
instance
()
->
selectionModel
()
->
clearCurrentIndex
();
}
}
...
...
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