summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-trash-monitor.h
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2000-12-09 01:13:45 +0000
committerDarin Adler <darin@src.gnome.org>2000-12-09 01:13:45 +0000
commit134e132a7e2847830ebe14a8fb28b46b246a3325 (patch)
treee39c29da35c2d0bb906a68466ec7472a43ab8e16 /libnautilus-private/nautilus-trash-monitor.h
parent76b5dd2512312b1212a3a6d0e44518c1a82bfb32 (diff)
downloadnautilus-134e132a7e2847830ebe14a8fb28b46b246a3325.tar.gz
reviewed by: John Sullivan <sullivan@eazel.com>
Fixed bug 2244 (trash window sidebar should have trash icon). * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_name_for_directory): Added code to give the trash its own icon. (nautilus_icon_factory_get_icon_for_file): Rearranged to simplify it a bit. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-trash-monitor.h: * libnautilus-extensions/nautilus-trash-monitor.c: Moved trash monitor to here. (nautilus_trash_files_changed_callback): Do nautilus_file_changed on the trash NautilusFile object when the state changes from full to empty or from empty to full. * src/file-manager/Makefile.am: * src/file-manager/nautilus-trash-monitor.h: * src/file-manager/nautilus-trash-monitor.c: Moved trash monitor from here. * src/file-manager/fm-desktop-icon-view.c: * src/file-manager/fm-directory-view.c: Changed includes to include trash monitor from new location. * libnautilus-extensions/nautilus-directory-metafile.c: (get_metadata_string_from_metafile), (get_metadata_list_from_metafile), (set_metadata_string_in_metafile), (set_metadata_list_in_metafile): Remove some dead code left over from handling of directory metadata. We don't have directory metadata any more, only file metadata.
Diffstat (limited to 'libnautilus-private/nautilus-trash-monitor.h')
-rw-r--r--libnautilus-private/nautilus-trash-monitor.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-trash-monitor.h b/libnautilus-private/nautilus-trash-monitor.h
new file mode 100644
index 000000000..19139d514
--- /dev/null
+++ b/libnautilus-private/nautilus-trash-monitor.h
@@ -0,0 +1,66 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/*
+ nautilus-trash-monitor.h: Nautilus trash state watcher.
+
+ Copyright (C) 2000 Eazel, Inc.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this program; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ Author: Pavel Cisler <pavel@eazel.com>
+*/
+
+#ifndef NAUTILUS_TRASH_MONITOR_H
+#define NAUTILUS_TRASH_MONITOR_H
+
+#include <gtk/gtkobject.h>
+#include <libgnomevfs/gnome-vfs.h>
+
+typedef struct NautilusTrashMonitor NautilusTrashMonitor;
+typedef struct NautilusTrashMonitorClass NautilusTrashMonitorClass;
+typedef struct NautilusTrashMonitorDetails NautilusTrashMonitorDetails;
+
+#define NAUTILUS_TYPE_TRASH_MONITOR \
+ (nautilus_trash_monitor_get_type ())
+#define NAUTILUS_TRASH_MONITOR(obj) \
+ (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_TRASH_MONITOR, NautilusTrashMonitor))
+#define NAUTILUS_TRASH_MONITOR_CLASS(klass) \
+ (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_TRASH_MONITOR, NautilusTrashMonitorClass))
+#define NAUTILUS_IS_TRASH_MONITOR(obj) \
+ (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_TRASH_MONITOR))
+#define NAUTILUS_IS_TRASH_MONITOR_CLASS(klass) \
+ (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_TRASH_MONITOR))
+
+struct NautilusTrashMonitor {
+ GtkObject object;
+ NautilusTrashMonitorDetails *details;
+};
+
+struct NautilusTrashMonitorClass {
+ GtkObjectClass parent_class;
+
+ void (* trash_state_changed) (NautilusTrashMonitor *trash_monitor,
+ gboolean new_state);
+};
+
+GtkType nautilus_trash_monitor_get_type (void);
+
+NautilusTrashMonitor *nautilus_trash_monitor_get (void);
+gboolean nautilus_trash_monitor_is_empty (void);
+void nautilus_trash_monitor_async_get_trash_directories (GnomeVFSAsyncFindDirectoryCallback callback,
+ gpointer context);
+
+#endif