summaryrefslogtreecommitdiff
path: root/embed/ephy-embed-utils.c
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2016-03-21 23:13:34 -0500
committerMichael Catanzaro <mcatanzaro@igalia.com>2016-03-21 23:55:15 -0500
commitc5d5bd28f071b3734b0f07af7e802f902263d6f0 (patch)
tree32a2bf0127ac7732e4afa4dd65da6c81b17585ee /embed/ephy-embed-utils.c
parent17c9805c3b7901d17666c71a2163de980eb5c774 (diff)
downloadepiphany-uncrustify.tar.gz
Uncrustifyuncrustify
For a better future. Apologies when your 'git blame' resolves to this. I'm actually really impressed how well uncrustify works. This required only a little one-time manual work to avoid extra space in 'else {'. This breaks function prototype alignment, but we should get rid of most of those anyway. We decided to start aligning function parameters, like other GNOME applications. It looks nicer this way, and I couldn't teach uncrustify the previous Epiphany style.
Diffstat (limited to 'embed/ephy-embed-utils.c')
-rw-r--r--embed/ephy-embed-utils.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index 4a22ab8a4..cb870807d 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -38,7 +38,6 @@ static GRegex *domain_regex;
char *
ephy_embed_utils_link_message_parse (const char *message)
{
-
char *status_message;
char **splitted_message;
int i = 1;
@@ -46,7 +45,7 @@ ephy_embed_utils_link_message_parse (const char *message)
GString *tmp;
status_message = ephy_string_blank_chr (g_strdup (message));
-
+
if (!status_message || !g_str_has_prefix (status_message, "mailto:"))
return status_message;
@@ -55,14 +54,14 @@ ephy_embed_utils_link_message_parse (const char *message)
*/
p = strchr (status_message, '?');
if (p != NULL) *p = '\0';
-
+
/* Then we also want to check if there is more than an email address
* in the mailto: list.
*/
splitted_message = g_strsplit_set (status_message, ";", -1);
tmp = g_string_new (g_strdup_printf (_("Send an email message to ā€œ%sā€"),
(splitted_message[0] + 7)));
-
+
while (splitted_message [i] != NULL) {
g_string_append_printf (tmp, ", ā€œ%sā€", splitted_message[i]);
i++;
@@ -137,7 +136,7 @@ gboolean
ephy_embed_utils_address_is_existing_absolute_filename (const char *address)
{
return g_path_is_absolute (address) &&
- g_file_test (address, G_FILE_TEST_EXISTS);
+ g_file_test (address, G_FILE_TEST_EXISTS);
}
static gboolean
@@ -179,16 +178,16 @@ ephy_embed_utils_address_is_valid (const char *address)
scheme = g_uri_parse_scheme (address);
retval = scheme ||
- ephy_embed_utils_address_is_existing_absolute_filename (address) ||
- g_regex_match (get_non_search_regex (), address, 0, NULL) ||
- is_public_domain (address);
+ ephy_embed_utils_address_is_existing_absolute_filename (address) ||
+ g_regex_match (get_non_search_regex (), address, 0, NULL) ||
+ is_public_domain (address);
g_free (scheme);
return retval;
}
-char*
+char *
ephy_embed_utils_normalize_address (const char *address)
{
char *effective_address = NULL;
@@ -250,7 +249,6 @@ ephy_embed_utils_autosearch_address (const char *search_key)
g_free (url_search);
return effective_address;
-
}
char *
@@ -267,17 +265,17 @@ ephy_embed_utils_url_is_empty (const char *location)
{
gboolean is_empty = FALSE;
- if (location == NULL ||
- location[0] == '\0' ||
+ if (location == NULL ||
+ location[0] == '\0' ||
strcmp (location, "about:blank") == 0)
is_empty = TRUE;
-
+
return is_empty;
}
/* This is the list of addresses that should never be shown in the
* window's location entry. */
-static const char * do_not_show_address[] = {
+static const char *do_not_show_address[] = {
"about:blank",
"ephy-about:incognito",
"ephy-about:overview",
@@ -305,7 +303,7 @@ ephy_embed_utils_get_title_from_address (const char *address)
if (g_str_has_prefix (address, "file://"))
return g_strdup (address + 7);
- if (!strcmp (address, EPHY_ABOUT_SCHEME":overview") ||
+ if (!strcmp (address, EPHY_ABOUT_SCHEME ":overview") ||
!strcmp (address, "about:overview"))
return g_strdup (_("Most Visited"));