From 8116b5a43e11493d6e81a0a1e1ba67fa0d6289a4 Mon Sep 17 00:00:00 2001 From: infirit Date: Tue, 16 Dec 2014 14:21:43 +0100 Subject: dbus-manager: add an EmptyTrash operation --- libcaja-private/caja-dbus-manager.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libcaja-private/caja-dbus-manager.c b/libcaja-private/caja-dbus-manager.c index 4f0b1b73..1b403235 100644 --- a/libcaja-private/caja-dbus-manager.c +++ b/libcaja-private/caja-dbus-manager.c @@ -36,6 +36,8 @@ static const gchar introspection_xml[] = " " " " " " + " " + " " " " ""; @@ -118,6 +120,12 @@ trigger_copy_file_operation (const gchar **sources, g_object_unref (dest_dir); } +static void +trigger_empty_trash_operation (void) +{ + caja_file_operations_empty_trash (NULL); +} + static void handle_method_call (GDBusConnection *connection, const gchar *sender, @@ -138,8 +146,18 @@ handle_method_call (GDBusConnection *connection, trigger_copy_file_operation (uris, destination_uri); g_debug ("Called CopyURIs with dest %s and uri %s\n", destination_uri, uris[0]); + + goto out; + } + + if (g_strcmp0 (method_name, "EmptyTrash") == 0) + { + trigger_empty_trash_operation (); + + g_debug ("Called EmptyTrash"); } + out: g_dbus_method_invocation_return_value (invocation, NULL); } -- cgit v1.2.1