diff --git a/data/resources/resources.gresource.xml b/data/resources/resources.gresource.xml
index 4841e5be..a1600b22 100644
--- a/data/resources/resources.gresource.xml
+++ b/data/resources/resources.gresource.xml
@@ -54,7 +54,7 @@
ui/room-creation.ui
ui/session-verification.ui
ui/verification-emoji.ui
- ui/incoming-verification.ui
+ ui/identity-verification-widget.ui
ui/qr-code-scanner.ui
ui/components-video-player.ui
style.css
diff --git a/data/resources/ui/content.ui b/data/resources/ui/content.ui
index e8b6156a..d8e7b62c 100644
--- a/data/resources/ui/content.ui
+++ b/data/resources/ui/content.ui
@@ -75,7 +75,7 @@
-
+
diff --git a/data/resources/ui/incoming-verification.ui b/data/resources/ui/identity-verification-widget.ui
similarity index 99%
rename from data/resources/ui/incoming-verification.ui
rename to data/resources/ui/identity-verification-widget.ui
index 284dc426..32e690c2 100644
--- a/data/resources/ui/incoming-verification.ui
+++ b/data/resources/ui/identity-verification-widget.ui
@@ -1,6 +1,6 @@
-
+
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 2ebe8994..e3af9408 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -31,6 +31,7 @@ data/resources/ui/event-menu.ui
data/resources/ui/event-source-dialog.ui
data/resources/ui/login.ui
data/resources/ui/in-app-notification.ui
+data/resources/ui/identity-verification-widget.ui
data/resources/ui/media-viewer.ui
data/resources/ui/room-creation.ui
data/resources/ui/session.ui
@@ -96,6 +97,9 @@ src/session/content/room_history/message_row/text.rs
src/session/content/room_history/mod.rs
src/session/content/room_history/state_row.rs
src/session/content/room_history/state_row/mod.rs
+src/session/content/verification/emoji.rs
+src/session/content/verification/identity_verification_widget.rs
+src/session/content/verification/session_verification.rs
src/session/media_viewer.rs
src/session/mod.rs
src/session/room_creation/mod.rs
@@ -124,10 +128,8 @@ src/session/sidebar/mod.rs
src/session/sidebar/room_row.rs
src/session/sidebar/row.rs
src/session/sidebar/selection.rs
-src/session/verification/emoji.rs
src/session/verification/identity_verification.rs
src/session/verification/mod.rs
-src/session/verification/session_verification.rs
src/session/verification/verification_list.rs
src/session/user.rs
src/user_facing_error.rs
diff --git a/src/meson.build b/src/meson.build
index aa389a35..794f42c6 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -79,6 +79,10 @@ sources = files(
'session/content/room_details/member_page/mod.rs',
'session/content/room_details/member_page/member_row.rs',
'session/content/room_details/mod.rs',
+ 'session/content/verification/emoji.rs',
+ 'session/content/verification/mod.rs',
+ 'session/content/verification/identity_verification_widget.rs',
+ 'session/content/verification/session_verification.rs',
'session/media_viewer.rs',
'session/room/event.rs',
'session/room/event_actions.rs',
@@ -111,10 +115,7 @@ sources = files(
'session/sidebar/account_switcher/user_entry.rs',
'session/sidebar/category_type.rs',
'session/verification/mod.rs',
- 'session/verification/emoji.rs',
'session/verification/identity_verification.rs',
- 'session/verification/incoming_verification.rs',
- 'session/verification/session_verification.rs',
'session/verification/verification_list.rs',
)
diff --git a/src/session/content/mod.rs b/src/session/content/mod.rs
index bef5ea22..bafe566e 100644
--- a/src/session/content/mod.rs
+++ b/src/session/content/mod.rs
@@ -3,15 +3,18 @@ mod invite;
mod markdown_popover;
mod room_details;
mod room_history;
+pub mod verification;
use self::explore::Explore;
use self::invite::Invite;
use self::markdown_popover::MarkdownPopover;
use self::room_details::RoomDetails;
use self::room_history::RoomHistory;
+use self::verification::IdentityVerificationWidget;
+
use crate::session::sidebar::{Entry, EntryType};
-use crate::session::verification::{IdentityVerification, IncomingVerification, VerificationMode};
+use crate::session::verification::{IdentityVerification, VerificationMode};
use adw::subclass::prelude::*;
use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*, CompositeTemplate};
@@ -47,7 +50,7 @@ mod imp {
#[template_child]
pub verification_page: TemplateChild,
#[template_child]
- pub incoming_verification: TemplateChild,
+ pub identity_verification_widget: TemplateChild,
}
#[glib::object_subclass]
@@ -148,7 +151,7 @@ mod imp {
.connect_visible_child_notify(clone!(@weak obj => move |stack| {
let priv_ = imp::Content::from_instance(&obj);
if stack.visible_child().as_ref() != Some(priv_.verification_page.upcast_ref::()) {
- priv_.incoming_verification.set_request(None);
+ priv_.identity_verification_widget.set_request(None);
}
}));
}
@@ -273,7 +276,9 @@ impl Content {
.as_ref()
.and_then(|item| item.downcast_ref::())
{
- priv_.incoming_verification.set_request(Some(item.clone()));
+ priv_
+ .identity_verification_widget
+ .set_request(Some(item.clone()));
priv_.stack.set_visible_child(&*priv_.verification_page);
}
}
diff --git a/src/session/verification/emoji.rs b/src/session/content/verification/emoji.rs
similarity index 100%
rename from src/session/verification/emoji.rs
rename to src/session/content/verification/emoji.rs
diff --git a/src/session/verification/incoming_verification.rs b/src/session/content/verification/identity_verification_widget.rs
similarity index 86%
rename from src/session/verification/incoming_verification.rs
rename to src/session/content/verification/identity_verification_widget.rs
index a4bfad7e..9ee9c651 100644
--- a/src/session/verification/incoming_verification.rs
+++ b/src/session/content/verification/identity_verification_widget.rs
@@ -2,12 +2,13 @@ use adw::subclass::prelude::*;
use gtk::{glib, glib::clone, prelude::*, subclass::prelude::*, CompositeTemplate};
use log::warn;
+use super::Emoji;
use crate::components::SpinnerButton;
use crate::contrib::screenshot;
use crate::contrib::QRCode;
use crate::contrib::QRCodeExt;
use crate::contrib::QrCodeScanner;
-use crate::session::verification::{Emoji, IdentityVerification, SasData, VerificationMode};
+use crate::session::verification::{IdentityVerification, SasData, VerificationMode};
use crate::spawn;
use gettextrs::gettext;
use matrix_sdk::encryption::verification::QrVerificationData;
@@ -19,8 +20,8 @@ mod imp {
use std::cell::RefCell;
#[derive(Debug, Default, CompositeTemplate)]
- #[template(resource = "/org/gnome/FractalNext/incoming-verification.ui")]
- pub struct IncomingVerification {
+ #[template(resource = "/org/gnome/FractalNext/identity-verification-widget.ui")]
+ pub struct IdentityVerificationWidget {
pub request: RefCell