summaryrefslogtreecommitdiff
path: root/frontends/gtk
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2018-11-03 08:48:24 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2018-11-03 08:48:24 +0000
commit5eb7345cc7d266dbb74534bb7510d428b58ce0a3 (patch)
tree73539c8a482d392d48c5aa052fbe0f066b91ebe7 /frontends/gtk
parentdf79047cb62c26755f35083557686828849008b3 (diff)
downloadnetsurf-5eb7345cc7d266dbb74534bb7510d428b58ce0a3.tar.gz
netsurf-5eb7345cc7d266dbb74534bb7510d428b58ce0a3.tar.bz2
GTK: Make nsgtk_download_selection_action match GFunc prototype.
Squashes GCC 8.2 warning: frontends/gtk/download.c:244:22: warning: cast between incompatible function types from ‘nsgtk_download_selection_action’ {aka ‘void (*)(struct gui_download_window *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type] g_list_foreach(dls, (GFunc)action, NULL); ^
Diffstat (limited to 'frontends/gtk')
-rw-r--r--frontends/gtk/download.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/frontends/gtk/download.c b/frontends/gtk/download.c
index 57f92bf25..c9cc1ea54 100644
--- a/frontends/gtk/download.c
+++ b/frontends/gtk/download.c
@@ -89,7 +89,9 @@ struct gui_download_window {
GError *error;
};
-typedef void (*nsgtk_download_selection_action)(struct gui_download_window *dl);
+typedef void (*nsgtk_download_selection_action)(
+ struct gui_download_window *dl,
+ void *user_data);
static GtkWindow *nsgtk_download_window, *nsgtk_download_parent;
static GtkProgressBar *nsgtk_download_progress_bar;
@@ -408,7 +410,9 @@ static gboolean nsgtk_download_update(gboolean force_update)
return TRUE;
}
-static void nsgtk_download_store_clear_item(struct gui_download_window *dl)
+static void nsgtk_download_store_clear_item(
+ struct gui_download_window *dl,
+ void *user_data)
{
if (dl->sensitivity & NSGTK_DOWNLOAD_CLEAR) {
nsgtk_downloads_list = g_list_remove(nsgtk_downloads_list, dl);
@@ -465,7 +469,9 @@ static void nsgtk_download_change_status (
}
}
-static void nsgtk_download_store_cancel_item (struct gui_download_window *dl)
+static void nsgtk_download_store_cancel_item (
+ struct gui_download_window *dl,
+ void *user_data)
{
if (dl->sensitivity & NSGTK_DOWNLOAD_CANCEL) {
dl->speed = 0;
@@ -871,7 +877,7 @@ static void gui_download_window_done(struct gui_download_window *dw)
nsgtk_download_change_status(dw, NSGTK_DOWNLOAD_COMPLETE);
if (nsoption_bool(downloads_clear))
- nsgtk_download_store_clear_item(dw);
+ nsgtk_download_store_clear_item(dw, NULL);
else
nsgtk_download_update(TRUE);
}