[Xfce4-commits] [apps/xfce4-terminal] 01/01: Improve code formatting
noreply at xfce.org
noreply at xfce.org
Sun May 14 16:59:42 CEST 2017
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit 82101e7350ab5e2f3e4602794f2bd21ff21198be
Author: Igor <f2404 at yandex.ru>
Date: Sun May 14 10:59:34 2017 -0400
Improve code formatting
---
terminal/terminal-widget.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/terminal/terminal-widget.c b/terminal/terminal-widget.c
index ae32d28..dab073a 100644
--- a/terminal/terminal-widget.c
+++ b/terminal/terminal-widget.c
@@ -669,10 +669,8 @@ terminal_widget_open_uri (TerminalWidget *widget,
break;
case PATTERN_TYPE_EMAIL:
- if (strncmp (wlink, MAILTO, strlen (MAILTO)) == 0)
- uri = g_strdup (wlink);
- else
- uri = g_strconcat (MAILTO, wlink, NULL);
+ uri = strncmp (wlink, MAILTO, strlen (MAILTO)) == 0
+ ? g_strdup (wlink) : g_strconcat (MAILTO, wlink, NULL);
break;
default:
@@ -723,8 +721,7 @@ terminal_widget_update_highlight_urls (TerminalWidget *widget)
for (i = 0; i < G_N_ELEMENTS (regex_patterns); i++)
if (widget->regex_tags[i] != -1)
{
- vte_terminal_match_remove (VTE_TERMINAL (widget),
- widget->regex_tags[i]);
+ vte_terminal_match_remove (VTE_TERMINAL (widget), widget->regex_tags[i]);
widget->regex_tags[i] = -1;
}
}
@@ -753,17 +750,14 @@ terminal_widget_update_highlight_urls (TerminalWidget *widget)
#endif
if (G_UNLIKELY (error != NULL))
{
- g_critical ("Failed to parse regular expression pattern %d: %s",
- i, error->message);
+ g_critical ("Failed to parse regular expression pattern %d: %s", i, error->message);
g_error_free (error);
continue;
}
/* set the new regular expression */
- widget->regex_tags[i] = vte_terminal_match_add_gregex (VTE_TERMINAL (widget),
- regex, 0);
- vte_terminal_match_set_cursor_type (VTE_TERMINAL (widget),
- widget->regex_tags[i], GDK_HAND2);
+ widget->regex_tags[i] = vte_terminal_match_add_gregex (VTE_TERMINAL (widget), regex, 0);
+ vte_terminal_match_set_cursor_type (VTE_TERMINAL (widget), widget->regex_tags[i], GDK_HAND2);
/* release the regex owned by vte now */
g_regex_unref (regex);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list