diff --git a/.gitignore b/.gitignore
index 95cc4e1..5d8904e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
_ignore
build
build.sh
+subprojects/libhandy-*
+subprojects/packagecache
*~
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index e0fed8a..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "subprojects/libhandy"]
- path = subprojects/libhandy
- url = https://gitlab.gnome.org/GNOME/libhandy.git
diff --git a/data/app.css b/data/app.css
index 1e1cedb..ae7fdd0 100644
--- a/data/app.css
+++ b/data/app.css
@@ -2,7 +2,7 @@
border-radius: 4px;
}
-.chip {
+.header .chip {
padding: 4px 12px;
border-radius: 4px;
border: 1px solid black;
@@ -28,7 +28,7 @@
.padded.app-view {
margin: 32px 0 32px 0;
}
-.app-view:not(.padded) .preferences row {
+.app-view:not(.padded) .content row {
border-radius: 0px;
}
diff --git a/data/com.github.bleakgrey.tootle.appdata.xml.in b/data/com.github.bleakgrey.tootle.appdata.xml.in
index 655e7f0..0a2bdde 100644
--- a/data/com.github.bleakgrey.tootle.appdata.xml.in
+++ b/data/com.github.bleakgrey.tootle.appdata.xml.in
@@ -81,3 +81,4 @@
+
diff --git a/data/com.github.bleakgrey.tootle.desktop.in b/data/com.github.bleakgrey.tootle.desktop.in
index 2da516f..39f0640 100644
--- a/data/com.github.bleakgrey.tootle.desktop.in
+++ b/data/com.github.bleakgrey.tootle.desktop.in
@@ -3,10 +3,11 @@ Type=Application
Name=Tootle
Comment=Mastodon Client
GenericName=Mastodon Client
-Exec=com.github.bleakgrey.tootle
+Exec=com.github.bleakgrey.tootle %u
Icon=com.github.bleakgrey.tootle
Terminal=false
Categories=GNOME;GTK;Network;
Keywords=toot;mastodon;social;network;post;
X-GNOME-Gettext-Domain=com.github.bleakgrey.tootle
X-GNOME-UsesNotifications=true
+MimeType=x-scheme-handler/tootle;
diff --git a/data/gresource.xml b/data/gresource.xml
index ea93678..f698731 100644
--- a/data/gresource.xml
+++ b/data/gresource.xml
@@ -14,6 +14,7 @@
ui/widgets/list_editor_item.ui
ui/widgets/attachment_slot.ui
ui/widgets/compose_attachment.ui
+ ui/dialogs/new_account.ui
ui/dialogs/compose.ui
ui/dialogs/main.ui
ui/dialogs/preferences.ui
diff --git a/data/meson.build b/data/meson.build
index ac5f6f7..4fc9def 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -34,3 +34,4 @@ i18n.merge_file(
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)
+
diff --git a/data/ui/dialogs/compose.ui b/data/ui/dialogs/compose.ui
index ff99502..e49e1d9 100644
--- a/data/ui/dialogs/compose.ui
+++ b/data/ui/dialogs/compose.ui
@@ -2,6 +2,7 @@
+
False
500
diff --git a/data/ui/dialogs/new_account.ui b/data/ui/dialogs/new_account.ui
new file mode 100644
index 0000000..6dc7180
--- /dev/null
+++ b/data/ui/dialogs/new_account.ui
@@ -0,0 +1,343 @@
+
+
+
+
+
+
+ False
+ True
+ 700
+ 500
+
+
+
+
+
+
+
+
diff --git a/data/ui/views/base.ui b/data/ui/views/base.ui
index d3d1255..c4c8a2c 100644
--- a/data/ui/views/base.ui
+++ b/data/ui/views/base.ui
@@ -1,8 +1,8 @@
-
+
-
+
True
False
@@ -26,8 +26,8 @@
True
False
- 632
- 632
+ 650
+ 650
True
@@ -125,7 +125,7 @@
status
- page1
+ page1
@@ -139,7 +139,7 @@
False
none
@@ -151,7 +151,7 @@
content
- page0
+ page0
1
diff --git a/data/ui/views/profile_header.ui b/data/ui/views/profile_header.ui
index 135804e..54af392 100644
--- a/data/ui/views/profile_header.ui
+++ b/data/ui/views/profile_header.ui
@@ -1,5 +1,5 @@
-
+
@@ -112,7 +112,7 @@
diff --git a/data/ui/widgets/accounts_button.ui b/data/ui/widgets/accounts_button.ui
index 7afabe5..685a54c 100644
--- a/data/ui/widgets/accounts_button.ui
+++ b/data/ui/widgets/accounts_button.ui
@@ -1,5 +1,5 @@
-
+
@@ -286,7 +286,7 @@
True
False
diff --git a/meson.build b/meson.build
index c2418de..e55c026 100644
--- a/meson.build
+++ b/meson.build
@@ -16,17 +16,11 @@ i18n = import('i18n')
add_global_arguments([
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
- '-DHANDY_USE_UNSTABLE_API',
+ # '-DHANDY_USE_UNSTABLE_API',
],
language: 'c',
)
-# FIXME Disable --disable-since-check after libhandy 1.0 is released
-add_project_arguments (
- '--disable-since-check',
- language: 'vala'
-)
-
asresources = gnome.compile_resources(
'as-resources', 'data/gresource.xml',
source_dir: 'data',
@@ -39,7 +33,7 @@ build_file = configure_file(
configuration: config
)
-libhandy_dep = dependency('libhandy-1', version: '>= 0.83.0', required: false)
+libhandy_dep = dependency('libhandy-1', version: '>= 1.0', required: false)
if not libhandy_dep.found()
libhandy = subproject(
'libhandy',
@@ -103,13 +97,13 @@ executable(
'src/Widgets/Attachment/Slot.vala',
'src/Widgets/Attachment/Picture.vala',
'src/Dialogs/ISavedWindow.vala',
+ 'src/Dialogs/NewAccount.vala',
'src/Dialogs/MainWindow.vala',
'src/Dialogs/About.vala',
'src/Dialogs/Compose.vala',
'src/Dialogs/Preferences.vala',
'src/Dialogs/ListEditor.vala',
'src/Views/Base.vala',
- 'src/Views/NewAccount.vala',
'src/Views/Timeline.vala',
'src/Views/Home.vala',
'src/Views/Local.vala',
diff --git a/po/POTFILES b/po/POTFILES
index 7c652f5..e8181d3 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -6,9 +6,9 @@ data/ui/dialogs/compose.ui
data/ui/dialogs/list_editor.ui
data/ui/dialogs/main.ui
data/ui/dialogs/preferences.ui
+data/ui/dialogs/new_account.ui
data/ui/views/base.ui
-data/ui/views/new_account.ui
data/ui/views/profile_header.ui
data/ui/widgets/accounts_button.ui
@@ -19,7 +19,7 @@ data/ui/widgets/list_editor_item.ui
data/ui/widgets/list_item.ui
data/ui/widgets/profile_field_row.ui
data/ui/widgets/status.ui
-data/ui/widgets/timeline_filter.ui
+data/ui/widgets/timeline_menu.ui
src/Build.vala
src/Application.vala
@@ -28,13 +28,14 @@ src/Drawing.vala
src/Html.vala
src/InstanceAccount.vala
src/Request.vala
-src/Time.vala
+src/DateTime.vala
src/Dialogs/About.vala
src/Dialogs/Compose.vala
src/Dialogs/ListEditor.vala
src/Dialogs/MainWindow.vala
src/Dialogs/Preferences.vala
+src/Dialogs/NewAccount.vala
src/Services/Accounts.vala
src/Services/Cache.vala
@@ -52,7 +53,6 @@ src/Views/Home.vala
src/Views/List.vala
src/Views/Lists.vala
src/Views/Local.vala
-src/Views/NewAccount.vala
src/Views/Notifications.vala
src/Views/Profile.vala
src/Views/Search.vala
@@ -67,5 +67,6 @@ src/Widgets/Conversation.vala
src/Widgets/Notification.vala
src/Widgets/RichLabel.vala
src/Widgets/Status.vala
-src/Widgets/TimelineFilter.vala
+src/Widgets/TimelineMenu.vala
src/Widgets/VisibilityPopover.vala
+
diff --git a/po/com.github.bleakgrey.tootle.pot b/po/com.github.bleakgrey.tootle.pot
index 9b2686e..72a0bb9 100644
--- a/po/com.github.bleakgrey.tootle.pot
+++ b/po/com.github.bleakgrey.tootle.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-02 17:48+0300\n"
+"POT-Creation-Date: 2020-09-07 21:26+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -105,7 +105,11 @@ msgstr ""
msgid "Media"
msgstr ""
-#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
+#: data/ui/dialogs/compose.ui:363
+msgid "Publish"
+msgstr ""
+
+#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@@ -125,6 +129,10 @@ msgstr ""
msgid "Save"
msgstr ""
+#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
+msgid "Compose"
+msgstr ""
+
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@@ -189,35 +197,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
-#: data/ui/views/new_account.ui:80
-msgid "Which Instance?\n"
+#: data/ui/dialogs/new_account.ui:15
+msgid "Add Account"
msgstr ""
-#: data/ui/views/new_account.ui:100
-msgid "What's an instance?"
+#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
+msgid "Back"
msgstr ""
-#: data/ui/views/new_account.ui:117
-msgid "instance.domain"
+#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
+msgid "Next"
msgstr ""
-#: data/ui/views/new_account.ui:146
-msgid "Grant Account Access\n"
+#: data/ui/dialogs/new_account.ui:118
+msgid "What is your instance?"
msgstr ""
-#: data/ui/views/new_account.ui:166
-msgid "Paste"
+#: data/ui/dialogs/new_account.ui:181
+msgid "Don't have one yet?"
msgstr ""
-#: data/ui/views/new_account.ui:167
-msgid "Paste your authorization code here"
+#: data/ui/dialogs/new_account.ui:232
+msgid "Enter Authorization Code"
msgstr ""
-#: data/ui/views/new_account.ui:182
-msgid "Try another instance?"
+#: data/ui/dialogs/new_account.ui:267
+msgid "Didn't receive the code?"
msgstr ""
-#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
+#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@@ -249,7 +257,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
-#: data/ui/widgets/accounts_button.ui:248
+#: data/ui/widgets/accounts_button.ui:236
+msgid "About"
+msgstr ""
+
+#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@@ -274,7 +286,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
-#: src/Widgets/Status.vala:232
+#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@@ -286,36 +298,10 @@ msgstr ""
msgid "Edit"
msgstr ""
-#: data/ui/widgets/timeline_filter.ui:26
-msgid "Show:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:56
-msgid "0 Posts"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:79
-msgid "0 Follows"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:102
-msgid "0 Followers"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:159
-msgid "Filter:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:189
-msgid "None"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:211
-msgid "Include Replies"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:233
-msgid "Only Media"
+#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
+#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
+#: src/Build.vala:15
+msgid " "
msgstr ""
#: src/Desktop.vala:18
@@ -330,15 +316,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
-#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
+#: src/DateTime.vala:11
+msgid "Just now"
+msgstr ""
+
+#: src/DateTime.vala:21
+msgid "Yesterday"
+msgstr ""
+
+#: src/DateTime.vala:24
+msgid "%b %e"
+msgstr ""
+
+#: src/DateTime.vala:27
+msgid "%b %e, %Y"
+msgstr ""
+
+#: src/Dialogs/About.vala:14
+msgid "Report an issue"
+msgstr ""
+
+#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
-#: src/Dialogs/Compose.vala:126
-msgid "Publish"
-msgstr ""
-
-#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
+#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@@ -366,12 +368,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
-#: src/Dialogs/MainWindow.vala:37
-msgid "Back"
+#: src/Dialogs/NewAccount.vala:73
+msgid "Close"
msgstr ""
-#: src/Dialogs/MainWindow.vala:40
-msgid "Compose"
+#: src/Dialogs/NewAccount.vala:74
+msgid "Add Another"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:116
+msgid "Please enter a valid instance URL"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:149
+msgid "Please enter a valid authorization code"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:165
+msgid "Instance failed to authorize the access token"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:179
+#, c-format
+msgid "Hello, %s!"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:207
+msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@@ -390,7 +413,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
-#: src/Views/Base.vala:47
+#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@@ -411,35 +434,52 @@ msgstr ""
msgid "Local"
msgstr ""
-#: src/Views/NewAccount.vala:27
-msgid "New Account"
-msgstr ""
-
-#: src/Views/NewAccount.vala:94
-msgid "Instance URL is invalid"
-msgstr ""
-
-#: src/Views/NewAccount.vala:135
-msgid "Please paste a valid authorization code"
-msgstr ""
-
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
-#: src/Views/Profile.vala:113
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Block \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Unblock \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Block Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Unblock Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:148
+msgid ""
+"Blocking a domain will:\n"
+"\n"
+"• Remove its public posts and notifications from your timelines\n"
+"• Remove its followers from your account\n"
+"• Prevent you from following its users"
+msgstr ""
+
+#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
-#: src/Views/Profile.vala:115
+#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
-#: src/Views/Profile.vala:117
+#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
-#: src/Views/Profile.vala:126
+#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@@ -468,11 +508,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
-#: src/Widgets/AccountsButton.vala:156
+#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
-#: src/Widgets/AccountsButton.vala:157
+#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@@ -480,26 +520,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
-#: src/Widgets/Status.vala:152
+#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
-#: src/Widgets/Status.vala:202
+#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
-#: src/Widgets/Status.vala:204
+#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
-#: src/Widgets/Status.vala:206
+#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""
diff --git a/po/de_DE.po b/po/de_DE.po
index 142f0f4..c7ed331 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-02 17:48+0300\n"
-"PO-Revision-Date: 2020-08-02 15:03+0300\n"
+"POT-Creation-Date: 2020-09-07 21:26+0300\n"
+"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: de\n"
@@ -105,7 +105,11 @@ msgstr ""
msgid "Media"
msgstr ""
-#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
+#: data/ui/dialogs/compose.ui:363
+msgid "Publish"
+msgstr ""
+
+#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@@ -125,6 +129,10 @@ msgstr ""
msgid "Save"
msgstr ""
+#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
+msgid "Compose"
+msgstr ""
+
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@@ -189,35 +197,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
-#: data/ui/views/new_account.ui:80
-msgid "Which Instance?\n"
+#: data/ui/dialogs/new_account.ui:15
+msgid "Add Account"
msgstr ""
-#: data/ui/views/new_account.ui:100
-msgid "What's an instance?"
+#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
+msgid "Back"
msgstr ""
-#: data/ui/views/new_account.ui:117
-msgid "instance.domain"
+#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
+msgid "Next"
msgstr ""
-#: data/ui/views/new_account.ui:146
-msgid "Grant Account Access\n"
+#: data/ui/dialogs/new_account.ui:118
+msgid "What is your instance?"
msgstr ""
-#: data/ui/views/new_account.ui:166
-msgid "Paste"
+#: data/ui/dialogs/new_account.ui:181
+msgid "Don't have one yet?"
msgstr ""
-#: data/ui/views/new_account.ui:167
-msgid "Paste your authorization code here"
+#: data/ui/dialogs/new_account.ui:232
+msgid "Enter Authorization Code"
msgstr ""
-#: data/ui/views/new_account.ui:182
-msgid "Try another instance?"
+#: data/ui/dialogs/new_account.ui:267
+msgid "Didn't receive the code?"
msgstr ""
-#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
+#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@@ -249,7 +257,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
-#: data/ui/widgets/accounts_button.ui:248
+#: data/ui/widgets/accounts_button.ui:236
+msgid "About"
+msgstr ""
+
+#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@@ -274,7 +286,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
-#: src/Widgets/Status.vala:232
+#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@@ -286,36 +298,10 @@ msgstr ""
msgid "Edit"
msgstr ""
-#: data/ui/widgets/timeline_filter.ui:26
-msgid "Show:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:56
-msgid "0 Posts"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:79
-msgid "0 Follows"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:102
-msgid "0 Followers"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:159
-msgid "Filter:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:189
-msgid "None"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:211
-msgid "Include Replies"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:233
-msgid "Only Media"
+#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
+#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
+#: src/Build.vala:15
+msgid " "
msgstr ""
#: src/Desktop.vala:18
@@ -330,15 +316,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
-#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
+#: src/DateTime.vala:11
+msgid "Just now"
+msgstr ""
+
+#: src/DateTime.vala:21
+msgid "Yesterday"
+msgstr ""
+
+#: src/DateTime.vala:24
+msgid "%b %e"
+msgstr ""
+
+#: src/DateTime.vala:27
+msgid "%b %e, %Y"
+msgstr ""
+
+#: src/Dialogs/About.vala:14
+msgid "Report an issue"
+msgstr ""
+
+#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
-#: src/Dialogs/Compose.vala:126
-msgid "Publish"
-msgstr ""
-
-#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
+#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@@ -366,12 +368,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
-#: src/Dialogs/MainWindow.vala:37
-msgid "Back"
+#: src/Dialogs/NewAccount.vala:73
+msgid "Close"
msgstr ""
-#: src/Dialogs/MainWindow.vala:40
-msgid "Compose"
+#: src/Dialogs/NewAccount.vala:74
+msgid "Add Another"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:116
+msgid "Please enter a valid instance URL"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:149
+msgid "Please enter a valid authorization code"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:165
+msgid "Instance failed to authorize the access token"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:179
+#, c-format
+msgid "Hello, %s!"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:207
+msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@@ -390,7 +413,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
-#: src/Views/Base.vala:47
+#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@@ -411,35 +434,52 @@ msgstr ""
msgid "Local"
msgstr ""
-#: src/Views/NewAccount.vala:27
-msgid "New Account"
-msgstr ""
-
-#: src/Views/NewAccount.vala:94
-msgid "Instance URL is invalid"
-msgstr ""
-
-#: src/Views/NewAccount.vala:135
-msgid "Please paste a valid authorization code"
-msgstr ""
-
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
-#: src/Views/Profile.vala:113
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Block \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Unblock \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Block Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Unblock Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:148
+msgid ""
+"Blocking a domain will:\n"
+"\n"
+"• Remove its public posts and notifications from your timelines\n"
+"• Remove its followers from your account\n"
+"• Prevent you from following its users"
+msgstr ""
+
+#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
-#: src/Views/Profile.vala:115
+#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
-#: src/Views/Profile.vala:117
+#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
-#: src/Views/Profile.vala:126
+#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@@ -468,11 +508,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
-#: src/Widgets/AccountsButton.vala:156
+#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
-#: src/Widgets/AccountsButton.vala:157
+#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@@ -480,26 +520,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
-#: src/Widgets/Status.vala:152
+#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
-#: src/Widgets/Status.vala:202
+#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
-#: src/Widgets/Status.vala:204
+#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
-#: src/Widgets/Status.vala:206
+#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""
diff --git a/po/es_MX.po b/po/es_MX.po
index 8824935..05f009e 100644
--- a/po/es_MX.po
+++ b/po/es_MX.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-02 17:48+0300\n"
-"PO-Revision-Date: 2020-08-02 15:03+0300\n"
+"POT-Creation-Date: 2020-09-07 21:26+0300\n"
+"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: es_MX\n"
@@ -105,7 +105,11 @@ msgstr ""
msgid "Media"
msgstr ""
-#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
+#: data/ui/dialogs/compose.ui:363
+msgid "Publish"
+msgstr ""
+
+#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@@ -125,6 +129,10 @@ msgstr ""
msgid "Save"
msgstr ""
+#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
+msgid "Compose"
+msgstr ""
+
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@@ -189,35 +197,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
-#: data/ui/views/new_account.ui:80
-msgid "Which Instance?\n"
+#: data/ui/dialogs/new_account.ui:15
+msgid "Add Account"
msgstr ""
-#: data/ui/views/new_account.ui:100
-msgid "What's an instance?"
+#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
+msgid "Back"
msgstr ""
-#: data/ui/views/new_account.ui:117
-msgid "instance.domain"
+#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
+msgid "Next"
msgstr ""
-#: data/ui/views/new_account.ui:146
-msgid "Grant Account Access\n"
+#: data/ui/dialogs/new_account.ui:118
+msgid "What is your instance?"
msgstr ""
-#: data/ui/views/new_account.ui:166
-msgid "Paste"
+#: data/ui/dialogs/new_account.ui:181
+msgid "Don't have one yet?"
msgstr ""
-#: data/ui/views/new_account.ui:167
-msgid "Paste your authorization code here"
+#: data/ui/dialogs/new_account.ui:232
+msgid "Enter Authorization Code"
msgstr ""
-#: data/ui/views/new_account.ui:182
-msgid "Try another instance?"
+#: data/ui/dialogs/new_account.ui:267
+msgid "Didn't receive the code?"
msgstr ""
-#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
+#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@@ -249,7 +257,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
-#: data/ui/widgets/accounts_button.ui:248
+#: data/ui/widgets/accounts_button.ui:236
+msgid "About"
+msgstr ""
+
+#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@@ -274,7 +286,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
-#: src/Widgets/Status.vala:232
+#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@@ -286,36 +298,10 @@ msgstr ""
msgid "Edit"
msgstr ""
-#: data/ui/widgets/timeline_filter.ui:26
-msgid "Show:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:56
-msgid "0 Posts"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:79
-msgid "0 Follows"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:102
-msgid "0 Followers"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:159
-msgid "Filter:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:189
-msgid "None"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:211
-msgid "Include Replies"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:233
-msgid "Only Media"
+#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
+#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
+#: src/Build.vala:15
+msgid " "
msgstr ""
#: src/Desktop.vala:18
@@ -330,15 +316,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
-#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
+#: src/DateTime.vala:11
+msgid "Just now"
+msgstr ""
+
+#: src/DateTime.vala:21
+msgid "Yesterday"
+msgstr ""
+
+#: src/DateTime.vala:24
+msgid "%b %e"
+msgstr ""
+
+#: src/DateTime.vala:27
+msgid "%b %e, %Y"
+msgstr ""
+
+#: src/Dialogs/About.vala:14
+msgid "Report an issue"
+msgstr ""
+
+#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
-#: src/Dialogs/Compose.vala:126
-msgid "Publish"
-msgstr ""
-
-#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
+#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@@ -366,12 +368,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
-#: src/Dialogs/MainWindow.vala:37
-msgid "Back"
+#: src/Dialogs/NewAccount.vala:73
+msgid "Close"
msgstr ""
-#: src/Dialogs/MainWindow.vala:40
-msgid "Compose"
+#: src/Dialogs/NewAccount.vala:74
+msgid "Add Another"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:116
+msgid "Please enter a valid instance URL"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:149
+msgid "Please enter a valid authorization code"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:165
+msgid "Instance failed to authorize the access token"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:179
+#, c-format
+msgid "Hello, %s!"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:207
+msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@@ -390,7 +413,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
-#: src/Views/Base.vala:47
+#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@@ -411,35 +434,52 @@ msgstr ""
msgid "Local"
msgstr ""
-#: src/Views/NewAccount.vala:27
-msgid "New Account"
-msgstr ""
-
-#: src/Views/NewAccount.vala:94
-msgid "Instance URL is invalid"
-msgstr ""
-
-#: src/Views/NewAccount.vala:135
-msgid "Please paste a valid authorization code"
-msgstr ""
-
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
-#: src/Views/Profile.vala:113
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Block \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Unblock \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Block Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Unblock Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:148
+msgid ""
+"Blocking a domain will:\n"
+"\n"
+"• Remove its public posts and notifications from your timelines\n"
+"• Remove its followers from your account\n"
+"• Prevent you from following its users"
+msgstr ""
+
+#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
-#: src/Views/Profile.vala:115
+#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
-#: src/Views/Profile.vala:117
+#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
-#: src/Views/Profile.vala:126
+#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@@ -468,11 +508,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
-#: src/Widgets/AccountsButton.vala:156
+#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
-#: src/Widgets/AccountsButton.vala:157
+#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@@ -480,26 +520,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
-#: src/Widgets/Status.vala:152
+#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
-#: src/Widgets/Status.vala:202
+#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
-#: src/Widgets/Status.vala:204
+#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
-#: src/Widgets/Status.vala:206
+#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 62fc5da..12f6742 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-02 17:48+0300\n"
-"PO-Revision-Date: 2020-08-02 15:03+0300\n"
+"POT-Creation-Date: 2020-09-07 21:26+0300\n"
+"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: fr\n"
@@ -105,7 +105,11 @@ msgstr ""
msgid "Media"
msgstr ""
-#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
+#: data/ui/dialogs/compose.ui:363
+msgid "Publish"
+msgstr ""
+
+#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@@ -125,6 +129,10 @@ msgstr ""
msgid "Save"
msgstr ""
+#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
+msgid "Compose"
+msgstr ""
+
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@@ -189,35 +197,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
-#: data/ui/views/new_account.ui:80
-msgid "Which Instance?\n"
+#: data/ui/dialogs/new_account.ui:15
+msgid "Add Account"
msgstr ""
-#: data/ui/views/new_account.ui:100
-msgid "What's an instance?"
+#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
+msgid "Back"
msgstr ""
-#: data/ui/views/new_account.ui:117
-msgid "instance.domain"
+#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
+msgid "Next"
msgstr ""
-#: data/ui/views/new_account.ui:146
-msgid "Grant Account Access\n"
+#: data/ui/dialogs/new_account.ui:118
+msgid "What is your instance?"
msgstr ""
-#: data/ui/views/new_account.ui:166
-msgid "Paste"
+#: data/ui/dialogs/new_account.ui:181
+msgid "Don't have one yet?"
msgstr ""
-#: data/ui/views/new_account.ui:167
-msgid "Paste your authorization code here"
+#: data/ui/dialogs/new_account.ui:232
+msgid "Enter Authorization Code"
msgstr ""
-#: data/ui/views/new_account.ui:182
-msgid "Try another instance?"
+#: data/ui/dialogs/new_account.ui:267
+msgid "Didn't receive the code?"
msgstr ""
-#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
+#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@@ -249,7 +257,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
-#: data/ui/widgets/accounts_button.ui:248
+#: data/ui/widgets/accounts_button.ui:236
+msgid "About"
+msgstr ""
+
+#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@@ -274,7 +286,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
-#: src/Widgets/Status.vala:232
+#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@@ -286,36 +298,10 @@ msgstr ""
msgid "Edit"
msgstr ""
-#: data/ui/widgets/timeline_filter.ui:26
-msgid "Show:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:56
-msgid "0 Posts"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:79
-msgid "0 Follows"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:102
-msgid "0 Followers"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:159
-msgid "Filter:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:189
-msgid "None"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:211
-msgid "Include Replies"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:233
-msgid "Only Media"
+#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
+#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
+#: src/Build.vala:15
+msgid " "
msgstr ""
#: src/Desktop.vala:18
@@ -330,15 +316,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
-#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
+#: src/DateTime.vala:11
+msgid "Just now"
+msgstr ""
+
+#: src/DateTime.vala:21
+msgid "Yesterday"
+msgstr ""
+
+#: src/DateTime.vala:24
+msgid "%b %e"
+msgstr ""
+
+#: src/DateTime.vala:27
+msgid "%b %e, %Y"
+msgstr ""
+
+#: src/Dialogs/About.vala:14
+msgid "Report an issue"
+msgstr ""
+
+#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
-#: src/Dialogs/Compose.vala:126
-msgid "Publish"
-msgstr ""
-
-#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
+#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@@ -366,12 +368,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
-#: src/Dialogs/MainWindow.vala:37
-msgid "Back"
+#: src/Dialogs/NewAccount.vala:73
+msgid "Close"
msgstr ""
-#: src/Dialogs/MainWindow.vala:40
-msgid "Compose"
+#: src/Dialogs/NewAccount.vala:74
+msgid "Add Another"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:116
+msgid "Please enter a valid instance URL"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:149
+msgid "Please enter a valid authorization code"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:165
+msgid "Instance failed to authorize the access token"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:179
+#, c-format
+msgid "Hello, %s!"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:207
+msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@@ -390,7 +413,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
-#: src/Views/Base.vala:47
+#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@@ -411,35 +434,52 @@ msgstr ""
msgid "Local"
msgstr ""
-#: src/Views/NewAccount.vala:27
-msgid "New Account"
-msgstr ""
-
-#: src/Views/NewAccount.vala:94
-msgid "Instance URL is invalid"
-msgstr ""
-
-#: src/Views/NewAccount.vala:135
-msgid "Please paste a valid authorization code"
-msgstr ""
-
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
-#: src/Views/Profile.vala:113
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Block \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Unblock \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Block Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Unblock Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:148
+msgid ""
+"Blocking a domain will:\n"
+"\n"
+"• Remove its public posts and notifications from your timelines\n"
+"• Remove its followers from your account\n"
+"• Prevent you from following its users"
+msgstr ""
+
+#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
-#: src/Views/Profile.vala:115
+#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
-#: src/Views/Profile.vala:117
+#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
-#: src/Views/Profile.vala:126
+#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@@ -468,11 +508,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
-#: src/Widgets/AccountsButton.vala:156
+#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
-#: src/Widgets/AccountsButton.vala:157
+#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@@ -480,26 +520,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
-#: src/Widgets/Status.vala:152
+#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
-#: src/Widgets/Status.vala:202
+#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
-#: src/Widgets/Status.vala:204
+#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
-#: src/Widgets/Status.vala:206
+#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""
diff --git a/po/pl_PL.po b/po/pl_PL.po
index 7d34ce2..5b32396 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-02 17:48+0300\n"
-"PO-Revision-Date: 2020-08-02 15:03+0300\n"
+"POT-Creation-Date: 2020-09-07 21:26+0300\n"
+"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: pl\n"
@@ -106,7 +106,11 @@ msgstr ""
msgid "Media"
msgstr ""
-#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
+#: data/ui/dialogs/compose.ui:363
+msgid "Publish"
+msgstr ""
+
+#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@@ -126,6 +130,10 @@ msgstr ""
msgid "Save"
msgstr ""
+#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
+msgid "Compose"
+msgstr ""
+
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@@ -190,35 +198,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
-#: data/ui/views/new_account.ui:80
-msgid "Which Instance?\n"
+#: data/ui/dialogs/new_account.ui:15
+msgid "Add Account"
msgstr ""
-#: data/ui/views/new_account.ui:100
-msgid "What's an instance?"
+#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
+msgid "Back"
msgstr ""
-#: data/ui/views/new_account.ui:117
-msgid "instance.domain"
+#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
+msgid "Next"
msgstr ""
-#: data/ui/views/new_account.ui:146
-msgid "Grant Account Access\n"
+#: data/ui/dialogs/new_account.ui:118
+msgid "What is your instance?"
msgstr ""
-#: data/ui/views/new_account.ui:166
-msgid "Paste"
+#: data/ui/dialogs/new_account.ui:181
+msgid "Don't have one yet?"
msgstr ""
-#: data/ui/views/new_account.ui:167
-msgid "Paste your authorization code here"
+#: data/ui/dialogs/new_account.ui:232
+msgid "Enter Authorization Code"
msgstr ""
-#: data/ui/views/new_account.ui:182
-msgid "Try another instance?"
+#: data/ui/dialogs/new_account.ui:267
+msgid "Didn't receive the code?"
msgstr ""
-#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
+#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@@ -250,7 +258,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
-#: data/ui/widgets/accounts_button.ui:248
+#: data/ui/widgets/accounts_button.ui:236
+msgid "About"
+msgstr ""
+
+#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@@ -275,7 +287,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
-#: src/Widgets/Status.vala:232
+#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@@ -287,36 +299,10 @@ msgstr ""
msgid "Edit"
msgstr ""
-#: data/ui/widgets/timeline_filter.ui:26
-msgid "Show:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:56
-msgid "0 Posts"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:79
-msgid "0 Follows"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:102
-msgid "0 Followers"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:159
-msgid "Filter:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:189
-msgid "None"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:211
-msgid "Include Replies"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:233
-msgid "Only Media"
+#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
+#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
+#: src/Build.vala:15
+msgid " "
msgstr ""
#: src/Desktop.vala:18
@@ -331,15 +317,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
-#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
+#: src/DateTime.vala:11
+msgid "Just now"
+msgstr ""
+
+#: src/DateTime.vala:21
+msgid "Yesterday"
+msgstr ""
+
+#: src/DateTime.vala:24
+msgid "%b %e"
+msgstr ""
+
+#: src/DateTime.vala:27
+msgid "%b %e, %Y"
+msgstr ""
+
+#: src/Dialogs/About.vala:14
+msgid "Report an issue"
+msgstr ""
+
+#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
-#: src/Dialogs/Compose.vala:126
-msgid "Publish"
-msgstr ""
-
-#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
+#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@@ -367,12 +369,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
-#: src/Dialogs/MainWindow.vala:37
-msgid "Back"
+#: src/Dialogs/NewAccount.vala:73
+msgid "Close"
msgstr ""
-#: src/Dialogs/MainWindow.vala:40
-msgid "Compose"
+#: src/Dialogs/NewAccount.vala:74
+msgid "Add Another"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:116
+msgid "Please enter a valid instance URL"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:149
+msgid "Please enter a valid authorization code"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:165
+msgid "Instance failed to authorize the access token"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:179
+#, c-format
+msgid "Hello, %s!"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:207
+msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@@ -391,7 +414,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
-#: src/Views/Base.vala:47
+#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@@ -412,35 +435,52 @@ msgstr ""
msgid "Local"
msgstr ""
-#: src/Views/NewAccount.vala:27
-msgid "New Account"
-msgstr ""
-
-#: src/Views/NewAccount.vala:94
-msgid "Instance URL is invalid"
-msgstr ""
-
-#: src/Views/NewAccount.vala:135
-msgid "Please paste a valid authorization code"
-msgstr ""
-
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
-#: src/Views/Profile.vala:113
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Block \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Unblock \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Block Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Unblock Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:148
+msgid ""
+"Blocking a domain will:\n"
+"\n"
+"• Remove its public posts and notifications from your timelines\n"
+"• Remove its followers from your account\n"
+"• Prevent you from following its users"
+msgstr ""
+
+#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
-#: src/Views/Profile.vala:115
+#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
-#: src/Views/Profile.vala:117
+#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
-#: src/Views/Profile.vala:126
+#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@@ -469,11 +509,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
-#: src/Widgets/AccountsButton.vala:156
+#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
-#: src/Widgets/AccountsButton.vala:157
+#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@@ -481,26 +521,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
-#: src/Widgets/Status.vala:152
+#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
-#: src/Widgets/Status.vala:202
+#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
-#: src/Widgets/Status.vala:204
+#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
-#: src/Widgets/Status.vala:206
+#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""
diff --git a/po/ru_RU.po b/po/ru_RU.po
index e9f7bb5..3e0b377 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-02 17:48+0300\n"
-"PO-Revision-Date: 2020-08-02 15:03+0300\n"
+"POT-Creation-Date: 2020-09-07 21:26+0300\n"
+"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ru\n"
@@ -106,7 +106,11 @@ msgstr ""
msgid "Media"
msgstr ""
-#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
+#: data/ui/dialogs/compose.ui:363
+msgid "Publish"
+msgstr ""
+
+#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@@ -126,6 +130,10 @@ msgstr ""
msgid "Save"
msgstr ""
+#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
+msgid "Compose"
+msgstr ""
+
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@@ -190,35 +198,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
-#: data/ui/views/new_account.ui:80
-msgid "Which Instance?\n"
+#: data/ui/dialogs/new_account.ui:15
+msgid "Add Account"
msgstr ""
-#: data/ui/views/new_account.ui:100
-msgid "What's an instance?"
+#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
+msgid "Back"
msgstr ""
-#: data/ui/views/new_account.ui:117
-msgid "instance.domain"
+#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
+msgid "Next"
msgstr ""
-#: data/ui/views/new_account.ui:146
-msgid "Grant Account Access\n"
+#: data/ui/dialogs/new_account.ui:118
+msgid "What is your instance?"
msgstr ""
-#: data/ui/views/new_account.ui:166
-msgid "Paste"
+#: data/ui/dialogs/new_account.ui:181
+msgid "Don't have one yet?"
msgstr ""
-#: data/ui/views/new_account.ui:167
-msgid "Paste your authorization code here"
+#: data/ui/dialogs/new_account.ui:232
+msgid "Enter Authorization Code"
msgstr ""
-#: data/ui/views/new_account.ui:182
-msgid "Try another instance?"
+#: data/ui/dialogs/new_account.ui:267
+msgid "Didn't receive the code?"
msgstr ""
-#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
+#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@@ -250,7 +258,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
-#: data/ui/widgets/accounts_button.ui:248
+#: data/ui/widgets/accounts_button.ui:236
+msgid "About"
+msgstr ""
+
+#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@@ -275,7 +287,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
-#: src/Widgets/Status.vala:232
+#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@@ -287,36 +299,10 @@ msgstr ""
msgid "Edit"
msgstr ""
-#: data/ui/widgets/timeline_filter.ui:26
-msgid "Show:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:56
-msgid "0 Posts"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:79
-msgid "0 Follows"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:102
-msgid "0 Followers"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:159
-msgid "Filter:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:189
-msgid "None"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:211
-msgid "Include Replies"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:233
-msgid "Only Media"
+#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
+#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
+#: src/Build.vala:15
+msgid " "
msgstr ""
#: src/Desktop.vala:18
@@ -331,15 +317,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
-#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
+#: src/DateTime.vala:11
+msgid "Just now"
+msgstr ""
+
+#: src/DateTime.vala:21
+msgid "Yesterday"
+msgstr ""
+
+#: src/DateTime.vala:24
+msgid "%b %e"
+msgstr ""
+
+#: src/DateTime.vala:27
+msgid "%b %e, %Y"
+msgstr ""
+
+#: src/Dialogs/About.vala:14
+msgid "Report an issue"
+msgstr ""
+
+#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
-#: src/Dialogs/Compose.vala:126
-msgid "Publish"
-msgstr ""
-
-#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
+#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@@ -367,12 +369,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
-#: src/Dialogs/MainWindow.vala:37
-msgid "Back"
+#: src/Dialogs/NewAccount.vala:73
+msgid "Close"
msgstr ""
-#: src/Dialogs/MainWindow.vala:40
-msgid "Compose"
+#: src/Dialogs/NewAccount.vala:74
+msgid "Add Another"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:116
+msgid "Please enter a valid instance URL"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:149
+msgid "Please enter a valid authorization code"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:165
+msgid "Instance failed to authorize the access token"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:179
+#, c-format
+msgid "Hello, %s!"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:207
+msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@@ -391,7 +414,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
-#: src/Views/Base.vala:47
+#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@@ -412,35 +435,52 @@ msgstr ""
msgid "Local"
msgstr ""
-#: src/Views/NewAccount.vala:27
-msgid "New Account"
-msgstr ""
-
-#: src/Views/NewAccount.vala:94
-msgid "Instance URL is invalid"
-msgstr ""
-
-#: src/Views/NewAccount.vala:135
-msgid "Please paste a valid authorization code"
-msgstr ""
-
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
-#: src/Views/Profile.vala:113
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Block \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Unblock \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Block Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Unblock Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:148
+msgid ""
+"Blocking a domain will:\n"
+"\n"
+"• Remove its public posts and notifications from your timelines\n"
+"• Remove its followers from your account\n"
+"• Prevent you from following its users"
+msgstr ""
+
+#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
-#: src/Views/Profile.vala:115
+#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
-#: src/Views/Profile.vala:117
+#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
-#: src/Views/Profile.vala:126
+#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@@ -469,11 +509,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
-#: src/Widgets/AccountsButton.vala:156
+#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
-#: src/Widgets/AccountsButton.vala:157
+#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@@ -481,26 +521,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
-#: src/Widgets/Status.vala:152
+#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
-#: src/Widgets/Status.vala:202
+#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
-#: src/Widgets/Status.vala:204
+#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
-#: src/Widgets/Status.vala:206
+#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 5a53fed..ab2e00a 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-02 17:48+0300\n"
-"PO-Revision-Date: 2020-08-02 15:03+0300\n"
+"POT-Creation-Date: 2020-09-07 21:26+0300\n"
+"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: zh_CN\n"
@@ -104,7 +104,11 @@ msgstr ""
msgid "Media"
msgstr ""
-#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
+#: data/ui/dialogs/compose.ui:363
+msgid "Publish"
+msgstr ""
+
+#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@@ -124,6 +128,10 @@ msgstr ""
msgid "Save"
msgstr ""
+#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
+msgid "Compose"
+msgstr ""
+
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@@ -188,35 +196,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
-#: data/ui/views/new_account.ui:80
-msgid "Which Instance?\n"
+#: data/ui/dialogs/new_account.ui:15
+msgid "Add Account"
msgstr ""
-#: data/ui/views/new_account.ui:100
-msgid "What's an instance?"
+#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
+msgid "Back"
msgstr ""
-#: data/ui/views/new_account.ui:117
-msgid "instance.domain"
+#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
+msgid "Next"
msgstr ""
-#: data/ui/views/new_account.ui:146
-msgid "Grant Account Access\n"
+#: data/ui/dialogs/new_account.ui:118
+msgid "What is your instance?"
msgstr ""
-#: data/ui/views/new_account.ui:166
-msgid "Paste"
+#: data/ui/dialogs/new_account.ui:181
+msgid "Don't have one yet?"
msgstr ""
-#: data/ui/views/new_account.ui:167
-msgid "Paste your authorization code here"
+#: data/ui/dialogs/new_account.ui:232
+msgid "Enter Authorization Code"
msgstr ""
-#: data/ui/views/new_account.ui:182
-msgid "Try another instance?"
+#: data/ui/dialogs/new_account.ui:267
+msgid "Didn't receive the code?"
msgstr ""
-#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
+#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@@ -248,7 +256,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
-#: data/ui/widgets/accounts_button.ui:248
+#: data/ui/widgets/accounts_button.ui:236
+msgid "About"
+msgstr ""
+
+#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@@ -273,7 +285,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
-#: src/Widgets/Status.vala:232
+#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@@ -285,36 +297,10 @@ msgstr ""
msgid "Edit"
msgstr ""
-#: data/ui/widgets/timeline_filter.ui:26
-msgid "Show:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:56
-msgid "0 Posts"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:79
-msgid "0 Follows"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:102
-msgid "0 Followers"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:159
-msgid "Filter:"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:189
-msgid "None"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:211
-msgid "Include Replies"
-msgstr ""
-
-#: data/ui/widgets/timeline_filter.ui:233
-msgid "Only Media"
+#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
+#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
+#: src/Build.vala:15
+msgid " "
msgstr ""
#: src/Desktop.vala:18
@@ -329,15 +315,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
-#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
+#: src/DateTime.vala:11
+msgid "Just now"
+msgstr ""
+
+#: src/DateTime.vala:21
+msgid "Yesterday"
+msgstr ""
+
+#: src/DateTime.vala:24
+msgid "%b %e"
+msgstr ""
+
+#: src/DateTime.vala:27
+msgid "%b %e, %Y"
+msgstr ""
+
+#: src/Dialogs/About.vala:14
+msgid "Report an issue"
+msgstr ""
+
+#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
-#: src/Dialogs/Compose.vala:126
-msgid "Publish"
-msgstr ""
-
-#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
+#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@@ -365,12 +367,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
-#: src/Dialogs/MainWindow.vala:37
-msgid "Back"
+#: src/Dialogs/NewAccount.vala:73
+msgid "Close"
msgstr ""
-#: src/Dialogs/MainWindow.vala:40
-msgid "Compose"
+#: src/Dialogs/NewAccount.vala:74
+msgid "Add Another"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:116
+msgid "Please enter a valid instance URL"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:149
+msgid "Please enter a valid authorization code"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:165
+msgid "Instance failed to authorize the access token"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:179
+#, c-format
+msgid "Hello, %s!"
+msgstr ""
+
+#: src/Dialogs/NewAccount.vala:207
+msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@@ -389,7 +412,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
-#: src/Views/Base.vala:47
+#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@@ -410,35 +433,52 @@ msgstr ""
msgid "Local"
msgstr ""
-#: src/Views/NewAccount.vala:27
-msgid "New Account"
-msgstr ""
-
-#: src/Views/NewAccount.vala:94
-msgid "Instance URL is invalid"
-msgstr ""
-
-#: src/Views/NewAccount.vala:135
-msgid "Please paste a valid authorization code"
-msgstr ""
-
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
-#: src/Views/Profile.vala:113
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Block \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:134
+#, c-format
+msgid "Unblock \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Block Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:145
+#, c-format
+msgid "Unblock Entire \"%s\"?"
+msgstr ""
+
+#: src/Views/Profile.vala:148
+msgid ""
+"Blocking a domain will:\n"
+"\n"
+"• Remove its public posts and notifications from your timelines\n"
+"• Remove its followers from your account\n"
+"• Prevent you from following its users"
+msgstr ""
+
+#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
-#: src/Views/Profile.vala:115
+#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
-#: src/Views/Profile.vala:117
+#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
-#: src/Views/Profile.vala:126
+#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@@ -467,11 +507,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
-#: src/Widgets/AccountsButton.vala:156
+#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
-#: src/Widgets/AccountsButton.vala:157
+#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@@ -479,26 +519,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
-#: src/Widgets/Status.vala:152
+#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
-#: src/Widgets/Status.vala:202
+#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
-#: src/Widgets/Status.vala:204
+#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
-#: src/Widgets/Status.vala:206
+#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
-#: src/Widgets/Status.vala:226
+#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""
diff --git a/src/Application.vala b/src/Application.vala
index 7a43722..5e9897e 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -11,6 +11,7 @@ namespace Tootle {
public static Application app;
public static Dialogs.MainWindow? window;
+ public static Dialogs.NewAccount? new_account_window;
public static Window window_dummy;
public static Settings settings;
@@ -32,7 +33,10 @@ namespace Tootle {
public signal void refresh ();
public signal void toast (string title);
- public signal void error (string title, string text);
+ public signal void error (string title, string? text);
+
+ public CssProvider css_provider = new CssProvider ();
+ public CssProvider zoom_css_provider = new CssProvider ();
public const GLib.OptionEntry[] app_options = {
{ "hidden", 0, 0, OptionArg.NONE, ref start_hidden, "Do not show main window on start", null },
@@ -49,7 +53,7 @@ namespace Tootle {
construct {
application_id = Build.DOMAIN;
- flags = ApplicationFlags.FLAGS_NONE;
+ flags = ApplicationFlags.HANDLES_OPEN;
}
public string[] ACCEL_ABOUT = {"F1"};
@@ -88,11 +92,17 @@ namespace Tootle {
cache = new Cache ();
accounts.init ();
- app.error.connect (app.on_error);
+ app.error.connect ((title, msg) => {
+ inform (Gtk.MessageType.ERROR, title, msg);
+ });
window_dummy = new Window ();
add_window (window_dummy);
+ css_provider.load_from_resource (@"$(Build.RESOURCES)app.css");
+ StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+ StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), zoom_css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+
set_accels_for_action ("app.about", ACCEL_ABOUT);
set_accels_for_action ("app.compose", ACCEL_NEW_POST);
set_accels_for_action ("app.back", ACCEL_BACK);
@@ -105,19 +115,43 @@ namespace Tootle {
}
protected override void activate () {
- if (window != null) {
- window.present ();
- return;
- }
+ present_window ();
if (start_hidden) {
start_hidden = false;
return;
}
+ }
- info ("Creating new window");
- window = new Dialogs.MainWindow (this);
- window.present ();
+ public override void open (File[] files, string hint) {
+ foreach (File file in files) {
+ string uri = file.get_uri ();
+ if (new_account_window != null)
+ new_account_window.redirect (uri);
+ else
+ warning (@"Received an unexpected uri to open: $uri");
+ return;
+ }
+ }
+
+ public void present_window () {
+ if (accounts.is_empty ()) {
+ message ("Presenting NewAccount dialog");
+ if (new_account_window == null)
+ new Dialogs.NewAccount ();
+ }
+ else {
+ message ("Presenting MainWindow");
+ if (window == null)
+ window = new Dialogs.MainWindow (this);
+ window.present ();
+ }
+ }
+
+ public bool on_window_closed () {
+ if (!settings.work_in_background || accounts.is_empty ())
+ app.remove_window (window_dummy);
+ return false;
}
void compose_activated () {
@@ -141,31 +175,31 @@ namespace Tootle {
new Dialogs.About ();
}
- public void on_error (string title, string msg){
+ public void inform (Gtk.MessageType type, string text, string? msg = null, Gtk.Window? win = window){
var dlg = new Gtk.MessageDialog (
- window,
+ win,
Gtk.DialogFlags.MODAL,
- Gtk.MessageType.ERROR,
+ type,
Gtk.ButtonsType.OK,
null
);
- dlg.text = title;
+ dlg.text = text;
dlg.secondary_text = msg;
- dlg.transient_for = window;
+ dlg.transient_for = win;
dlg.run ();
dlg.destroy ();
}
- public bool question (string text, string? secondary = null, Gtk.Window? win = window) {
+ public bool question (string text, string? msg = null, Gtk.Window? win = window) {
var dlg = new Gtk.MessageDialog (
- window,
+ win,
Gtk.DialogFlags.MODAL,
Gtk.MessageType.QUESTION,
Gtk.ButtonsType.YES_NO,
null
);
dlg.text = text;
- dlg.secondary_text = secondary;
+ dlg.secondary_text = msg;
dlg.transient_for = win;
var i = dlg.run ();
dlg.destroy ();
diff --git a/src/Dialogs/MainWindow.vala b/src/Dialogs/MainWindow.vala
index e0c5bb5..0025739 100644
--- a/src/Dialogs/MainWindow.vala
+++ b/src/Dialogs/MainWindow.vala
@@ -30,8 +30,6 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
Views.Base? last_view = null;
- CssProvider zoom_css_provider = new CssProvider ();
-
construct {
back_button.clicked.connect (() => back ());
compose_button.clicked.connect (() => new Dialogs.Compose ());
@@ -48,10 +46,6 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
settings.bind_property ("dark-theme", Gtk.Settings.get_default (), "gtk-application-prefer-dark-theme", BindingFlags.SYNC_CREATE);
settings.notify["post-text-size"].connect (() => on_zoom_level_changed ());
- var provider = new Gtk.CssProvider ();
- provider.load_from_resource (@"$(Build.RESOURCES)app.css");
- StyleContext.add_provider_for_screen (Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
- StyleContext.add_provider_for_screen (Screen.get_default (), zoom_css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
on_zoom_level_changed ();
button_press_event.connect (on_button_press);
@@ -67,9 +61,6 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
resizable: true,
window_position: WindowPosition.CENTER
);
-
- if (accounts.is_empty ())
- open_view (new Views.NewAccount (false));
}
public int get_visible_id () {
@@ -117,14 +108,10 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
}
}
- public override bool delete_event (EventAny event) {
- destroy.connect (() => {
- if (!settings.work_in_background || accounts.is_empty ())
- app.remove_window (window_dummy);
- window = null;
- });
- return false;
- }
+ public override bool delete_event (Gdk.EventAny event) {
+ window = null;
+ return app.on_window_closed ();
+ }
public void switch_timeline (int32 num) {
timeline_stack.visible_child_name = num.to_string ();
@@ -186,7 +173,7 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
""".printf (ZOOM_CLASS, settings.post_text_size);
try {
- zoom_css_provider.load_from_data (css);
+ app.zoom_css_provider.load_from_data (css);
}
catch (Error e) {
warning (@"Can't set zoom level: $(e.message)");
diff --git a/src/Dialogs/NewAccount.vala b/src/Dialogs/NewAccount.vala
new file mode 100644
index 0000000..75917dd
--- /dev/null
+++ b/src/Dialogs/NewAccount.vala
@@ -0,0 +1,233 @@
+using Gtk;
+
+[GtkTemplate (ui = "/com/github/bleakgrey/tootle/ui/dialogs/new_account.ui")]
+public class Tootle.Dialogs.NewAccount: Gtk.Window {
+
+ const string scopes = "read%20write%20follow";
+
+ protected bool is_working { get; set; default = false; }
+ protected string? redirect_uri { get; set; }
+ protected bool use_auto_auth { get; set; default = true; }
+ protected InstanceAccount account { get; set; default = new InstanceAccount.empty (""); }
+
+ [GtkChild]
+ Button back_button;
+ [GtkChild]
+ Button next_button;
+
+ [GtkChild]
+ Stack stack;
+ [GtkChild]
+ Box instance_step;
+ [GtkChild]
+ Box code_step;
+ [GtkChild]
+ Box done_step;
+
+ [GtkChild]
+ Entry instance_entry;
+ [GtkChild]
+ Entry code_entry;
+ [GtkChild]
+ Label code_label;
+ [GtkChild]
+ Label hello_label;
+
+ public NewAccount () {
+ Object (transient_for: window);
+ StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), app.css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+ reset ();
+ present ();
+ new_account_window = this;
+
+ bind_property ("use-auto-auth", code_label, "visible", BindingFlags.SYNC_CREATE);
+ }
+
+ public override bool delete_event (Gdk.EventAny event) {
+ new_account_window = null;
+ return app.on_window_closed ();
+ }
+
+ string setup_redirect_uri () {
+ try {
+ if (!use_auto_auth)
+ throw new Oopsie.INTERNAL ("Using manual auth method");
+
+ GLib.Process.spawn_command_line_sync (@"xdg-mime default $(Build.DOMAIN).desktop x-scheme-handler/tootle");
+
+ message ("Successfully associated MIME type for automatic authorization");
+ return "tootle://auth_code";
+ }
+ catch (Error e) {
+ warning (e.message);
+ use_auto_auth = false;
+ return "urn:ietf:wg:oauth:2.0:oob";
+ }
+ }
+
+ [GtkCallback]
+ bool on_activate_code_label_link (string uri) {
+ use_auto_auth = false;
+ reset ();
+ return true;
+ }
+
+ void reset () {
+ message ("Reset state");
+ account = new InstanceAccount.empty (account.instance);
+ stack.visible_child = instance_step;
+ invalidate ();
+ }
+
+ void invalidate () {
+ next_button.sensitive = !is_working;
+ next_button.label = stack.visible_child == done_step ? _("Close") : _("Next");
+ back_button.label = stack.visible_child == done_step ? _("Add Another") : _("Back");
+ back_button.visible = stack.visible_child != instance_step;
+ }
+
+ void oopsie (string title, string msg = "") {
+ warning (@"$title $msg");
+ app.inform (Gtk.MessageType.ERROR, title, msg, this);
+ }
+
+ async void step () throws Error {
+ if (stack.visible_child == done_step) {
+ if (accounts.is_empty ())
+ accounts.switch_account (0);
+
+ app.present_window ();
+ destroy ();
+ return;
+ }
+
+ if (stack.visible_child == instance_step)
+ setup_instance ();
+
+ if (account.client_secret == null || account.client_id == null) {
+ yield register_client ();
+ return;
+ }
+
+ yield request_token ();
+ }
+
+ void setup_instance () throws Error {
+ message ("Checking instance URL");
+
+ var str = instance_entry.text
+ .replace ("/", "")
+ .replace (":", "")
+ .replace ("https", "")
+ .replace ("http", "");
+ account.instance = "https://"+str;
+ instance_entry.text = str;
+
+ if (str.char_count () <= 0 || !("." in account.instance))
+ throw new Oopsie.USER (_("Please enter a valid instance URL"));
+ }
+
+ async void register_client () throws Error {
+ message ("Registering client");
+
+ var msg = new Request.POST (@"/api/v1/apps")
+ .with_account (account)
+ .with_param ("client_name", Build.NAME)
+ .with_param ("website", Build.WEBSITE)
+ .with_param ("scopes", scopes)
+ .with_param ("redirect_uris", redirect_uri = setup_redirect_uri ());
+ yield msg.await ();
+
+ var root = network.parse (msg);
+ account.client_id = root.get_string_member ("client_id");
+ account.client_secret = root.get_string_member ("client_secret");
+ message ("OK: Instance registered client");
+
+ stack.visible_child = code_step;
+ open_confirmation_page ();
+ }
+
+ void open_confirmation_page () {
+ message ("Opening permission request page");
+
+ var pars = @"scope=$scopes&response_type=code&redirect_uri=$redirect_uri&client_id=$(account.client_id)";
+ var url = @"$(account.instance)/oauth/authorize?$pars";
+ Desktop.open_uri (url);
+ }
+
+ async void request_token () throws Error {
+ if (code_entry.text.char_count () <= 10)
+ throw new Oopsie.USER (_("Please enter a valid authorization code"));
+
+ message ("Requesting access token");
+ var token_req = new Request.POST (@"/oauth/token")
+ .with_account (account)
+ .with_param ("client_id", account.client_id)
+ .with_param ("client_secret", account.client_secret)
+ .with_param ("redirect_uri", redirect_uri)
+ .with_param ("grant_type", "authorization_code")
+ .with_param ("code", code_entry.text);
+ yield token_req.await ();
+
+ var root = network.parse (token_req);
+ account.access_token = root.get_string_member ("access_token");
+
+ if (account.access_token == null)
+ throw new Oopsie.INSTANCE (_("Instance failed to authorize the access token"));
+
+ message ("Trying to get the user profile");
+ var profile_req = new Request.GET ("/api/v1/accounts/verify_credentials")
+ .with_account (account);
+ yield profile_req.await ();
+
+ var node = network.parse_node (profile_req);
+ var profile = API.Account.from (node);
+ account.patch (profile);
+
+ message ("Saving account");
+ accounts.add (account);
+
+ hello_label.label = _("Hello, %s!").printf (account.handle);
+ stack.visible_child = done_step;
+ }
+
+ public void redirect (string uri) {
+ present ();
+ message (@"Received uri: $uri");
+
+ var query = new Soup.URI (uri).get_query ();
+ var split = query.split ("=");
+ var code = split[1];
+
+ code_entry.text = code;
+ is_working = false;
+ on_next_clicked ();
+ }
+
+ [GtkCallback]
+ void on_next_clicked () {
+ if (is_working) return;
+
+ is_working = true;
+ invalidate ();
+ step.begin ((obj, res) => {
+ try {
+ step.end (res);
+ }
+ catch (Oopsie.INSTANCE e) {
+ oopsie (_("Server returned an error"), e.message);
+ }
+ catch (Error e) {
+ oopsie (e.message);
+ }
+ is_working = false;
+ invalidate ();
+ });
+ }
+
+ [GtkCallback]
+ void on_back_clicked () {
+ reset ();
+ }
+
+}
diff --git a/src/InstanceAccount.vala b/src/InstanceAccount.vala
index 99cc8a8..61c2dfb 100644
--- a/src/InstanceAccount.vala
+++ b/src/InstanceAccount.vala
@@ -3,10 +3,10 @@ using Gee;
public class Tootle.InstanceAccount : API.Account, IStreamListener {
- public string instance { get; set; }
- public string client_id { get; set; }
- public string client_secret { get; set; }
- public string access_token { get; set; }
+ public string? instance { get; set; }
+ public string? client_id { get; set; }
+ public string? client_secret { get; set; }
+ public string? access_token { get; set; }
public int64 last_seen_notification { get; set; default = 0; }
public bool has_unread_notifications { get; set; default = false; }
diff --git a/src/Services/Accounts.vala b/src/Services/Accounts.vala
index bd6d66b..63d66b9 100644
--- a/src/Services/Accounts.vala
+++ b/src/Services/Accounts.vala
@@ -2,142 +2,140 @@ using Gee;
public class Tootle.Accounts : GLib.Object {
- private string dir_path;
- private string file_path;
+ private string dir_path;
+ private string file_path;
- public ArrayList saved { get; set; default = new ArrayList (); }
- public InstanceAccount? active { get; set; }
+ public ArrayList saved { get; set; default = new ArrayList (); }
+ public InstanceAccount? active { get; set; }
- construct {
- dir_path = @"$(GLib.Environment.get_user_config_dir ())/$(app.application_id)";
- file_path = @"$dir_path/accounts.json";
- }
+ construct {
+ dir_path = @"$(GLib.Environment.get_user_config_dir ())/$(app.application_id)";
+ file_path = @"$dir_path/accounts.json";
+ }
- public void switch_account (int id) {
- var acc = saved.@get (id);
- info (@"Switching to account: $(acc.handle)...");
- new Request.GET ("/api/v1/accounts/verify_credentials")
- .with_account (acc)
- .then ((sess, mess) => {
- var node = network.parse_node (mess);
- var updated = API.Account.from (node);
- acc.patch (updated);
- info ("OK: Token is valid");
- active = acc;
- settings.current_account = id;
- })
- .on_error ((code, reason) => {
- warning ("Token invalid!");
- app.error (
- _("Network Error"),
- _("The instance has invalidated this session. Please sign in again.\n\n%s").printf (reason)
- );
- })
- .exec ();
- }
+ public void switch_account (int id) {
+ var acc = saved.@get (id);
+ message (@"Switching to $(acc.handle)...");
+ new Request.GET ("/api/v1/accounts/verify_credentials")
+ .with_account (acc)
+ .then ((sess, mess) => {
+ var node = network.parse_node (mess);
+ var updated = API.Account.from (node);
+ acc.patch (updated);
+ message ("OK: Token is valid");
+ active = acc;
+ settings.current_account = id;
+ })
+ .on_error ((code, reason) => {
+ warning ("Token invalid!");
+ app.error (
+ _("Network Error"),
+ _("The instance has invalidated this session. Please sign in again.\n\n%s").printf (reason)
+ );
+ })
+ .exec ();
+ }
- public void add (InstanceAccount account) {
- info (@"Adding new account: $(account.handle)");
- saved.add (account);
- save ();
- switch_account (saved.size - 1);
- account.subscribe ();
- }
+ public void add (InstanceAccount account) {
+ message (@"Adding new account: $(account.handle)");
+ saved.add (account);
+ save ();
+ switch_account (saved.size - 1);
+ account.subscribe ();
+ }
- public void remove (InstanceAccount account) {
- account.unsubscribe ();
- saved.remove (account);
- saved.notify_property ("size");
+ public void remove (InstanceAccount account) {
+ account.unsubscribe ();
+ saved.remove (account);
+ saved.notify_property ("size");
- if (saved.size < 1)
- active = null;
- else {
- var id = settings.current_account - 1;
- if (id > saved.size - 1)
- id = saved.size - 1;
- else if (id < saved.size - 1)
- id = 0;
- switch_account (id);
- }
- save ();
+ if (saved.size < 1)
+ active = null;
+ else {
+ var id = settings.current_account - 1;
+ if (id > saved.size - 1)
+ id = saved.size - 1;
+ else if (id < saved.size - 1)
+ id = 0;
+ switch_account (id);
+ }
+ save ();
- if (is_empty ())
- window.open_view (new Views.NewAccount (false));
- }
+ if (is_empty ())
+ new Dialogs.NewAccount ();
+ }
- public bool is_empty () {
- return saved.size == 0;
- }
+ public bool is_empty () {
+ return saved.size == 0;
+ }
- public void init () {
- save (false);
- load ();
+ public void init () {
+ save (false);
+ load ();
- if (saved.size < 1)
- window.open_view (new Views.NewAccount (false));
- else
- switch_account (settings.current_account);
- }
+ if (!is_empty ())
+ switch_account (settings.current_account);
+ }
- public void save (bool overwrite = true) {
- try {
- var dir = File.new_for_path (dir_path);
- if (!dir.query_exists ())
- dir.make_directory ();
+ public void save (bool overwrite = true) {
+ try {
+ var dir = File.new_for_path (dir_path);
+ if (!dir.query_exists ())
+ dir.make_directory ();
- var file = File.new_for_path (file_path);
- if (file.query_exists () && !overwrite)
- return;
+ var file = File.new_for_path (file_path);
+ if (file.query_exists () && !overwrite)
+ return;
- var builder = new Json.Builder ();
- builder.begin_array ();
- saved.foreach ((acc) => {
- var node = acc.to_json ();
- builder.add_value (node);
- return true;
- });
- builder.end_array ();
+ var builder = new Json.Builder ();
+ builder.begin_array ();
+ saved.foreach ((acc) => {
+ var node = acc.to_json ();
+ builder.add_value (node);
+ return true;
+ });
+ builder.end_array ();
- var generator = new Json.Generator ();
- generator.set_root (builder.get_root ());
- var data = generator.to_data (null);
+ var generator = new Json.Generator ();
+ generator.set_root (builder.get_root ());
+ var data = generator.to_data (null);
- if (file.query_exists ())
- file.@delete ();
+ if (file.query_exists ())
+ file.@delete ();
- FileOutputStream stream = file.create (FileCreateFlags.PRIVATE);
- stream.write (data.data);
- info ("Saved accounts");
- }
- catch (Error e){
- warning (e.message);
- }
- }
+ FileOutputStream stream = file.create (FileCreateFlags.PRIVATE);
+ stream.write (data.data);
+ message ("Saved accounts");
+ }
+ catch (Error e){
+ warning (e.message);
+ }
+ }
- private void load () {
- try {
- uint8[] data;
- string etag;
- var file = File.new_for_path (file_path);
- file.load_contents (null, out data, out etag);
- var contents = (string) data;
+ private void load () {
+ try {
+ uint8[] data;
+ string etag;
+ var file = File.new_for_path (file_path);
+ file.load_contents (null, out data, out etag);
+ var contents = (string) data;
- var parser = new Json.Parser ();
- parser.load_from_data (contents, -1);
- var array = parser.get_root ().get_array ();
+ var parser = new Json.Parser ();
+ parser.load_from_data (contents, -1);
+ var array = parser.get_root ().get_array ();
- array.foreach_element ((_arr, _i, node) => {
- var account = InstanceAccount.from (node);
- if (account != null) {
- saved.add (account);
- account.subscribe ();
- }
- });
- info (@"Loaded $(saved.size) accounts");
- }
- catch (Error e){
- warning (e.message);
- }
- }
+ array.foreach_element ((_arr, _i, node) => {
+ var account = InstanceAccount.from (node);
+ if (account != null) {
+ saved.add (account);
+ account.subscribe ();
+ }
+ });
+ message (@"Loaded $(saved.size) accounts");
+ }
+ catch (Error e){
+ warning (e.message);
+ }
+ }
}
diff --git a/src/Views/Base.vala b/src/Views/Base.vala
index 42b333a..671da45 100644
--- a/src/Views/Base.vala
+++ b/src/Views/Base.vala
@@ -35,7 +35,6 @@ public class Tootle.Views.Base : Box {
public string state { get; set; default = "status"; }
public string status_message { get; set; default = STATUS_EMPTY; }
- public bool allow_closing { get; set; default = true; }
public bool empty {
get {
diff --git a/src/Views/NewAccount.vala b/src/Views/NewAccount.vala
deleted file mode 100644
index 350a4e0..0000000
--- a/src/Views/NewAccount.vala
+++ /dev/null
@@ -1,186 +0,0 @@
-using Gtk;
-
-public class Tootle.Views.NewAccount : Views.Base {
-
- private string? instance { get; set; }
- private string? code { get; set; }
- private string scopes = "read%20write%20follow";
-
- private string? client_id { get; set; }
- private string? client_secret { get; set; }
- private string? access_token { get; set; }
- private string redirect_uri { get; set; default = "urn:ietf:wg:oauth:2.0:oob"; } //TODO: Investigate URI handling for automatic token getting
- private InstanceAccount account;
-
- private Button next_button;
- private Entry instance_entry;
- private Entry code_entry;
- private Label reset_label;
-
- private Stack stack;
- private Widget step1;
- private Widget step2;
-
- public NewAccount (bool allow_closing = true) {
- Object (
- allow_closing: allow_closing,
- label: _("New Account")
- );
-
- var builder = new Builder.from_resource (@"$(Build.RESOURCES)ui/views/new_account.ui");
- content.pack_start (builder.get_object ("wizard") as Grid);
- state = "content";
- next_button = builder.get_object ("next") as Button;
- reset_label = builder.get_object ("reset") as Label;
- instance_entry = builder.get_object ("instance_entry") as Entry;
- code_entry = builder.get_object ("code_entry") as Entry;
-
- stack = builder.get_object ("stack") as Stack;
- step1 = builder.get_object ("step1") as Widget;
- step2 = builder.get_object ("step2") as Widget;
-
- next_button.clicked.connect (on_next_clicked);
- reset_label.activate_link.connect (reset);
- instance_entry.text = "https://mastodon.social/"; //TODO: REMOVE ME
- info ("New account view was requested");
- }
-
- bool reset () {
- info ("State invalidated");
- instance = code = client_id = client_secret = access_token = null;
- instance_entry.sensitive = true;
- stack.visible_child = step1;
- return true;
- }
-
- void oopsie (string message) {
- warning (message);
- }
-
- void on_next_clicked () {
- try {
- step ();
- }
- catch (Oopsie e) {
- oopsie (e.message);
- }
- }
-
- void step () throws Error {
- if (instance == null)
- setup_instance ();
-
- if (client_secret == null || client_id == null) {
- register_client ();
- return;
- }
-
- code = code_entry.text;
- request_token ();
- }
-
- void setup_instance () throws Error {
- info ("Checking instance URL");
-
- var str = instance_entry.text
- .replace ("/", "")
- .replace (":", "")
- .replace ("https", "")
- .replace ("http", "");
- instance = "https://"+str;
- instance_entry.text = str;
-
- if (str.char_count () <= 0 || !("." in instance))
- throw new Oopsie.USER (_("Instance URL is invalid"));
- }
-
- void register_client () throws Error {
- info ("Registering client");
- instance_entry.sensitive = false;
-
- account = new InstanceAccount.empty (instance);
-
- new Request.POST (@"/api/v1/apps")
- .with_param ("client_name", Build.NAME)
- .with_param ("website", Build.WEBSITE)
- .with_param ("scopes", scopes)
- .with_param ("redirect_uris", redirect_uri)
- .with_account (account)
- .then ((sess, msg) => {
- var root = network.parse (msg);
- client_id = root.get_string_member ("client_id");
- client_secret = root.get_string_member ("client_secret");
- info ("OK: instance registered client");
- stack.visible_child = step2;
-
- open_confirmation_page ();
- })
- .on_error ((status, reason) => {
- oopsie (reason);
- instance_entry.sensitive = true;
- })
- .exec ();
- }
-
- void open_confirmation_page () {
- info ("Opening permission request page");
-
- var pars = @"scope=$scopes&response_type=code&redirect_uri=$redirect_uri&client_id=$client_id";
- var url = @"$instance/oauth/authorize?$pars";
- Desktop.open_uri (url);
- }
-
- void request_token () throws Error {
- if (code.char_count () <= 10)
- throw new Oopsie.USER (_("Please paste a valid authorization code"));
-
- info ("Requesting access token");
- new Request.POST (@"/oauth/token")
- .with_account (account)
- .with_param ("client_id", client_id)
- .with_param ("client_secret", client_secret)
- .with_param ("redirect_uri", redirect_uri)
- .with_param ("grant_type", "authorization_code")
- .with_param ("code", code)
- .then ((sess, msg) => {
- var root = network.parse (msg);
- access_token = root.get_string_member ("access_token");
- account.access_token = access_token;
- account.id = "";
- info ("OK: received access token");
- request_profile ();
- })
- .on_error ((code, reason) => oopsie (reason))
- .exec ();
- }
-
- void request_profile () throws Error {
- info ("Testing received access token");
- new Request.GET ("/api/v1/accounts/verify_credentials")
- .with_account (account)
- .then ((sess, msg) => {
- var node = network.parse_node (msg);
- var account = API.Account.from (node);
- info ("OK: received user profile");
- save (account);
- })
- .on_error ((status, reason) => {
- reset ();
- oopsie (reason);
- })
- .exec ();
- }
-
- void save (API.Account profile) {
- info ("Account validated. Saving...");
- account.patch (profile);
- account.instance = instance;
- account.client_id = client_id;
- account.client_secret = client_secret;
- account.access_token = access_token;
- accounts.add (account);
-
- destroy ();
- }
-
-}
diff --git a/src/Widgets/AccountsButton.vala b/src/Widgets/AccountsButton.vala
index 6d1a468..3bf0516 100644
--- a/src/Widgets/AccountsButton.vala
+++ b/src/Widgets/AccountsButton.vala
@@ -112,8 +112,6 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
popover.popdown ();
});
- on_account_changed (null);
-
notify["active"].connect (() => {
if (active && invalidated)
rebuild ();
@@ -129,7 +127,7 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
var i = r.get_index ();
if (i >= accounts.saved.size) {
active = false;
- window.open_view (new Views.NewAccount (true));
+ new Dialogs.NewAccount ();
popover.popdown ();
return;
}
diff --git a/subprojects/libhandy b/subprojects/libhandy
deleted file mode 160000
index eb8696c..0000000
--- a/subprojects/libhandy
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit eb8696cca00c5511943fbc270d522d43209d8f0e
diff --git a/subprojects/libhandy.wrap b/subprojects/libhandy.wrap
index 7fe6696..970e3ab 100644
--- a/subprojects/libhandy.wrap
+++ b/subprojects/libhandy.wrap
@@ -1,4 +1,5 @@
-[wrap-git]
-directory=libhandy
-url=https://gitlab.gnome.org/GNOME/libhandy.git
-revision=0.83.0
+[wrap-file]
+directory=libhandy-e3fb7400c88136b866ae4a63457c6fd76d0a75b6
+source_url=https://gitlab.gnome.org/GNOME/libhandy/-/archive/e3fb7400c88136b866ae4a63457c6fd76d0a75b6/libhandy-e3fb7400c88136b866ae4a63457c6fd76d0a75b6.tar
+source_filename=libhandy-e3fb7400c88136b866ae4a63457c6fd76d0a75b6.tar
+source_hash=cbf34b9b2201ed25a41c9fa0ccfa132d4f87e0ce01a163ab3ad6c3701bec7d31