Commit 9ccb9da9 authored by Michael Catanzaro's avatar Michael Catanzaro

Uncrustify

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.
parent 5a5e0d7c
......@@ -34,8 +34,7 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
struct _EphyAboutHandler
{
struct _EphyAboutHandler {
GObject parent_instance;
EphySMaps *smaps;
......@@ -79,8 +78,8 @@ ephy_about_handler_get_smaps (EphyAboutHandler *handler)
static void
ephy_about_handler_finish_request (WebKitURISchemeRequest *request,
gchar *data,
gssize data_length)
gchar *data,
gssize data_length)
{
GInputStream *stream;
......@@ -96,7 +95,7 @@ typedef struct {
} EphyAboutRequest;
static EphyAboutRequest *
ephy_about_request_new (EphyAboutHandler *handler,
ephy_about_request_new (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
EphyAboutRequest *about_request;
......@@ -119,7 +118,7 @@ ephy_about_request_free (EphyAboutRequest *about_request)
static void
get_plugins_cb (WebKitWebContext *web_context,
GAsyncResult *result,
GAsyncResult *result,
EphyAboutRequest *about_request)
{
GString *data_str;
......@@ -132,7 +131,7 @@ get_plugins_cb (WebKitWebContext *web_context,
data_str = g_string_new ("<html>");
g_string_append_printf (data_str, "<head><title>%s</title>"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS"\" rel=\"stylesheet\" type=\"text/css\">"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS "\" rel=\"stylesheet\" type=\"text/css\">"
"</head><body>",
_("Installed plugins"));
g_string_append_printf (data_str, "<h1>%s</h1>", _("Plugins"));
......@@ -157,7 +156,7 @@ get_plugins_cb (WebKitWebContext *web_context,
mime_types = webkit_plugin_get_mime_info_list (plugin);
for (m = mime_types; m; m = m->next) {
WebKitMimeInfo *mime_info = (WebKitMimeInfo *) m->data;
WebKitMimeInfo *mime_info = (WebKitMimeInfo *)m->data;
const gchar * const *extensions;
guint i;
......@@ -185,7 +184,7 @@ get_plugins_cb (WebKitWebContext *web_context,
}
static gboolean
ephy_about_handler_handle_plugins (EphyAboutHandler *handler,
ephy_about_handler_handle_plugins (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
EphyEmbedShell *shell = ephy_embed_shell_get_default ();
......@@ -199,8 +198,8 @@ ephy_about_handler_handle_plugins (EphyAboutHandler *handler,
}
static void
handle_memory_finished_cb (EphyAboutHandler *handler,
GAsyncResult *result,
handle_memory_finished_cb (EphyAboutHandler *handler,
GAsyncResult *result,
WebKitURISchemeRequest *request)
{
GString *data_str;
......@@ -213,7 +212,7 @@ handle_memory_finished_cb (EphyAboutHandler *handler,
if (memory) {
g_string_append_printf (data_str, "<head><title>%s</title>"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS"\" rel=\"stylesheet\" type=\"text/css\">"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS "\" rel=\"stylesheet\" type=\"text/css\">"
"</head><body>",
_("Memory usage"));
......@@ -230,9 +229,9 @@ handle_memory_finished_cb (EphyAboutHandler *handler,
}
static void
handle_memory_sync (GTask *task,
gpointer source_object,
gpointer task_data,
handle_memory_sync (GTask *task,
gpointer source_object,
gpointer task_data,
GCancellable *cancellable)
{
EphyAboutHandler *handler = EPHY_ABOUT_HANDLER (source_object);
......@@ -243,7 +242,7 @@ handle_memory_sync (GTask *task,
}
static gboolean
ephy_about_handler_handle_memory (EphyAboutHandler *handler,
ephy_about_handler_handle_memory (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
GTask *task;
......@@ -258,7 +257,7 @@ ephy_about_handler_handle_memory (EphyAboutHandler *handler,
}
static gboolean
ephy_about_handler_handle_about (EphyAboutHandler *handler,
ephy_about_handler_handle_about (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
char *data;
......@@ -274,7 +273,7 @@ ephy_about_handler_handle_about (EphyAboutHandler *handler,
data = g_strdup_printf ("<html><head><title>%s</title>"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS"\" rel=\"stylesheet\" type=\"text/css\">"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS "\" rel=\"stylesheet\" type=\"text/css\">"
"</head><body>"
"<div class=\"dialog\">"
"<img src=\"file://%s\"/>"
......@@ -301,14 +300,14 @@ ephy_about_handler_handle_about (EphyAboutHandler *handler,
}
static gboolean
ephy_about_handler_handle_epiphany (EphyAboutHandler *handler,
ephy_about_handler_handle_epiphany (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
char *data;
data = g_strdup_printf ("<html class=\"epiphany-html\"><head><title>%s</title>"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS"\" rel=\"stylesheet\" type=\"text/css\">"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS "\" rel=\"stylesheet\" type=\"text/css\">"
"</head><body class=\"epiphany-body\">"
"<div id=\"ephytext\">"
"“Il semble que la perfection soit atteinte non quand il n'y a plus rien à"
......@@ -326,8 +325,8 @@ ephy_about_handler_handle_epiphany (EphyAboutHandler *handler,
}
static void
handle_applications_finished_cb (EphyAboutHandler *handler,
GAsyncResult *result,
handle_applications_finished_cb (EphyAboutHandler *handler,
GAsyncResult *result,
WebKitURISchemeRequest *request)
{
GString *data_str;
......@@ -337,7 +336,7 @@ handle_applications_finished_cb (EphyAboutHandler *handler,
data_str = g_string_new (NULL);
g_string_append_printf (data_str, "<html><head><title>%s</title>"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS"\" rel=\"stylesheet\" type=\"text/css\">"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS "\" rel=\"stylesheet\" type=\"text/css\">"
"<script>"
" function deleteWebApp(appID) {"
" window.webkit.messageHandlers.aboutApps.postMessage(appID);"
......@@ -355,7 +354,7 @@ handle_applications_finished_cb (EphyAboutHandler *handler,
applications = g_task_propagate_pointer (G_TASK (result), NULL);
for (p = applications; p; p = p->next) {
EphyWebApplication *app = (EphyWebApplication*)p->data;
EphyWebApplication *app = (EphyWebApplication *)p->data;
g_string_append_printf (data_str,
"<tbody><tr id =\"%s\">"
......@@ -378,9 +377,9 @@ handle_applications_finished_cb (EphyAboutHandler *handler,
}
static void
handle_applications_sync (GTask *task,
gpointer source_object,
gpointer task_data,
handle_applications_sync (GTask *task,
gpointer source_object,
gpointer task_data,
GCancellable *cancellable)
{
g_task_return_pointer (task,
......@@ -389,7 +388,7 @@ handle_applications_sync (GTask *task,
}
static gboolean
ephy_about_handler_handle_applications (EphyAboutHandler *handler,
ephy_about_handler_handle_applications (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
GTask *task;
......@@ -409,8 +408,8 @@ typedef struct {
} GetSnapshotPathAsyncData;
static void
got_snapshot_path_for_url_cb (EphySnapshotService *service,
GAsyncResult *result,
got_snapshot_path_for_url_cb (EphySnapshotService *service,
GAsyncResult *result,
GetSnapshotPathAsyncData *data)
{
char *snapshot;
......@@ -430,9 +429,9 @@ got_snapshot_path_for_url_cb (EphySnapshotService *service,
}
static void
history_service_query_urls_cb (EphyHistoryService *history,
gboolean success,
GList *urls,
history_service_query_urls_cb (EphyHistoryService *history,
gboolean success,
GList *urls,
WebKitURISchemeRequest *request)
{
EphySnapshotService *snapshot_service = ephy_snapshot_service_get_default ();
......@@ -451,7 +450,7 @@ history_service_query_urls_cb (EphyHistoryService *history,
"<head>\n"
" <title>%s</title>\n"
" <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n"
" <link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS"\" rel=\"stylesheet\" type=\"text/css\">\n"
" <link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS "\" rel=\"stylesheet\" type=\"text/css\">\n"
" <script>\n"
" document.onkeypress = function listenKeypress(event) {\n"
" // Remove from overview when Del is pressed\n"
......@@ -499,9 +498,9 @@ history_service_query_urls_cb (EphyHistoryService *history,
}
g_string_append (data_str,
"<div id=\"overview\">\n"
" <div id=\"overview-grid\">\n"
" <ul id=\"overview-item-list\">\n");
"<div id=\"overview\">\n"
" <div id=\"overview-grid\">\n"
" <ul id=\"overview-item-list\">\n");
for (l = urls; l; l = g_list_next (l)) {
EphyHistoryURL *url = (EphyHistoryURL *)l->data;
......@@ -541,14 +540,14 @@ history_service_query_urls_cb (EphyHistoryService *history,
" </div>\n"
"</body></html>\n");
out:
out:
data_length = data_str->len;
ephy_about_handler_finish_request (request, g_string_free (data_str, FALSE), data_length);
g_object_unref (request);
}
static gboolean
ephy_about_handler_handle_html_overview (EphyAboutHandler *handler,
ephy_about_handler_handle_html_overview (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
EphyHistoryService *history;
......@@ -569,7 +568,7 @@ ephy_about_handler_handle_html_overview (EphyAboutHandler *handler,
}
static gboolean
ephy_about_handler_handle_incognito (EphyAboutHandler *handler,
ephy_about_handler_handle_incognito (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
char *data;
......@@ -582,7 +581,7 @@ ephy_about_handler_handle_incognito (EphyAboutHandler *handler,
"<head>\n"
"<title>%s</title>\n"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS"\" rel=\"stylesheet\" type=\"text/css\">\n"
"<link href=\""EPHY_PAGE_TEMPLATE_ABOUT_CSS "\" rel=\"stylesheet\" type=\"text/css\">\n"
"</head>\n"
"<body class=\"incognito-body\">\n"
" <div id=\"mainblock\">\n"
......@@ -604,7 +603,7 @@ ephy_about_handler_handle_incognito (EphyAboutHandler *handler,
"download will be kept."),
_("Incognito mode hides your activity only from people using this "
"computer."),
_("It will not hide your activity from your employer if you are at "
_("It will not hide your activity from your employer if you are at "
"work. Your internet service provider, your government, other "
"governments, the websites that you visit, and advertisers on "
"these websites may still be tracking you."));
......@@ -615,7 +614,7 @@ ephy_about_handler_handle_incognito (EphyAboutHandler *handler,
}
static void
ephy_about_handler_handle_blank (EphyAboutHandler *handler,
ephy_about_handler_handle_blank (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
ephy_about_handler_finish_request (request, g_strdup ("<html></html>"), -1);
......@@ -628,11 +627,11 @@ ephy_about_handler_new (void)
}
void
ephy_about_handler_handle_request (EphyAboutHandler *handler,
ephy_about_handler_handle_request (EphyAboutHandler *handler,
WebKitURISchemeRequest *request)
{
const char *path;
gboolean handled = FALSE;
gboolean handled = FALSE;
path = webkit_uri_scheme_request_get_path (request);
......@@ -641,7 +640,7 @@ ephy_about_handler_handle_request (EphyAboutHandler *handler,
else if (!g_strcmp0 (path, "memory"))
handled = ephy_about_handler_handle_memory (handler, request);
else if (!g_strcmp0 (path, "epiphany"))
handled = ephy_about_handler_handle_epiphany (handler, request);
handled = ephy_about_handler_handle_epiphany (handler, request);
else if (!g_strcmp0 (path, "applications"))
handled = ephy_about_handler_handle_applications (handler, request);
else if (!g_strcmp0 (path, "overview"))
......
......@@ -35,8 +35,7 @@
#include <glib/gi18n.h>
#include <string.h>
struct _EphyDownload
{
struct _EphyDownload {
GObject parent_instance;
WebKitDownload *download;
......@@ -52,8 +51,7 @@ struct _EphyDownload
G_DEFINE_TYPE (EphyDownload, ephy_download, G_TYPE_OBJECT)
enum
{
enum {
PROP_0,
PROP_DOWNLOAD,
PROP_DESTINATION,
......@@ -65,8 +63,7 @@ enum
static GParamSpec *obj_properties[LAST_PROP];
enum
{
enum {
FILENAME_SUGGESTED,
ERROR,
COMPLETED,
......@@ -176,11 +173,11 @@ decide_action_from_mime (EphyDownload *ephy_download)
}
/* From the old embed/mozilla/MozDownload.cpp */
static const char*
static const char *
file_is_compressed (const char *filename)
{
int i;
static const char * const compression[] = {".gz", ".bz2", ".Z", ".lz", ".xz", NULL};
static const char * const compression[] = { ".gz", ".bz2", ".Z", ".lz", ".xz", NULL };
for (i = 0; compression[i] != NULL; i++) {
if (g_str_has_suffix (filename, compression[i]))
......@@ -190,7 +187,7 @@ file_is_compressed (const char *filename)
return NULL;
}
static const char*
static const char *
parse_extension (const char *filename)
{
const char *compression;
......@@ -201,7 +198,7 @@ parse_extension (const char *filename)
/* if the file is compressed we might have a double extension */
if (compression != NULL) {
int i;
static const char * const extensions[] = {"tar", "ps", "xcf", "dvi", "txt", "text", NULL};
static const char * const extensions[] = { "tar", "ps", "xcf", "dvi", "txt", "text", NULL };
for (i = 0; extensions[i] != NULL; i++) {
char *suffix;
......@@ -302,7 +299,7 @@ set_destination_uri_for_suggested_filename (EphyDownload *download, const char *
**/
void
ephy_download_set_destination_uri (EphyDownload *download,
const char *destination)
const char *destination)
{
g_return_if_fail (EPHY_IS_DOWNLOAD (download));
g_return_if_fail (destination != NULL);
......@@ -321,7 +318,7 @@ ephy_download_set_destination_uri (EphyDownload *download,
* files" is set.
**/
void
ephy_download_set_action (EphyDownload *download,
ephy_download_set_action (EphyDownload *download,
EphyDownloadActionType action)
{
g_return_if_fail (EPHY_IS_DOWNLOAD (download));
......@@ -456,48 +453,48 @@ ephy_download_failed (EphyDownload *download,
*
**/
gboolean
ephy_download_do_download_action (EphyDownload *download,
ephy_download_do_download_action (EphyDownload *download,
EphyDownloadActionType action)
{
GFile *destination;
const char *destination_uri;
gboolean ret = FALSE;
destination_uri = webkit_download_get_destination (download->download);
destination = g_file_new_for_uri (destination_uri);
switch ((action ? action : download->action)) {
case EPHY_DOWNLOAD_ACTION_AUTO:
LOG ("ephy_download_do_download_action: auto");
ret = ephy_download_do_download_action (download, decide_action_from_mime (download));
break;
case EPHY_DOWNLOAD_ACTION_BROWSE_TO:
LOG ("ephy_download_do_download_action: browse_to");
GFile *destination;
const char *destination_uri;
gboolean ret = FALSE;
destination_uri = webkit_download_get_destination (download->download);
destination = g_file_new_for_uri (destination_uri);
switch ((action ? action : download->action)) {
case EPHY_DOWNLOAD_ACTION_AUTO:
LOG ("ephy_download_do_download_action: auto");
ret = ephy_download_do_download_action (download, decide_action_from_mime (download));
break;
case EPHY_DOWNLOAD_ACTION_BROWSE_TO:
LOG ("ephy_download_do_download_action: browse_to");
ret = ephy_file_browse_to (destination, download->start_time);
break;
case EPHY_DOWNLOAD_ACTION_OPEN:
LOG ("ephy_download_do_download_action: open");
ret = ephy_embed_shell_launch_handler (ephy_embed_shell_get_default (),
destination, NULL, download->start_time);
if (!ret)
ret = ephy_file_browse_to (destination, download->start_time);
break;
case EPHY_DOWNLOAD_ACTION_OPEN:
LOG ("ephy_download_do_download_action: open");
ret = ephy_embed_shell_launch_handler (ephy_embed_shell_get_default (),
destination, NULL, download->start_time);
if (!ret)
ret = ephy_file_browse_to (destination, download->start_time);
break;
case EPHY_DOWNLOAD_ACTION_NONE:
LOG ("ephy_download_do_download_action: none");
ret = TRUE;
break;
case EPHY_DOWNLOAD_ACTION_DO_NOTHING:
LOG ("ephy_download_do_download_action: nothing");
ret = TRUE;
break;
default:
LOG ("ephy_download_do_download_action: unhandled action");
ret = FALSE;
break;
}
g_object_unref (destination);
break;
case EPHY_DOWNLOAD_ACTION_NONE:
LOG ("ephy_download_do_download_action: none");
ret = TRUE;
break;
case EPHY_DOWNLOAD_ACTION_DO_NOTHING:
LOG ("ephy_download_do_download_action: nothing");
ret = TRUE;
break;
default:
LOG ("ephy_download_do_download_action: unhandled action");
ret = FALSE;
break;
}
g_object_unref (destination);
return ret;
return ret;
}
static void
......@@ -513,7 +510,7 @@ ephy_download_dispose (GObject *object)
download->download = NULL;
}
g_clear_error(&download->error);
g_clear_error (&download->error);
g_clear_pointer (&download->content_type, g_free);
G_OBJECT_CLASS (ephy_download_parent_class)->dispose (object);
......@@ -535,11 +532,11 @@ ephy_download_class_init (EphyDownloadClass *klass)
*/
obj_properties[PROP_DOWNLOAD] =
g_param_spec_object ("download",
"Internal WebKitDownload",
"The WebKitDownload used internally by EphyDownload",
WEBKIT_TYPE_DOWNLOAD,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS);
"Internal WebKitDownload",
"The WebKitDownload used internally by EphyDownload",
WEBKIT_TYPE_DOWNLOAD,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS);
/**
* EphyDownload::destination:
......@@ -548,11 +545,11 @@ ephy_download_class_init (EphyDownloadClass *klass)
*/
obj_properties[PROP_DESTINATION] =
g_param_spec_string ("destination",
"Destination",
"Destination file URI",
NULL,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
"Destination",
"Destination file URI",
NULL,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
/**
* EphyDownload::action:
......@@ -563,12 +560,12 @@ ephy_download_class_init (EphyDownloadClass *klass)
*/
obj_properties[PROP_ACTION] =
g_param_spec_enum ("action",
"Download action",
"Action to take when download finishes",
EPHY_TYPE_DOWNLOAD_ACTION_TYPE,
EPHY_DOWNLOAD_ACTION_NONE,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS);
"Download action",
"Action to take when download finishes",
EPHY_TYPE_DOWNLOAD_ACTION_TYPE,
EPHY_DOWNLOAD_ACTION_NONE,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS);
/**
* EphyDownload::start-time:
......@@ -578,19 +575,19 @@ ephy_download_class_init (EphyDownloadClass *klass)
*/
obj_properties[PROP_START_TIME] =
g_param_spec_uint ("start-time",
"Event start time",
"Time for focus-stealing prevention.",
0, G_MAXUINT32, 0,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS);
"Event start time",
"Time for focus-stealing prevention.",
0, G_MAXUINT32, 0,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS);
obj_properties[PROP_CONTENT_TYPE] =
g_param_spec_string ("content-type",
"Content Type",
"The download content type",
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS);
"Content Type",
"The download content type",
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
......@@ -601,13 +598,13 @@ ephy_download_class_init (EphyDownloadClass *klass)
* suggested filename from WebKit.
**/
signals[FILENAME_SUGGESTED] = g_signal_new ("filename-suggested",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE,
1,
G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE,
1,
G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
/**
* EphyDownload::completed:
......@@ -615,24 +612,24 @@ ephy_download_class_init (EphyDownloadClass *klass)
* The ::completed signal is emitted when @download has finished downloading.
**/
signals[COMPLETED] = g_signal_new ("completed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE,
0);
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE,
0);
/**
* EphyDownload::error:
*
* The ::error signal wraps the @download ::error signal.
**/
signals[ERROR] = g_signal_new ("error",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE,
1, G_TYPE_POINTER);
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE,
1, G_TYPE_POINTER);
}
static void
......@@ -649,8 +646,8 @@ ephy_download_init (EphyDownload *download)
static void
download_response_changed_cb (WebKitDownload *wk_download,
GParamSpec *spec,
EphyDownload *download)
GParamSpec *spec,
EphyDownload *download)
{
WebKitURIResponse *response;
const char *mime_type;
......@@ -667,8 +664,8 @@ download_response_changed_cb (WebKitDownload *wk_download,
static gboolean
download_decide_destination_cb (WebKitDownload *wk_download,
const gchar *suggested_filename,
EphyDownload *download)
const gchar *suggested_filename,
EphyDownload *download)
{
if (webkit_download_get_destination (wk_download))
return TRUE;
......@@ -683,8 +680,8 @@ download_decide_destination_cb (WebKitDownload *wk_download,
static void
download_created_destination_cb (WebKitDownload *wk_download,
const char *destination,
EphyDownload *download)
const char *destination,
EphyDownload *download)
{
char *filename;
char *content_type;
......@@ -727,7 +724,7 @@ download_created_destination_cb (WebKitDownload *wk_download,
static void
download_finished_cb (WebKitDownload *wk_download,
EphyDownload *download)
EphyDownload *download)
{
download->finished = TRUE;
g_signal_emit (download, signals[COMPLETED], 0);
......@@ -741,8 +738,8 @@ download_finished_cb (WebKitDownload *wk_download,
static void
download_failed_cb (WebKitDownload *wk_download,
GError *error,
EphyDownload *download)
GError *error,
EphyDownload *download)
{
g_signal_handlers_disconnect_by_func (wk_download, download_finished_cb, download);
......
......@@ -33,8 +33,7 @@ enum {
LAST_SIGNAL
};
struct _EphyDownloadsManager
{
struct _EphyDownloadsManager {
GObject parent_instance;
GList *downloads;
......@@ -57,7 +56,7 @@ ephy_downloads_manager_acquire_session_inhibitor (EphyDownloadsManager *manager)
manager->inhibitor_cookie = gtk_application_inhibit (GTK_APPLICATION (ephy_embed_shell_get_default ()),
NULL,
GTK_APPLICATION_INHIBIT_LOGOUT | GTK_APPLICATION_INHIBIT_SUSPEND,
"Downloading");
"Downloading");
if (manager->inhibitor_cookie == 0)
g_warning ("Failed to acquire session inhibitor for active download. Is gnome-session running?");
......
......@@ -51,9 +51,9 @@ ephy_embed_container_default_init (EphyEmbedContainerInterface *iface)
**/
gint
ephy_embed_container_add_child (EphyEmbedContainer *container,
EphyEmbed *child,
gint position,
gboolean set_active)
EphyEmbed *child,
gint position,
gboolean set_active)
{
EphyEmbedContainerInterface *iface;
......@@ -73,7 +73,7 @@ ephy_embed_container_add_child (EphyEmbedContainer *container,
**/
void