summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendtrash.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-02-13 14:52:45 +0000
committerCosimo Cecchi <cosimoc@src.gnome.org>2009-02-13 14:52:45 +0000
commit5ebe13c70d97259043b54466bce5f1dc423e09b4 (patch)
treef5283ed6eb90a5d1cdc6a7e9e94cc509f4d67a92 /daemon/gvfsbackendtrash.c
parent0d1c06f9b8a8430a42bb1f7e84e6c702126a4bdb (diff)
downloadgvfs-5ebe13c70d97259043b54466bce5f1dc423e09b4.tar.gz
Bug 570533 – use g_set_error_literal
2009-02-13 Cosimo Cecchi <cosimoc@gnome.org> Bug 570533 – use g_set_error_literal * daemon/gvfsbackendobexftp.c: (_push_single_file_helper): * daemon/gvfsbackendtrash.c: (trash_backend_get_file), (trash_backend_open_for_read), (trash_backend_delete), (trash_backend_pull): * daemon/trashlib/trashitem.c: (trash_item_delete): use g_set_error_literal() when appropriate. Patch by Christian Persch. svn path=/trunk/; revision=2214
Diffstat (limited to 'daemon/gvfsbackendtrash.c')
-rw-r--r--daemon/gvfsbackendtrash.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/daemon/gvfsbackendtrash.c b/daemon/gvfsbackendtrash.c
index 3506a2cc..11915440 100644
--- a/daemon/gvfsbackendtrash.c
+++ b/daemon/gvfsbackendtrash.c
@@ -212,8 +212,8 @@ trash_backend_get_file (GVfsBackendTrash *backend,
}
if (file == NULL)
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
- _("No such file or directory"));
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
+ _("No such file or directory"));
return file;
}
@@ -228,8 +228,8 @@ trash_backend_open_for_read (GVfsBackend *vfs_backend,
GError *error = NULL;
if (filename[1] == '\0')
- g_set_error (&error, G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY,
- _("Can't open directory"));
+ g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY,
+ _("Can't open directory"));
else
{
@@ -366,8 +366,8 @@ trash_backend_delete (GVfsBackend *vfs_backend,
g_print ("before job: %d\n", G_OBJECT(job)->ref_count);
if (filename[1] == '\0')
- g_set_error (&error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
- _("The trash folder may not be deleted"));
+ g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+ _("The trash folder may not be deleted"));
else
{
gboolean is_toplevel;
@@ -383,8 +383,8 @@ trash_backend_delete (GVfsBackend *vfs_backend,
g_object_unref (real);
if (!is_toplevel)
- g_set_error (&error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
- _("Items in the trash may not be modified"));
+ g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+ _("Items in the trash may not be modified"));
else
{
@@ -422,8 +422,8 @@ trash_backend_pull (GVfsBackend *vfs_backend,
GError *error = NULL;
if (source[1] == '\0')
- g_set_error (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("The trash folder may not be deleted"));
+ g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ _("The trash folder may not be deleted"));
else
{
gboolean is_toplevel;
@@ -436,8 +436,8 @@ trash_backend_pull (GVfsBackend *vfs_backend,
if (real)
{
if (remove_source && !is_toplevel)
- g_set_error (&error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
- _("Items in the trash may not be modified"));
+ g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+ _("Items in the trash may not be modified"));
else
{