[nautilus] window-pane: remove active_slots madness
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] window-pane: remove active_slots madness
- Date: Thu, 17 Feb 2011 16:31:14 +0000 (UTC)
commit 1755d56bdfefabf0b764aa3531e93f8fb18d73b0
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Feb 15 20:14:29 2011 -0500
window-pane: remove active_slots madness
We can't have more than one active slot at the same time anyway.
src/nautilus-window-pane.c | 14 +-------------
src/nautilus-window-pane.h | 1 -
src/nautilus-window.c | 7 -------
3 files changed, 1 insertions(+), 21 deletions(-)
---
diff --git a/src/nautilus-window-pane.c b/src/nautilus-window-pane.c
index f5e740b..e5e0d51 100644
--- a/src/nautilus-window-pane.c
+++ b/src/nautilus-window-pane.c
@@ -71,18 +71,7 @@ nautilus_window_pane_slot_close (NautilusWindowPane *pane, NautilusWindowSlot *s
NautilusWindow *window;
window = pane->window;
if (pane->active_slot == slot) {
- g_assert (pane->active_slots != NULL);
- g_assert (pane->active_slots->data == slot);
-
- next_slot = NULL;
- if (pane->active_slots->next != NULL) {
- next_slot = NAUTILUS_WINDOW_SLOT (pane->active_slots->next->data);
- }
-
- if (next_slot == NULL) {
- next_slot = get_first_inactive_slot (NAUTILUS_WINDOW_PANE (pane));
- }
-
+ next_slot = get_first_inactive_slot (NAUTILUS_WINDOW_PANE (pane));
nautilus_window_set_active_slot (window, next_slot);
}
nautilus_window_close_slot (slot);
@@ -158,7 +147,6 @@ static void
nautilus_window_pane_init (NautilusWindowPane *pane)
{
pane->slots = NULL;
- pane->active_slots = NULL;
pane->active_slot = NULL;
pane->is_active = FALSE;
}
diff --git a/src/nautilus-window-pane.h b/src/nautilus-window-pane.h
index 3cc7aba..538a9de 100644
--- a/src/nautilus-window-pane.h
+++ b/src/nautilus-window-pane.h
@@ -67,7 +67,6 @@ struct _NautilusWindowPane {
/* available slots, and active slot.
* Both of them may never be NULL. */
GList *slots;
- GList *active_slots;
NautilusWindowSlot *active_slot;
/* whether or not this pane is active */
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 626dcea..03e5d2c 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -718,8 +718,6 @@ nautilus_window_close_slot (NautilusWindowSlot *slot)
slot->pane = NULL;
g_object_unref (slot);
pane->slots = g_list_remove (pane->slots, slot);
- pane->active_slots = g_list_remove (pane->active_slots, slot);
-
}
NautilusWindowPane*
@@ -806,11 +804,6 @@ nautilus_window_set_active_slot (NautilusWindow *window, NautilusWindowSlot *new
/* make new slot active, if it exists */
if (new_slot) {
- window->details->active_pane->active_slots =
- g_list_remove (window->details->active_pane->active_slots, new_slot);
- window->details->active_pane->active_slots =
- g_list_prepend (window->details->active_pane->active_slots, new_slot);
-
/* inform sidebar panels */
nautilus_window_report_location_change (window);
/* TODO decide whether "selection-changed" should be emitted */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]