ui(): Port to new adwaita dialogs

This commit is contained in:
Julian Schmidhuber committed 2024-02-27 16:38:09 +01:00
1 parent 10a05fa20f
commit 028ffc92de
20 files changed
+242 -177

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;
Adw.AboutWindow about {
Adw.AboutDialog about {
application-icon: "icon";
application-name: "Flare";
version: "@VERSION@";
+60 -47
View File
@@ -1,56 +1,69 @@
using Gtk 4.0;
using Adw 1;
template $FlChannelInfoDialog: Adw.MessageDialog {
heading: bind template.channel as <$FlChannel>.title;
template $FlChannelInfoDialog: Adw.Dialog {
can-focus: true;
content-height: 600;
content-width: 450;
extra-child: Box {
spacing: 5;
orientation: vertical;
Adw.PreferencesGroup {
title: _("Channel Information");
header-suffix:
Adw.Avatar avatar {
icon-name: "user-bookmarks-symbolic";
size: 30;
};
Adw.ActionRow row_phone {
styles ["property"]
title: _("Phone Number");
icon-name: "call-start-symbolic";
}
Adw.ActionRow row_disappearing {
styles ["property"]
title: _("Disappearing Messages");
icon-name: "appointment-missed-symbolic";
}
Adw.ActionRow row_description {
styles ["property"]
title: _("Description");
subtitle-lines: 2;
}
Adw.ToolbarView {
[top]
Adw.HeaderBar {
title-widget: Adw.WindowTitle {
title: bind template.channel as <$FlChannel>.title;
};
}
// Session Reset
Button button_reset_session {
accessibility {
label: C_("accessibility", "Reset Session");
Adw.Clamp {
orientation: horizontal;
tightening-threshold: 300;
maximum-size: 600;
Box {
spacing: 5;
orientation: vertical;
Adw.PreferencesGroup {
title: _("Channel Information");
header-suffix:
Adw.Avatar avatar {
icon-name: "user-bookmarks-symbolic";
size: 30;
};
Adw.ActionRow row_phone {
styles ["property"]
title: _("Phone Number");
icon-name: "call-start-symbolic";
}
Adw.ActionRow row_disappearing {
styles ["property"]
title: _("Disappearing Messages");
icon-name: "appointment-missed-symbolic";
}
Adw.ActionRow row_description {
styles ["property"]
title: _("Description");
subtitle-lines: 2;
}
}
// Session Reset
Button button_reset_session {
accessibility {
label: C_("accessibility", "Reset Session");
}
label: _("Reset Session");
clicked => $reset_session() swapped;
}
}
label: _("Reset Session");
clicked => $reset_session() swapped;
}
};
responses [
close: _("Close"),
]
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;
Adw.MessageDialog dialog {
Adw.AlertDialog dialog {
heading: _("Clear messages");
body: _("This will clear all locally stored messages. This will also close the application.");
default-response: "cancel";
+1 -1
View File
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;
Adw.MessageDialog dialog {
Adw.AlertDialog dialog {
heading: _("Unlink");
body: _("This will unlink this device and remove all locally saved data. This will also close the application such that it can be relinked when opening it again.");
default-response: "cancel";
+1 -1
View File
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;
template $FlErrorDialog: Adw.MessageDialog {
template $FlErrorDialog: Adw.AlertDialog {
heading: _("Error");
response => $handle_response();
+6 -8
View File
@@ -1,14 +1,12 @@
using Gtk 4.0;
using Adw 1;
template $FlLinkedDevicesWindow: Adw.Window {
template $FlLinkedDevicesWindow: Adw.Dialog {
can-focus: true;
default-height: 600;
default-width: 450;
destroy-with-parent: true;
modal: true;
content-height: 600;
content-width: 450;
content: Adw.ToolbarView {
Adw.ToolbarView {
[top]
Adw.HeaderBar {
title-widget: Adw.WindowTitle {
@@ -26,10 +24,10 @@ template $FlLinkedDevicesWindow: Adw.Window {
Gtk.ListView list_devices {}
}
};
}
}
Adw.MessageDialog add_device_dialog {
Adw.AlertDialog add_device_dialog {
heading: _("Add Linked Device");
body: _("Please insert the URL of the device to link.");
default-response: "cancel";
+1 -1
View File
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;
template $FlPreferencesWindow: Adw.PreferencesWindow {
template $FlPreferencesWindow: Adw.PreferencesDialog {
Adw.PreferencesPage {
title: _("General");
icon-name: "preferences-system-symbolic";
+5 -8
View File
@@ -1,15 +1,12 @@
using Gtk 4.0;
using Adw 1;
template $FlSetupWindow: Adw.Window {
template $FlSetupWindow: Adw.Dialog {
can-focus: true;
default-height: 600;
default-width: 450;
destroy-with-parent: true;
modal: true;
deletable: false;
content-height: 600;
content-width: 450;
content: Adw.ToastOverlay toast_overlay {
Adw.ToastOverlay toast_overlay {
child: Box {
orientation: vertical;
@@ -532,5 +529,5 @@ template $FlSetupWindow: Adw.Window {
}
}
};
};
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;
Adw.MessageDialog dialog {
Adw.AlertDialog dialog {
heading: _("Submit Captcha");
// Translators: Do not translate tags around "on this website".
body: _("Submit a Captcha challenge. The token can be obtained from the error message that was displayed from Flare. The captcha must be filled out <a href=\"https://signalcaptchas.org/challenge/generate.html\">on this website</a> and the link to open Signal must be pasted to the corresponding entry. Note that the captcha is only valid for about one minute.");