diff --git a/src/access.c b/src/access.c index f469dba..b856a34 100644 --- a/src/access.c +++ b/src/access.c @@ -110,12 +110,9 @@ send_response (AccessDialogHandle *handle) } static void -access_dialog_response (GtkWidget *widget, - int response, - gpointer user_data) +access_dialog_response (AccessDialogHandle *handle, + int response) { - AccessDialogHandle *handle = user_data; - switch (response) { default: @@ -138,9 +135,8 @@ access_dialog_response (GtkWidget *widget, } static gboolean -handle_close (XdpImplRequest *object, - GDBusMethodInvocation *invocation, - AccessDialogHandle *handle) +handle_close (AccessDialogHandle *handle, + GDBusMethodInvocation *invocation G_GNUC_UNUSED) { GVariantBuilder opt_builder; @@ -181,7 +177,7 @@ add_choice (GtkWidget *box, { GtkWidget *label; GtkWidget *group = NULL; - int i; + gsize i; label = gtk_label_new (name); gtk_widget_show (label); @@ -315,7 +311,7 @@ handle_access_dialog (XdpImplAccess *object, if (choices) { - int i; + gsize i; choice_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); for (i = 0; i < g_variant_n_children (choices); i++) @@ -359,9 +355,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS handle->external_parent = external_parent; handle->choices = choice_table; - g_signal_connect (request, "handle-close", G_CALLBACK (handle_close), handle); + g_signal_connect_swapped (request, "handle-close", G_CALLBACK (handle_close), handle); - g_signal_connect (dialog, "response", G_CALLBACK (access_dialog_response), handle); + g_signal_connect_swapped (dialog, "response", G_CALLBACK (access_dialog_response), handle); gtk_widget_realize (dialog); diff --git a/src/account.c b/src/account.c index 6d2e494..2bf770f 100644 --- a/src/account.c +++ b/src/account.c @@ -84,15 +84,12 @@ send_response (AccountDialogHandle *handle) } static void -account_dialog_done (GtkWidget *widget, +account_dialog_done (AccountDialogHandle *handle, int response, const char *user_name, const char *real_name, - const char *icon_file, - gpointer user_data) + const char *icon_file) { - AccountDialogHandle *handle = user_data; - g_clear_pointer (&handle->user_name, g_free); g_clear_pointer (&handle->real_name, g_free); g_clear_pointer (&handle->icon_uri, g_free); @@ -123,9 +120,8 @@ account_dialog_done (GtkWidget *widget, } static gboolean -handle_close (XdpImplRequest *object, - GDBusMethodInvocation *invocation, - AccountDialogHandle *handle) +handle_close (AccountDialogHandle *handle, + GDBusMethodInvocation *invocation G_GNUC_UNUSED) { GVariantBuilder opt_builder; @@ -206,9 +202,9 @@ handle_get_user_information (XdpImplAccount *object, handle->real_name = g_strdup (real_name); handle->icon_uri = g_filename_to_uri (icon_file, NULL, NULL); - g_signal_connect (request, "handle-close", G_CALLBACK (handle_close), handle); + g_signal_connect_swapped (request, "handle-close", G_CALLBACK (handle_close), handle); - g_signal_connect (dialog, "done", G_CALLBACK (account_dialog_done), handle); + g_signal_connect_swapped (dialog, "done", G_CALLBACK (account_dialog_done), handle); gtk_widget_realize (dialog); diff --git a/src/accountdialog.c b/src/accountdialog.c index 823f20a..5f9c293 100644 --- a/src/accountdialog.c +++ b/src/accountdialog.c @@ -58,7 +58,8 @@ account_dialog_finalize (GObject *object) } static gboolean -account_dialog_delete_event (GtkWidget *dialog, GdkEventAny *event) +account_dialog_delete_event (GtkWidget *dialog, + GdkEventAny *event G_GNUC_UNUSED) { gtk_widget_hide (dialog); diff --git a/src/appchooser.c b/src/appchooser.c index 6b3a275..7c654eb 100644 --- a/src/appchooser.c +++ b/src/appchooser.c @@ -228,7 +228,7 @@ handle_choose_application (XdpImplAppChooser *object, } static gboolean -handle_update_choices (XdpImplAppChooser *object, +handle_update_choices (XdpImplAppChooser *object G_GNUC_UNUSED, GDBusMethodInvocation *invocation, const char *arg_handle, const char **choices) diff --git a/src/appchooserdialog.c b/src/appchooserdialog.c index 1bbe9c7..6104b43 100644 --- a/src/appchooserdialog.c +++ b/src/appchooserdialog.c @@ -76,7 +76,7 @@ G_DEFINE_TYPE (AppChooserDialog, app_chooser_dialog, GTK_TYPE_WINDOW) static void update_header (GtkListBoxRow *row, GtkListBoxRow *before, - gpointer data) + gpointer data G_GNUC_UNUSED) { if (before != NULL && gtk_list_box_row_get_header (row) == NULL) @@ -125,7 +125,7 @@ close_dialog (AppChooserDialog *dialog, static void show_more (AppChooserDialog *dialog) { - int i; + guint i; gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (dialog->scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); @@ -147,9 +147,8 @@ show_more (AppChooserDialog *dialog) } static void -row_activated (GtkListBox *list, - GtkWidget *row, - AppChooserDialog *dialog) +row_activated (AppChooserDialog *dialog, + GtkWidget *row) { GAppInfo *info = NULL; @@ -165,24 +164,21 @@ row_activated (GtkListBox *list, } static void -row_selected (GtkListBox *list, - GtkWidget *row, - AppChooserDialog *dialog) +row_selected (AppChooserDialog *dialog, + GtkWidget *row) { gtk_widget_set_sensitive (dialog->open_button, TRUE); dialog->selected_row = row; } static void -cancel_clicked (GtkWidget *button, - AppChooserDialog *dialog) +cancel_clicked (AppChooserDialog *dialog) { close_dialog (dialog, NULL); } static void -open_clicked (GtkWidget *button, - AppChooserDialog *dialog) +open_clicked (AppChooserDialog *dialog) { GAppInfo *info = NULL; @@ -230,14 +226,14 @@ launch_software (AppChooserDialog *dialog) } static void -find_in_software (GtkWidget *button, - AppChooserDialog *dialog) +find_in_software (AppChooserDialog *dialog) { launch_software (dialog); } static gboolean -app_chooser_delete_event (GtkWidget *dialog, GdkEventAny *event) +app_chooser_delete_event (GtkWidget *dialog, + GdkEventAny *event G_GNUC_UNUSED) { close_dialog (APP_CHOOSER_DIALOG (dialog), NULL); @@ -319,7 +315,7 @@ static void ensure_default_in_initial_list (const char **choices, const char *default_id) { - int i; + guint i; guint n_choices; if (default_id == NULL) @@ -350,11 +346,10 @@ ensure_default_in_initial_list (const char **choices, } static void -more_pressed (GtkGestureMultiPress *gesture, +more_pressed (AppChooserDialog *dialog, int n_press, - double x, - double y, - AppChooserDialog *dialog) + double x G_GNUC_UNUSED, + double y) { if (n_press != 1) return; @@ -370,8 +365,8 @@ app_chooser_dialog_new (const char **choices, const char *location) { AppChooserDialog *dialog; - int n_choices; - int i; + guint n_choices; + guint i; g_autofree char *short_location = shorten_location (location); dialog = g_object_new (app_chooser_dialog_get_type (), NULL); @@ -446,7 +441,7 @@ app_chooser_dialog_new (const char **choices, gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture), GTK_PHASE_BUBBLE); gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), GDK_BUTTON_PRIMARY); - g_signal_connect (gesture, "pressed", G_CALLBACK (more_pressed), dialog); + g_signal_connect_swapped (gesture, "pressed", G_CALLBACK (more_pressed), dialog); gtk_list_box_row_set_selectable (GTK_LIST_BOX_ROW (row), FALSE); image = gtk_image_new_from_icon_name ("view-more-symbolic", GTK_ICON_SIZE_BUTTON); @@ -467,7 +462,7 @@ void app_chooser_dialog_update_choices (AppChooserDialog *dialog, const char **choices) { - int i; + guint i; GPtrArray *new_choices; new_choices = g_ptr_array_new (); diff --git a/src/appchooserdialog.ui b/src/appchooserdialog.ui index 1dbb1c4..6ffaaaf 100644 --- a/src/appchooserdialog.ui +++ b/src/appchooserdialog.ui @@ -13,7 +13,7 @@ 1 _Cancel 1 - + @@ -23,7 +23,7 @@ _Open 1 1 - + @@ -67,8 +67,8 @@ - - + + single 0 1 @@ -140,7 +140,7 @@ - + 1 diff --git a/src/dynamic-launcher.c b/src/dynamic-launcher.c index 283d460..28e300e 100644 --- a/src/dynamic-launcher.c +++ b/src/dynamic-launcher.c @@ -137,12 +137,9 @@ send_prepare_install_response (InstallDialogHandle *handle) } static void -handle_prepare_install_response (GtkDialog *dialog, - gint response, - gpointer data) +handle_prepare_install_response (InstallDialogHandle *handle, + int response) { - InstallDialogHandle *handle = data; - switch (response) { default: @@ -329,7 +326,7 @@ handle_prepare_install (XdpImplDynamicLauncher *object, g_signal_connect (request, "handle-close", G_CALLBACK (handle_close), handle); - g_signal_connect (dialog, "response", G_CALLBACK (handle_prepare_install_response), handle); + g_signal_connect_swapped (dialog, "response", G_CALLBACK (handle_prepare_install_response), handle); gtk_widget_realize (dialog); @@ -352,7 +349,7 @@ static gboolean handle_request_install_token (XdpImplDynamicLauncher *object, GDBusMethodInvocation *invocation, const char *arg_app_id, - GVariant *arg_options) + GVariant *arg_options G_GNUC_UNUSED) { /* Generally these should be allowed in each desktop specific x-d-p backend, * but add them here as well as a fallback. diff --git a/src/email.c b/src/email.c index 2d001fb..01705e0 100644 --- a/src/email.c +++ b/src/email.c @@ -124,7 +124,7 @@ handle_compose_email (XdpImplEmail *object, GDBusMethodInvocation *invocation, const char *arg_handle, const char *arg_app_id, - const char *arg_parent_window, + const char *arg_parent_window G_GNUC_UNUSED, GVariant *arg_options) { g_autoptr(Request) request = NULL; diff --git a/src/externalwindow-wayland.c b/src/externalwindow-wayland.c index 077ac24..46c6a43 100644 --- a/src/externalwindow-wayland.c +++ b/src/externalwindow-wayland.c @@ -102,7 +102,7 @@ external_window_wayland_dispose (GObject *object) } static void -external_window_wayland_init (ExternalWindowWayland *external_window_wayland) +external_window_wayland_init (ExternalWindowWayland *self G_GNUC_UNUSED) { } diff --git a/src/externalwindow-x11.c b/src/externalwindow-x11.c index 75de557..627ace4 100644 --- a/src/externalwindow-x11.c +++ b/src/externalwindow-x11.c @@ -120,7 +120,7 @@ external_window_x11_dispose (GObject *object) } static void -external_window_x11_init (ExternalWindowX11 *external_window_x11) +external_window_x11_init (ExternalWindowX11 *self G_GNUC_UNUSED) { } diff --git a/src/externalwindow.c b/src/externalwindow.c index 9b81670..5bc0857 100644 --- a/src/externalwindow.c +++ b/src/externalwindow.c @@ -139,7 +139,7 @@ external_window_get_property (GObject *object, } static void -external_window_init (ExternalWindow *external_window) +external_window_init (ExternalWindow *self G_GNUC_UNUSED) { } diff --git a/src/fdonotification.c b/src/fdonotification.c index b96eada..5867f6d 100644 --- a/src/fdonotification.c +++ b/src/fdonotification.c @@ -89,12 +89,12 @@ fdo_find_notification_by_notify_id (guint32 id) static void notify_signal (GDBusConnection *connection, - const char *sender_name, - const char *object_path, - const char *interface_name, + const char *sender_name G_GNUC_UNUSED, + const char *object_path G_GNUC_UNUSED, + const char *interface_name G_GNUC_UNUSED, const char *signal_name, GVariant *parameters, - gpointer user_data) + gpointer user_data G_GNUC_UNUSED) { guint32 id = 0; const char *action = NULL; diff --git a/src/filechooser.c b/src/filechooser.c index 8c711aa..295bf58 100644 --- a/src/filechooser.c +++ b/src/filechooser.c @@ -290,7 +290,6 @@ deserialize_choice (GVariant *choice, const char *label; const char *selected; GVariant *choices; - int i; g_variant_get (choice, "(&s&s@a(ss)&s)", &choice_id, &label, &choices, &selected); @@ -298,6 +297,7 @@ deserialize_choice (GVariant *choice, { GtkWidget *box; GtkWidget *combo; + gsize i; box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); gtk_container_add (GTK_CONTAINER (box), gtk_label_new (label)); @@ -522,11 +522,12 @@ handle_open (XdpImplFileChooser *object, choices = g_variant_lookup_value (arg_options, "choices", G_VARIANT_TYPE ("a(ssa(ss)s)")); if (choices) { - int i; GtkWidget *box; + gsize i; box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_widget_show (box); + for (i = 0; i < g_variant_n_children (choices); i++) { GVariant *value = g_variant_get_child_value (choices, i); diff --git a/src/inhibit.c b/src/inhibit.c index 65aee08..a34a5d7 100644 --- a/src/inhibit.c +++ b/src/inhibit.c @@ -38,9 +38,9 @@ static gboolean screensaver_active = FALSE; static guint query_end_timeout; static void -uninhibit_done_gnome (GObject *source, +uninhibit_done_gnome (GObject *source G_GNUC_UNUSED, GAsyncResult *result, - gpointer data) + gpointer data G_GNUC_UNUSED) { g_autoptr(GError) error = NULL; @@ -51,7 +51,7 @@ uninhibit_done_gnome (GObject *source, static gboolean handle_close_gnome (XdpImplRequest *object, GDBusMethodInvocation *invocation, - gpointer data) + gpointer data G_GNUC_UNUSED) { Request *request = (Request *)object; guint cookie; @@ -74,7 +74,7 @@ handle_close_gnome (XdpImplRequest *object, } static void -inhibit_done_gnome (GObject *source, +inhibit_done_gnome (GObject *source G_GNUC_UNUSED, GAsyncResult *result, gpointer data) { @@ -99,7 +99,7 @@ handle_inhibit_gnome (XdpImplInhibit *object, GDBusMethodInvocation *invocation, const gchar *arg_handle, const gchar *arg_app_id, - const gchar *arg_window, + const gchar *arg_window G_GNUC_UNUSED, guint arg_flags, GVariant *arg_options) { @@ -185,7 +185,7 @@ stop_waiting_for_query_end_response (gboolean send_response) } static gboolean -query_end_response (gpointer data) +query_end_response (gpointer data G_GNUC_UNUSED) { g_debug ("1 second wait is over"); @@ -226,10 +226,10 @@ maybe_send_quit_response (void) static void client_proxy_signal (GDBusProxy *proxy, - const gchar *sender_name, + const gchar *sender_name G_GNUC_UNUSED, const gchar *signal_name, - GVariant *parameters, - gpointer user_data) + GVariant *parameters G_GNUC_UNUSED, + gpointer user_data G_GNUC_UNUSED) { if (g_str_equal (signal_name, "QueryEndSession")) { @@ -260,9 +260,9 @@ client_proxy_signal (GDBusProxy *proxy, static OrgFreedesktopScreenSaver *fdo_screensaver; static void -uninhibit_done_fdo (GObject *source, +uninhibit_done_fdo (GObject *source G_GNUC_UNUSED, GAsyncResult *result, - gpointer data) + gpointer data G_GNUC_UNUSED) { g_autoptr(GError) error = NULL; @@ -275,7 +275,7 @@ uninhibit_done_fdo (GObject *source, static gboolean handle_close_fdo (XdpImplRequest *object, GDBusMethodInvocation *invocation, - gpointer data) + gpointer data G_GNUC_UNUSED) { Request *request = (Request *)object; guint cookie; @@ -302,7 +302,7 @@ handle_close_fdo (XdpImplRequest *object, } static void -inhibit_done_fdo (GObject *source, +inhibit_done_fdo (GObject *source G_GNUC_UNUSED, GAsyncResult *result, gpointer data) { @@ -334,7 +334,7 @@ handle_inhibit_fdo (XdpImplInhibit *object, GDBusMethodInvocation *invocation, const gchar *arg_handle, const gchar *arg_app_id, - const gchar *arg_window, + const gchar *arg_window G_GNUC_UNUSED, guint arg_flags, GVariant *arg_options) { @@ -457,7 +457,7 @@ inhibit_session_finalize (GObject *object) } static void -inhibit_session_init (InhibitSession *inhibit_session) +inhibit_session_init (InhibitSession *self G_GNUC_UNUSED) { } @@ -475,7 +475,7 @@ inhibit_session_class_init (InhibitSessionClass *klass) } static InhibitSession * -inhibit_session_new (const char *app_id, +inhibit_session_new (const char *app_id G_GNUC_UNUSED, const char *session_handle) { InhibitSession *inhibit_session; @@ -494,10 +494,10 @@ inhibit_session_new (const char *app_id, static gboolean handle_create_monitor (XdpImplInhibit *object, GDBusMethodInvocation *invocation, - const char *arg_handle, + const char *arg_handle G_GNUC_UNUSED, const char *arg_session_handle, const char *arg_app_id, - const char *arg_window) + const char *arg_window G_GNUC_UNUSED) { g_autoptr(GError) error = NULL; int response; @@ -544,7 +544,7 @@ handle_query_end_response (XdpImplInhibit *object, } static void -global_active_changed_cb (GObject *object, +global_active_changed_cb (GObject *object G_GNUC_UNUSED, gboolean active) { g_debug ("Screensaver %s", active ? "active" : "inactive"); diff --git a/src/notification.c b/src/notification.c index 86210d7..1e906f6 100644 --- a/src/notification.c +++ b/src/notification.c @@ -30,9 +30,9 @@ static OrgGtkNotifications *gtk_notifications; static void -notification_added (GObject *source, +notification_added (GObject *source G_GNUC_UNUSED, GAsyncResult *result, - gpointer data) + gpointer data G_GNUC_UNUSED) { g_autoptr(GError) error = NULL; g_autoptr(GVariant) reply = NULL; @@ -105,7 +105,7 @@ activate_action (GDBusConnection *connection, const char *id, const char *name, GVariant *parameter, - gpointer data) + gpointer data G_GNUC_UNUSED) { g_autofree char *object_path = NULL; GVariantBuilder pdata, parms; @@ -199,7 +199,7 @@ has_unprefixed_action (GVariant *notification) { const char *action; g_autoptr(GVariant) buttons = NULL; - int i; + gsize i; if (g_variant_lookup (notification, "default-action", "&s", &action) && !g_str_has_prefix (action, "app.")) @@ -207,15 +207,17 @@ has_unprefixed_action (GVariant *notification) buttons = g_variant_lookup_value (notification, "buttons", G_VARIANT_TYPE("aa{sv}")); if (buttons) - for (i = 0; i < g_variant_n_children (buttons); i++) - { - g_autoptr(GVariant) button = NULL; - - button = g_variant_get_child_value (buttons, i); - if (g_variant_lookup (button, "action", "&s", &action) && - !g_str_has_prefix (action, "app.")) - return TRUE; - } + { + for (i = 0; i < g_variant_n_children (buttons); i++) + { + g_autoptr(GVariant) button = NULL; + + button = g_variant_get_child_value (buttons, i); + if (g_variant_lookup (button, "action", "&s", &action) && + !g_str_has_prefix (action, "app.")) + return TRUE; + } + } return FALSE; } diff --git a/src/print.c b/src/print.c index 0adb3bd..456e6a9 100644 --- a/src/print.c +++ b/src/print.c @@ -332,11 +332,9 @@ print_file (int fd, } static void -handle_print_response (GtkDialog *dialog, - gint response, - gpointer data) +handle_print_response (PrintDialogHandle *handle, + gint response) { - PrintDialogHandle *handle = data; g_autoptr(GError) error = NULL; gboolean preview = FALSE; @@ -529,7 +527,7 @@ handle_print (XdpImplPrint *object, g_signal_connect (request, "handle-close", G_CALLBACK (handle_close), handle); - g_signal_connect (dialog, "response", G_CALLBACK (handle_print_response), handle); + g_signal_connect_swapped (dialog, "response", G_CALLBACK (handle_print_response), handle); gtk_widget_realize (dialog); @@ -569,11 +567,9 @@ send_prepare_print_response (PrintDialogHandle *handle) } static void -handle_prepare_print_response (GtkDialog *dialog, - gint response, - gpointer data) +handle_prepare_print_response (PrintDialogHandle *handle, + gint response) { - PrintDialogHandle *handle = data; gboolean preview = FALSE; switch (response) @@ -689,7 +685,7 @@ handle_prepare_print (XdpImplPrint *object, g_signal_connect (request, "handle-close", G_CALLBACK (handle_close), handle); - g_signal_connect (dialog, "response", G_CALLBACK (handle_prepare_print_response), handle); + g_signal_connect_swapped (dialog, "response", G_CALLBACK (handle_prepare_print_response), handle); gtk_widget_realize (dialog); diff --git a/src/request.c b/src/request.c index de96932..3ad30f8 100644 --- a/src/request.c +++ b/src/request.c @@ -50,7 +50,7 @@ request_skeleton_iface_init (XdpImplRequestIface *iface) } static void -request_init (Request *request) +request_init (Request *self G_GNUC_UNUSED) { } diff --git a/src/session.c b/src/session.c index 5ebe13f..7717bce 100644 --- a/src/session.c +++ b/src/session.c @@ -166,7 +166,7 @@ session_constructed (GObject *object) } static void -session_init (Session *session) +session_init (Session *session G_GNUC_UNUSED) { } diff --git a/src/settings.c b/src/settings.c index 5049471..07d8b56 100644 --- a/src/settings.c +++ b/src/settings.c @@ -103,10 +103,10 @@ get_color_scheme (void) } static gboolean -settings_handle_read_all (XdpImplSettings *object, +settings_handle_read_all (XdpImplSettings *object G_GNUC_UNUSED, GDBusMethodInvocation *invocation, const char * const *arg_namespaces, - gpointer data) + gpointer data G_GNUC_UNUSED) { g_autoptr(GVariantBuilder) builder = g_variant_builder_new (G_VARIANT_TYPE ("(a{sa{sv}})")); GHashTableIter iter; @@ -167,11 +167,11 @@ settings_handle_read_all (XdpImplSettings *object, } static gboolean -settings_handle_read (XdpImplSettings *object, +settings_handle_read (XdpImplSettings *object G_GNUC_UNUSED, GDBusMethodInvocation *invocation, const char *arg_namespace, const char *arg_key, - gpointer data) + gpointer data G_GNUC_UNUSED) { g_debug ("Read %s %s", arg_namespace, arg_key); @@ -235,7 +235,7 @@ changed_signal_user_data_new (XdpImplSettings *settings, static void changed_signal_user_data_destroy (gpointer data, - GClosure *closure) + GClosure *closure G_GNUC_UNUSED) { g_free (data); } @@ -306,7 +306,7 @@ init_settings_table (XdpImplSettings *settings, } static void -fontconfig_changed (FcMonitor *monitor, +fontconfig_changed (FcMonitor *monitor G_GNUC_UNUSED, XdpImplSettings *impl) { const char *namespace = "org.gnome.fontconfig"; diff --git a/src/testappchooser.c b/src/testappchooser.c index f6e76c9..b912e49 100644 --- a/src/testappchooser.c +++ b/src/testappchooser.c @@ -2,8 +2,7 @@ #include "appchooserdialog.h" static void -close_cb (AppChooserDialog *dialog, - gpointer data) +close_cb (AppChooserDialog *dialog) { GAppInfo *info; diff --git a/src/wallpaperdialog.c b/src/wallpaperdialog.c index 69a4547..f769b1e 100644 --- a/src/wallpaperdialog.c +++ b/src/wallpaperdialog.c @@ -146,7 +146,7 @@ on_image_loaded_cb (GObject *source_object, WallpaperDialog * wallpaper_dialog_new (const gchar *picture_uri, - const gchar *app_id) + const gchar *app_id G_GNUC_UNUSED) { WallpaperDialog *self; g_autoptr(GFile) image_file = g_file_new_for_uri (picture_uri); diff --git a/src/wallpaperpreview.c b/src/wallpaperpreview.c index 5910c6a..de4b06c 100644 --- a/src/wallpaperpreview.c +++ b/src/wallpaperpreview.c @@ -58,7 +58,7 @@ struct _WallpaperPreviewClass { G_DEFINE_TYPE (WallpaperPreview, wallpaper_preview, GTK_TYPE_BOX) static gboolean -on_preview_draw_cb (GtkWidget *widget, +on_preview_draw_cb (GtkWidget *widget G_GNUC_UNUSED, cairo_t *cr, WallpaperPreview *self) { diff --git a/src/xdg-desktop-portal-gtk.c b/src/xdg-desktop-portal-gtk.c index 46347bb..08b568f 100644 --- a/src/xdg-desktop-portal-gtk.c +++ b/src/xdg-desktop-portal-gtk.c @@ -84,10 +84,10 @@ static GOptionEntry entries[] = { }; static void -message_handler (const gchar *log_domain, +message_handler (const gchar *log_domain G_GNUC_UNUSED, GLogLevelFlags log_level, const gchar *message, - gpointer user_data) + gpointer user_data G_GNUC_UNUSED) { /* Make this look like normal console output */ if (log_level & G_LOG_LEVEL_DEBUG) @@ -112,8 +112,8 @@ printerr_handler (const gchar *string) static void on_bus_acquired (GDBusConnection *connection, - const gchar *name, - gpointer user_data) + const gchar *name G_GNUC_UNUSED, + gpointer user_data G_GNUC_UNUSED) { GError *error = NULL; @@ -199,18 +199,19 @@ on_bus_acquired (GDBusConnection *connection, } static void -on_name_acquired (GDBusConnection *connection, - const gchar *name, - gpointer user_data) +on_name_acquired (GDBusConnection *connection G_GNUC_UNUSED, + const gchar *name G_GNUC_UNUSED, + gpointer user_data G_GNUC_UNUSED) { g_debug ("org.freedesktop.impl.portal.desktop.gtk acquired"); } static void -on_name_lost (GDBusConnection *connection, - const gchar *name, - gpointer user_data) +on_name_lost (GDBusConnection *connection G_GNUC_UNUSED, + const gchar *name G_GNUC_UNUSED, + gpointer user_data G_GNUC_UNUSED) { + g_debug ("org.freedesktop.impl.portal.desktop.gtk lost"); g_main_loop_quit (loop); }