nautilus r13572 - in trunk: . libnautilus-private src/file-manager
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r13572 - in trunk: . libnautilus-private src/file-manager
- Date: Tue, 8 Jan 2008 15:29:47 +0000 (GMT)
Author: alexl
Date: Tue Jan 8 15:29:47 2008
New Revision: 13572
URL: http://svn.gnome.org/viewvc/nautilus?rev=13572&view=rev
Log:
2008-01-08 Alexander Larsson <alexl redhat com>
* libnautilus-private/nautilus-desktop-icon-file.c:
* libnautilus-private/nautilus-file.[ch]:
* libnautilus-private/nautilus-vfs-file.c:
* src/file-manager/fm-directory-view.c:
Remove unused callbacks in nautilus_file_unmount/eject.
Patch from Tomas Bzatek <tbzatek redhat com>
Modified:
trunk/ChangeLog
trunk/libnautilus-private/nautilus-desktop-icon-file.c
trunk/libnautilus-private/nautilus-file.c
trunk/libnautilus-private/nautilus-file.h
trunk/libnautilus-private/nautilus-vfs-file.c
trunk/src/file-manager/fm-directory-view.c
Modified: trunk/libnautilus-private/nautilus-desktop-icon-file.c
==============================================================================
--- trunk/libnautilus-private/nautilus-desktop-icon-file.c (original)
+++ trunk/libnautilus-private/nautilus-desktop-icon-file.c Tue Jan 8 15:29:47 2008
@@ -302,9 +302,7 @@
}
static void
-nautilus_desktop_icon_file_unmount (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data)
+nautilus_desktop_icon_file_unmount (NautilusFile *file)
{
NautilusDesktopIconFile *desktop_file;
GMount *mount;
@@ -320,9 +318,7 @@
}
static void
-nautilus_desktop_icon_file_eject (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data)
+nautilus_desktop_icon_file_eject (NautilusFile *file)
{
NautilusDesktopIconFile *desktop_file;
GMount *mount;
Modified: trunk/libnautilus-private/nautilus-file.c
==============================================================================
--- trunk/libnautilus-private/nautilus-file.c (original)
+++ trunk/libnautilus-private/nautilus-file.c Tue Jan 8 15:29:47 2008
@@ -874,42 +874,18 @@
}
void
-nautilus_file_unmount (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data)
+nautilus_file_unmount (NautilusFile *file)
{
- GError *error;
-
- if (NAUTILUS_FILE_GET_CLASS (file)->unmount == NULL) {
- if (callback) {
- error = NULL;
- g_set_error (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("This file cannot be unmounted"));
- callback (file, NULL, error, callback_data);
- g_error_free (error);
- }
- } else {
- NAUTILUS_FILE_GET_CLASS (file)->unmount (file, callback, callback_data);
+ if (NAUTILUS_FILE_GET_CLASS (file)->unmount != NULL) {
+ NAUTILUS_FILE_GET_CLASS (file)->unmount (file);
}
}
void
-nautilus_file_eject (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data)
+nautilus_file_eject (NautilusFile *file)
{
- GError *error;
-
- if (NAUTILUS_FILE_GET_CLASS (file)->eject == NULL) {
- if (callback) {
- error = NULL;
- g_set_error (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("This file cannot be eject"));
- callback (file, NULL, error, callback_data);
- g_error_free (error);
- }
- } else {
- NAUTILUS_FILE_GET_CLASS (file)->eject (file, callback, callback_data);
+ if (NAUTILUS_FILE_GET_CLASS (file)->eject != NULL) {
+ NAUTILUS_FILE_GET_CLASS (file)->eject (file);
}
}
Modified: trunk/libnautilus-private/nautilus-file.h
==============================================================================
--- trunk/libnautilus-private/nautilus-file.h (original)
+++ trunk/libnautilus-private/nautilus-file.h Tue Jan 8 15:29:47 2008
@@ -251,12 +251,8 @@
GCancellable *cancellable,
NautilusFileOperationCallback callback,
gpointer callback_data);
-void nautilus_file_unmount (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data);
-void nautilus_file_eject (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data);
+void nautilus_file_unmount (NautilusFile *file);
+void nautilus_file_eject (NautilusFile *file);
/* Basic operations for file objects. */
void nautilus_file_set_owner (NautilusFile *file,
@@ -478,12 +474,8 @@
GCancellable *cancellable,
NautilusFileOperationCallback callback,
gpointer callback_data);
- void (* unmount) (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data);
- void (* eject) (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data);
+ void (* unmount) (NautilusFile *file);
+ void (* eject) (NautilusFile *file);
} NautilusFileClass;
#endif /* NAUTILUS_FILE_H */
Modified: trunk/libnautilus-private/nautilus-vfs-file.c
==============================================================================
--- trunk/libnautilus-private/nautilus-vfs-file.c (original)
+++ trunk/libnautilus-private/nautilus-vfs-file.c Tue Jan 8 15:29:47 2008
@@ -312,14 +312,12 @@
}
static void
-vfs_file_unmount (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data)
+vfs_file_unmount (NautilusFile *file)
{
NautilusFileOperation *op;
GFile *location;
- op = nautilus_file_operation_new (file, callback, callback_data);
+ op = nautilus_file_operation_new (file, NULL, NULL);
location = nautilus_file_get_location (file);
g_file_unmount_mountable (location,
@@ -358,14 +356,12 @@
}
static void
-vfs_file_eject (NautilusFile *file,
- NautilusFileOperationCallback callback,
- gpointer callback_data)
+vfs_file_eject (NautilusFile *file)
{
NautilusFileOperation *op;
GFile *location;
- op = nautilus_file_operation_new (file, callback, callback_data);
+ op = nautilus_file_operation_new (file, NULL, NULL);
location = nautilus_file_get_location (file);
g_file_eject_mountable (location,
Modified: trunk/src/file-manager/fm-directory-view.c
==============================================================================
--- trunk/src/file-manager/fm-directory-view.c (original)
+++ trunk/src/file-manager/fm-directory-view.c Tue Jan 8 15:29:47 2008
@@ -5727,8 +5727,7 @@
for (l = selection; l != NULL; l = l->next) {
file = NAUTILUS_FILE (l->data);
if (nautilus_file_can_unmount (file)) {
- nautilus_file_unmount (file,
- NULL, NULL);
+ nautilus_file_unmount (file);
}
}
nautilus_file_list_free (selection);
@@ -5772,7 +5771,7 @@
file = NAUTILUS_FILE (l->data);
if (nautilus_file_can_eject (file)) {
- nautilus_file_eject (file, NULL, NULL);
+ nautilus_file_eject (file);
}
}
nautilus_file_list_free (selection);
@@ -5812,7 +5811,7 @@
return;
}
- nautilus_file_unmount (file, NULL, NULL);
+ nautilus_file_unmount (file);
}
static void
@@ -5829,7 +5828,7 @@
return;
}
- nautilus_file_eject (file, NULL, NULL);
+ nautilus_file_eject (file);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]