Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
J
jami-client-gnome
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
151
Issues
151
List
Boards
Labels
Milestones
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-client-gnome
Commits
ceaa495e
Unverified
Commit
ceaa495e
authored
Sep 23, 2019
by
Sébastien Blin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migration: show migration view when needed
Change-Id: Id2641aa8654a88ac1c56d445ef8ab81a6f4f2858
parent
08f58d8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
src/ringmainwindow.cpp
src/ringmainwindow.cpp
+34
-1
No files found.
src/ringmainwindow.cpp
View file @
ceaa495e
...
...
@@ -387,6 +387,7 @@ private:
void
slotAccountAddedFromLrc
(
const
std
::
string
&
id
);
void
slotAccountRemovedFromLrc
(
const
std
::
string
&
id
);
void
slotInvalidAccountFromLrc
(
const
std
::
string
&
id
);
void
slotAccountNeedsMigration
(
const
std
::
string
&
id
);
void
slotAccountStatusChanged
(
const
std
::
string
&
id
);
void
slotConversationCleared
(
const
std
::
string
&
uid
);
void
slotModelSorted
();
...
...
@@ -1620,8 +1621,10 @@ CppImpl::refreshAccountSelectorWidget(int selection_row, const std::string& sele
gtk_list_store_append
(
store
,
&
iter
);
std
::
string
status
=
""
;
switch
(
acc_info
.
status
)
{
case
lrc
:
:
api
::
account
::
Status
::
INVALID
:
case
lrc
:
:
api
::
account
::
Status
::
ERROR_NEED_MIGRATION
:
status
=
"NEEDS MIGRATION"
;
break
;
case
lrc
:
:
api
::
account
::
Status
::
INVALID
:
case
lrc
:
:
api
::
account
::
Status
::
UNREGISTERED
:
status
=
"DISCONNECTED"
;
break
;
...
...
@@ -2070,6 +2073,31 @@ CppImpl::slotInvalidAccountFromLrc(const std::string& id)
}
}
void
CppImpl
::
slotAccountNeedsMigration
(
const
std
::
string
&
id
)
{
accountInfoForMigration_
=
&
lrc_
->
getAccountModel
().
getAccountInfo
(
id
);
if
(
accountInfoForMigration_
->
status
==
lrc
::
api
::
account
::
Status
::
ERROR_NEED_MIGRATION
)
{
leaveSettingsView
();
widgets
->
account_migration_view
=
account_migration_view_new
(
accountInfoForMigration_
);
g_signal_connect_swapped
(
widgets
->
account_migration_view
,
"account-migration-completed"
,
G_CALLBACK
(
on_handle_account_migrations
),
self
);
g_signal_connect_swapped
(
widgets
->
account_migration_view
,
"account-migration-failed"
,
G_CALLBACK
(
on_handle_account_migrations
),
self
);
gtk_widget_hide
(
widgets
->
ring_settings
);
showAccountSelectorWidget
(
false
);
gtk_widget_show
(
widgets
->
account_migration_view
);
gtk_stack_add_named
(
GTK_STACK
(
widgets
->
stack_main_view
),
widgets
->
account_migration_view
,
ACCOUNT_MIGRATION_VIEW_NAME
);
gtk_stack_set_visible_child_name
(
GTK_STACK
(
widgets
->
stack_main_view
),
ACCOUNT_MIGRATION_VIEW_NAME
);
}
}
lrc
::
api
::
conversation
::
Info
CppImpl
::
getCurrentConversation
(
GtkWidget
*
frame_call
)
{
...
...
@@ -2102,6 +2130,11 @@ CppImpl::slotAccountStatusChanged(const std::string& id)
// NOTE: Because the currentIdx can change (accounts can be re-ordered), force to select the accountInfo_->id
refreshAccountSelectorWidget
(
currentIdx
,
accountInfo_
->
id
);
if
(
accountInfo_
->
status
==
lrc
::
api
::
account
::
Status
::
ERROR_NEED_MIGRATION
)
{
slotAccountNeedsMigration
(
id
);
return
;
}
auto
*
frame_call
=
gtk_bin_get_child
(
GTK_BIN
(
widgets
->
frame_call
));
conversations_view_select_conversation
(
CONVERSATIONS_VIEW
(
widgets
->
treeview_conversations
),
getCurrentConversation
(
frame_call
).
uid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment