gvfs r2214 - in trunk: . daemon daemon/trashlib
- From: cosimoc svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2214 - in trunk: . daemon daemon/trashlib
- Date: Fri, 13 Feb 2009 14:52:45 +0000 (UTC)
Author: cosimoc
Date: Fri Feb 13 14:52:45 2009
New Revision: 2214
URL: http://svn.gnome.org/viewvc/gvfs?rev=2214&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/daemon/gvfsbackendobexftp.c
trunk/daemon/gvfsbackendtrash.c
trunk/daemon/trashlib/trashitem.c
Modified: trunk/daemon/gvfsbackendobexftp.c
==============================================================================
--- trunk/daemon/gvfsbackendobexftp.c (original)
+++ trunk/daemon/gvfsbackendobexftp.c Fri Feb 13 14:52:45 2009
@@ -1596,9 +1596,9 @@
if (g_vfs_job_is_cancelled (G_VFS_JOB (job)))
{
- g_set_error (error, G_IO_ERROR,
- G_IO_ERROR_CANCELLED,
- _("Operation was cancelled"));
+ g_set_error_literal (error, G_IO_ERROR,
+ G_IO_ERROR_CANCELLED,
+ _("Operation was cancelled"));
return FALSE;
}
Modified: trunk/daemon/gvfsbackendtrash.c
==============================================================================
--- trunk/daemon/gvfsbackendtrash.c (original)
+++ trunk/daemon/gvfsbackendtrash.c Fri Feb 13 14:52:45 2009
@@ -212,8 +212,8 @@
}
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 @@
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 @@
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 @@
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 @@
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 @@
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
{
Modified: trunk/daemon/trashlib/trashitem.c
==============================================================================
--- trunk/daemon/trashlib/trashitem.c (original)
+++ trunk/daemon/trashlib/trashitem.c Fri Feb 13 14:52:45 2009
@@ -492,8 +492,8 @@
g_object_unref (expunged);
if (!success)
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- "Failed to delete the item from the trash");
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ "Failed to delete the item from the trash");
return success;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]