diff options
author | George Stark <[email protected]> | 2023-01-19 18:12:02 +0300 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-08-31 14:25:41 +0200 |
commit | a060d180f0e5e44ab0d0972c42dc4e392f458892 (patch) | |
tree | 968516f99a79758b6d57a0a8e4cd498d71ae1de6 /src/terminal-window.c | |
parent | 0ba98fd1691157c9cce1f9910df09d8ee9daa444 (diff) | |
download | mate-terminal-a060d180f0e5e44ab0d0972c42dc4e392f458892.tar.bz2 mate-terminal-a060d180f0e5e44ab0d0972c42dc4e392f458892.tar.xz |
Refactoring
rename some url-related variables
rename TerminalURLFlavour enum to TerminalURLFlavor
backport of 0789b02ee11038743fde08795eb4a1ac0bcc3f47
from gnome-terminal to be a bit close to gnome-terminal source
Diffstat (limited to 'src/terminal-window.c')
-rw-r--r-- | src/terminal-window.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/terminal-window.c b/src/terminal-window.c index 4608267..d23fd87 100644 --- a/src/terminal-window.c +++ b/src/terminal-window.c @@ -1375,7 +1375,7 @@ popup_open_url_callback (GtkAction *action, if (info == NULL) return; - terminal_util_open_url (GTK_WIDGET (window), info->string, info->flavour, + terminal_util_open_url (GTK_WIDGET (window), info->url, info->flavor, gtk_get_current_event_time ()); } @@ -1390,11 +1390,11 @@ popup_copy_url_callback (GtkAction *action, if (info == NULL) return; - if (info->string == NULL) + if (info->url == NULL) return; clipboard = gtk_widget_get_clipboard (GTK_WIDGET (window), GDK_SELECTION_CLIPBOARD); - gtk_clipboard_set_text (clipboard, info->string, -1); + gtk_clipboard_set_text (clipboard, info->url, -1); } static void @@ -1494,9 +1494,9 @@ popup_clipboard_targets_received_cb (GtkClipboard *clipboard, can_paste = targets != NULL && gtk_targets_include_text (targets, n_targets); can_paste_uris = targets != NULL && gtk_targets_include_uri (targets, n_targets); - show_link = info->string != NULL && (info->flavour == FLAVOR_AS_IS || info->flavour == FLAVOR_DEFAULT_TO_HTTP); - show_email_link = info->string != NULL && info->flavour == FLAVOR_EMAIL; - show_call_link = info->string != NULL && info->flavour == FLAVOR_VOIP_CALL; + show_link = info->url != NULL && (info->flavor == FLAVOR_AS_IS || info->flavor == FLAVOR_DEFAULT_TO_HTTP); + show_email_link = info->url != NULL && info->flavor == FLAVOR_EMAIL; + show_call_link = info->url != NULL && info->flavor == FLAVOR_VOIP_CALL; G_GNUC_BEGIN_IGNORE_DEPRECATIONS; action = gtk_action_group_get_action (priv->action_group, "PopupSendEmail"); @@ -1576,8 +1576,8 @@ screen_show_popup_menu_callback (TerminalScreen *screen, static gboolean screen_match_clicked_cb (TerminalScreen *screen, - const char *match, - int flavour, + const char *url, + int url_flavor, guint state, TerminalWindow *window) { @@ -1586,16 +1586,16 @@ screen_match_clicked_cb (TerminalScreen *screen, if (screen != priv->active_screen) return FALSE; - switch (flavour) + switch (url_flavor) { #ifdef ENABLE_SKEY case FLAVOR_SKEY: - terminal_skey_do_popup (GTK_WINDOW (window), screen, match); + terminal_skey_do_popup (GTK_WINDOW (window), screen, url); break; #endif default: gtk_widget_grab_focus (GTK_WIDGET (screen)); - terminal_util_open_url (GTK_WIDGET (window), match, flavour, + terminal_util_open_url (GTK_WIDGET (window), url, url_flavor, gtk_get_current_event_time ()); break; } |