|
Lines 27-32
Link Here
|
| 27 |
#include "nautilus-merged-directory.h" |
27 |
#include "nautilus-merged-directory.h" |
| 28 |
|
28 |
|
| 29 |
#include "nautilus-directory-private.h" |
29 |
#include "nautilus-directory-private.h" |
|
|
30 |
#include "nautilus-directory-notify.h" |
| 30 |
#include "nautilus-file.h" |
31 |
#include "nautilus-file.h" |
| 31 |
#include <eel/eel-glib-extensions.h> |
32 |
#include <eel/eel-glib-extensions.h> |
| 32 |
#include <gtk/gtksignal.h> |
33 |
#include <gtk/gtksignal.h> |
|
Lines 540-551
Link Here
|
| 540 |
} |
541 |
} |
| 541 |
|
542 |
|
| 542 |
static void |
543 |
static void |
|
|
544 |
real_directory_notify_files_removed (NautilusDirectory *real_directory) |
| 545 |
{ |
| 546 |
GList *files, *l; |
| 547 |
|
| 548 |
files = nautilus_directory_get_file_list (real_directory); |
| 549 |
|
| 550 |
for (l = files; l; l = l->next) { |
| 551 |
NautilusFile *file; |
| 552 |
char *uri; |
| 553 |
|
| 554 |
file = NAUTILUS_FILE (l->data); |
| 555 |
uri = nautilus_file_get_uri (file); |
| 556 |
nautilus_file_unref (file); |
| 557 |
|
| 558 |
l->data = uri; |
| 559 |
} |
| 560 |
|
| 561 |
if (files) { |
| 562 |
nautilus_directory_notify_files_removed (files); |
| 563 |
} |
| 564 |
|
| 565 |
eel_g_list_free_deep (files); |
| 566 |
} |
| 567 |
|
| 568 |
static void |
| 543 |
merged_remove_real_directory (NautilusMergedDirectory *merged, |
569 |
merged_remove_real_directory (NautilusMergedDirectory *merged, |
| 544 |
NautilusDirectory *real_directory) |
570 |
NautilusDirectory *real_directory) |
| 545 |
{ |
571 |
{ |
| 546 |
g_return_if_fail (NAUTILUS_IS_MERGED_DIRECTORY (merged)); |
572 |
g_return_if_fail (NAUTILUS_IS_MERGED_DIRECTORY (merged)); |
| 547 |
g_return_if_fail (NAUTILUS_IS_DIRECTORY (real_directory)); |
573 |
g_return_if_fail (NAUTILUS_IS_DIRECTORY (real_directory)); |
| 548 |
g_return_if_fail (g_list_find (merged->details->directories, real_directory) != NULL); |
574 |
g_return_if_fail (g_list_find (merged->details->directories, real_directory) != NULL); |
|
|
575 |
|
| 576 |
/* Since the real directory will be going away, act as if files were removed */ |
| 577 |
real_directory_notify_files_removed (real_directory); |
| 549 |
|
578 |
|
| 550 |
/* Remove this directory from callbacks and monitors. */ |
579 |
/* Remove this directory from callbacks and monitors. */ |
| 551 |
eel_g_hash_table_safe_for_each (merged->details->callbacks, |
580 |
eel_g_hash_table_safe_for_each (merged->details->callbacks, |