mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 10:45:41 +00:00
Remove nautilus_window_manage_views_destroy(), since everything it does is
2008-09-22 Christian Neumair <cneumair@gnome.org> * src/nautilus-window-manage-views.c: * src/nautilus-window-manage-views.h: * src/nautilus-window.c (nautilus_window_destroy), (nautilus_window_close_slot), (nautilus_window_slot_close): Remove nautilus_window_manage_views_destroy(), since everything it does is achieved by nautilus_window_close_slot(). Also ensure that slots are removed from the active slot history as they are closed. Fixes #553081. svn path=/trunk/; revision=14651
This commit is contained in:
parent
0dc142ec12
commit
fe03d17720
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2008-09-22 Christian Neumair <cneumair@gnome.org>
|
||||
|
||||
* src/nautilus-window-manage-views.c:
|
||||
* src/nautilus-window-manage-views.h:
|
||||
* src/nautilus-window.c (nautilus_window_destroy),
|
||||
(nautilus_window_close_slot), (nautilus_window_slot_close):
|
||||
Remove nautilus_window_manage_views_destroy(), since everything it
|
||||
does is achieved by nautilus_window_close_slot(). Also ensure that
|
||||
slots are removed from the active slot history as they are closed.
|
||||
Fixes #553081.
|
||||
|
||||
2008-09-18 Cosimo Cecchi <cosimoc@gnome.org>
|
||||
|
||||
* libnautilus-private/nautilus-file.c: (finalize),
|
||||
|
|
|
@ -2018,28 +2018,6 @@ nautilus_window_slot_set_content_view (NautilusWindowSlot *slot,
|
|||
create_content_view (slot, id);
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_window_manage_views_destroy (NautilusWindow *window)
|
||||
{
|
||||
NautilusWindowSlot *slot;
|
||||
GList *l;
|
||||
|
||||
/* Disconnect view signals here so they don't trigger when
|
||||
* views are destroyed.
|
||||
*/
|
||||
|
||||
for (l = window->details->slots; l != NULL; l = l->next) {
|
||||
slot = l->data;
|
||||
|
||||
if (slot->content_view != NULL) {
|
||||
nautilus_window_slot_disconnect_content_view (slot, slot->content_view);
|
||||
}
|
||||
if (slot->new_content_view != NULL) {
|
||||
nautilus_window_slot_disconnect_content_view (slot, slot->new_content_view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_window_manage_views_close_slot (NautilusWindow *window,
|
||||
NautilusWindowSlot *slot)
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "nautilus-window.h"
|
||||
#include "nautilus-navigation-window.h"
|
||||
|
||||
void nautilus_window_manage_views_destroy (NautilusWindow *window);
|
||||
void nautilus_window_manage_views_close_slot (NautilusWindow *window,
|
||||
NautilusWindowSlot *slot);
|
||||
|
||||
|
|
|
@ -609,8 +609,6 @@ nautilus_window_destroy (GtkObject *object)
|
|||
}
|
||||
g_list_free (slots);
|
||||
|
||||
nautilus_window_manage_views_destroy (window);
|
||||
|
||||
GTK_OBJECT_CLASS (nautilus_window_parent_class)->destroy (object);
|
||||
}
|
||||
|
||||
|
@ -737,6 +735,8 @@ nautilus_window_close_slot (NautilusWindow *window,
|
|||
close_slot, (window, slot));
|
||||
|
||||
window->details->slots = g_list_remove (window->details->slots, slot);
|
||||
window->details->active_slots = g_list_remove (window->details->active_slots, slot);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -790,16 +790,6 @@ nautilus_window_set_active_slot (NautilusWindow *window,
|
|||
}
|
||||
}
|
||||
|
||||
static inline NautilusWindowSlot *
|
||||
get_last_active_slot (NautilusWindow *window)
|
||||
{
|
||||
if (window->details->active_slots != NULL) {
|
||||
return NAUTILUS_WINDOW_SLOT (window->details->active_slots->data);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline NautilusWindowSlot *
|
||||
get_first_inactive_slot (NautilusWindow *window)
|
||||
{
|
||||
|
@ -824,10 +814,15 @@ nautilus_window_slot_close (NautilusWindowSlot *slot)
|
|||
|
||||
window = slot->window;
|
||||
if (window != NULL) {
|
||||
window->details->active_slots = g_list_remove (window->details->active_slots, slot);
|
||||
|
||||
if (window->details->active_slot == slot) {
|
||||
next_slot = get_last_active_slot (window);
|
||||
g_assert (window->details->active_slots != NULL);
|
||||
g_assert (window->details->active_slots->data == slot);
|
||||
|
||||
next_slot = NULL;
|
||||
if (window->details->active_slots->next != NULL) {
|
||||
next_slot = NAUTILUS_WINDOW_SLOT (window->details->active_slots->next->data);
|
||||
}
|
||||
|
||||
if (next_slot == NULL) {
|
||||
next_slot = get_first_inactive_slot (window);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue