summaryrefslogtreecommitdiff
path: root/src/nautilus-window-slot.c
diff options
context:
space:
mode:
authorChristian Neumair <cneumair@gnome.org>2008-05-01 15:33:44 +0000
committerChristian Neumair <cneumair@src.gnome.org>2008-05-01 15:33:44 +0000
commit20bd85df674bb4c86c51aa7e18426db030e73892 (patch)
treebd3c3ba9e3937d901e5819febe0c551c2568d43a /src/nautilus-window-slot.c
parent977e31e63dac2e09e6c2c92cd40591abdc0c86ef (diff)
downloadnautilus-20bd85df674bb4c86c51aa7e18426db030e73892.tar.gz
Import Epiphany's EphyNotebook with some changes. Support a flag to
2008-05-01 Christian Neumair <cneumair@gnome.org> * src/Makefile.am: * src/ephy-spinner.c (ephy_spinner_get_spinning): * src/ephy-spinner.h: * src/nautilus-navigation-window-menus.c (action_new_tab_callback): * src/nautilus-navigation-window-slot.c (nautilus_navigation_window_slot_class_init): * src/nautilus-navigation-window.c (notebook_tab_close_requested), (nautilus_navigation_window_init), (real_sync_title), (real_sync_allow_stop), (real_open_slot), (nautilus_navigation_window_class_init): * src/nautilus-notebook.c (nautilus_notebook_set_dnd_enabled), (nautilus_notebook_get_property), (nautilus_notebook_set_property), (nautilus_notebook_class_init), (find_notebook_at_pointer), (is_in_notebook_window), (find_tab_num_at_pos), (button_press_cb), (notebook_drag_data_received_cb), (nautilus_notebook_init), (nautilus_notebook_sync_loading), (nautilus_notebook_sync_tab_label), (close_button_clicked_cb), (tab_label_style_set_cb), (build_tab_label), (nautilus_notebook_insert_page), (nautilus_notebook_add_tab), (nautilus_notebook_remove): * src/nautilus-notebook.h: * src/nautilus-spatial-window.c (real_sync_title), (real_sync_allow_stop), (real_open_slot), (nautilus_spatial_window_class_init): * src/nautilus-window-manage-views.c (nautilus_window_slot_open_location_full), (mount_not_mounted_callback): * src/nautilus-window-private.h: * src/nautilus-window-slot.c (real_active), (nautilus_window_slot_class_init), (nautilus_window_slot_set_title), (nautilus_window_slot_dispose): * src/nautilus-window-slot.h: * src/nautilus-window.c (nautilus_window_sync_allow_stop), (nautilus_window_slot_set_allow_stop), (nautilus_window_constructor), (nautilus_window_open_slot), (nautilus_window_set_active_slot), (get_last_active_slot), (nautilus_window_slot_close), (real_sync_title), (nautilus_window_sync_title), (nautilus_window_class_init): * src/nautilus-window.h: * src/nautilus-notebook.[ch]: Import Epiphany's EphyNotebook with some changes. Support a flag to control whether tabs are opened at the end, or after the currently active tab. Rename NautilusWindow's set_throbber_active() method to sync_allow_stop(), and set_title() to sync_title(). Adapt GUI synchronization so that notebook tab labels are updated as the state of the slot changes. svn path=/branches/multiview/; revision=14121
Diffstat (limited to 'src/nautilus-window-slot.c')
-rw-r--r--src/nautilus-window-slot.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 1dd197f54..6226acef5 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -54,8 +54,8 @@ real_active (NautilusWindowSlot *slot)
/* sync window to new slot */
nautilus_window_sync_status (window);
- nautilus_window_sync_allow_stop (window);
- nautilus_window_sync_title (window);
+ nautilus_window_sync_allow_stop (window, slot);
+ nautilus_window_sync_title (window, slot);
nautilus_window_sync_location_widgets (window);
if (slot->viewed_file != NULL) {
@@ -132,18 +132,11 @@ nautilus_window_slot_init (NautilusWindowSlot *slot)
slot->title = g_strdup (_("Loading..."));
}
-static NautilusWindowSlot *
-real_get_close_successor (NautilusWindowSlot *slot)
-{
- return NULL;
-}
-
static void
nautilus_window_slot_class_init (NautilusWindowSlotClass *class)
{
class->active = real_active;
class->inactive = real_inactive;
- class->get_close_successor = real_get_close_successor;
G_OBJECT_CLASS (class)->dispose = nautilus_window_slot_dispose;
}
@@ -245,8 +238,8 @@ nautilus_window_slot_set_title (NautilusWindowSlot *slot,
nautilus_send_history_list_changed ();
}
- if (changed && window->details->active_slot == slot) {
- nautilus_window_sync_title (window);
+ if (changed) {
+ nautilus_window_sync_title (window, slot);
}
}
@@ -336,17 +329,6 @@ nautilus_window_slot_add_extra_location_widget (NautilusWindowSlot *slot,
gtk_widget_show (slot->extra_location_widgets);
}
-/* gets the slot that is supposed to be displayed after closing
- * the active slot.
- */
-NautilusWindowSlot *
-nautilus_window_slot_get_close_successor (NautilusWindowSlot *slot)
-{
- return EEL_CALL_METHOD_WITH_RETURN_VALUE (NAUTILUS_WINDOW_SLOT_CLASS, slot,
- get_close_successor, (slot));
-}
-
-
static void
nautilus_window_slot_dispose (GObject *object)
{
@@ -397,6 +379,8 @@ nautilus_window_slot_dispose (GObject *object)
slot->new_content_view = NULL;
}
+ slot->window = NULL;
+
g_free (slot->title);
slot->title = NULL;