Only in src: Makefile
Only in src: Makefile.in
diff -u ../src1/terminal-regex.c src/terminal-regex.c
--- ../src1/terminal-regex.c 2020-03-05 15:43:41.000000000 -0600
+++ src/terminal-regex.c 2021-12-11 23:00:49.069491803 -0600
@@ -342,6 +342,9 @@
assert_match (REGEX_EMAIL, "", "foo@bar.com");
assert_match (REGEX_EMAIL, "foo@bar.com", "foo@bar.com");
+ /* Fediverse */
+ assert_match (REGEX_FEDI, "Yo this is not an email @foo@bar.com", "@foo@bar.com");
+
/* Sip, examples from rfc 3261 */
assert_match (REGEX_URL_VOIP, "sip:alice@atlanta.com;maddr=239.255.255.1;ttl=15", ENTIRE);
assert_match (REGEX_URL_VOIP, "sip:alice@atlanta.com", ENTIRE);
diff -u ../src1/terminal-regex.h src/terminal-regex.h
--- ../src1/terminal-regex.h 2021-12-11 23:57:49.000000000 -0600
+++ src/terminal-regex.h 2021-12-11 23:13:11.004087922 -0600
@@ -157,6 +157,7 @@
#define REGEX_URL_HTTP APOS_START_DEF "(?flavor = url_regex_flavors[i];
tag_data->tag = vte_terminal_match_add_regex (terminal, url_regexes[i], 0);
@@ -2021,6 +2021,7 @@
* the client, and popup only if that's not handled. */
if (button_press_event && button_press_event (widget, event))
return TRUE;
+ g_strdup_printf ("popup happening flavor %d \n", url_flavor);
terminal_screen_do_popup (screen, event, hyperlink, url, url_flavor, number_info);
hyperlink = NULL; /* adopted to the popup info */
diff -u ../src1/terminal-screen.h src/terminal-screen.h
--- ../src1/terminal-screen.h 2021-12-11 23:57:49.000000000 -0600
+++ src/terminal-screen.h 2021-12-11 23:59:35.651323012 -0600
@@ -30,6 +30,7 @@
FLAVOR_AS_IS,
FLAVOR_DEFAULT_TO_HTTP,
FLAVOR_VOIP_CALL,
+ FLAVOR_FEDI,
FLAVOR_EMAIL,
FLAVOR_NUMBER,
FLAVOR_LP
diff -u ../src1/terminal-util.c src/terminal-util.c
--- ../src1/terminal-util.c 2021-12-11 23:57:49.000000000 -0600
+++ src/terminal-util.c 2021-12-18 19:32:52.008937795 -0600
@@ -293,13 +293,21 @@
gs_free_error GError *error = NULL;
gs_free char *uri = NULL;
- g_return_if_fail (orig_url != NULL);
-
+ g_return_if_fail (orig_url != NULL);
switch (flavor)
{
case FLAVOR_DEFAULT_TO_HTTP:
uri = g_strdup_printf ("http://%s", orig_url);
break;
+ case FLAVOR_FEDI:
+ /**
+ 1) sanity check (make sure it's actually a fedi address
+ 2) send...somewhere?
+ */
+ // gs_free char **uri2 = g_strsplit (orig_url, '@', 3);
+ uri = g_strdup_printf ("tootto:%s",orig_url);
+ break;
+
case FLAVOR_EMAIL:
if (g_ascii_strncasecmp ("mailto:", orig_url, 7) != 0)
uri = g_strdup_printf ("mailto:%s", orig_url);
diff -u ../src1/terminal-window.c src/terminal-window.c
--- ../src1/terminal-window.c 2021-12-11 23:57:49.000000000 -0600
+++ src/terminal-window.c 2021-12-18 19:18:57.199287206 -0600
@@ -1714,7 +1714,12 @@
gs_unref_object GMenu *section2 = g_menu_new ();
const char *open_label = NULL, *copy_label = NULL;
+
switch (info->url_flavor) {
+ case FLAVOR_FEDI:
+ open_label = _("Send _Toot");
+ copy_label = _("Copy Fedi _ID");
+ break;
case FLAVOR_EMAIL:
open_label = _("Send Mail _To…");
copy_label = _("Copy Mail _Address");