[nautilus] window-slot: show window when view starts loading
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] window-slot: show window when view starts loading
- Date: Fri, 7 Aug 2015 18:31:02 +0000 (UTC)
commit ae96063471fd31f1c58818dfa4b0440ce8302f7e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Aug 7 10:34:30 2015 -0300
window-slot: show window when view starts loading
NautilusView directly access NautilusWindow to make sure
the window is shown when the view starts loading, and not
before this.
Since we're restricting communication between NautilusView
and other widgets, the view shouldn't ask the window directly.
Fixed by making NautilusWindowSlot handle the visibility of the
window on NautilusView::begin-loading signal. Also, this patch
gets rid of an old code that updates the title of supposedly
hidden slots that were present or created before showing the
window. which is something doesn't happen anyomore.
https://bugzilla.gnome.org/show_bug.cgi?id=753356
src/nautilus-view.c | 3 ---
src/nautilus-window-slot.c | 4 ++++
src/nautilus-window.c | 21 ---------------------
src/nautilus-window.h | 3 ---
4 files changed, 4 insertions(+), 27 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index aa64f46..073bacc 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -7030,9 +7030,6 @@ finish_loading (NautilusView *view)
check_empty_states (view);
- /* Assume we have now all information to show window */
- nautilus_window_view_visible (nautilus_view_get_window (view), NAUTILUS_VIEW (view));
-
if (nautilus_directory_are_all_files_seen (view->details->model)) {
/* Unschedule a pending update and schedule a new one with the minimal
* update interval. This gives the view a short chance at gathering the
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index f87b14b..766c6a5 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -2155,6 +2155,10 @@ view_begin_loading_cb (NautilusView *view,
nautilus_window_slot_set_allow_stop (slot, TRUE);
}
+ gtk_widget_grab_focus (GTK_WIDGET (slot->details->window));
+
+ gtk_widget_show (GTK_WIDGET (slot->details->window));
+
nautilus_profile_end (NULL);
}
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index f2459b5..6daebbf 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -2195,27 +2195,6 @@ nautilus_window_finalize (GObject *object)
G_OBJECT_CLASS (nautilus_window_parent_class)->finalize (object);
}
-void
-nautilus_window_view_visible (NautilusWindow *window,
- NautilusView *view)
-{
- NautilusWindowSlot *slot;
- GList *l;
-
- g_return_if_fail (NAUTILUS_IS_WINDOW (window));
-
- /* Look for other non-visible slots */
- for (l = window->priv->slots; l != NULL; l = l->next) {
- slot = l->data;
- nautilus_window_slot_update_title (slot);
- }
-
- gtk_widget_grab_focus (GTK_WIDGET (window));
-
- /* All slots, show window */
- gtk_widget_show (GTK_WIDGET (window));
-}
-
static void
nautilus_window_save_geometry (NautilusWindow *window)
{
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index ed102d8..7bb3e2d 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -109,9 +109,6 @@ void nautilus_window_close (NautilusWindow *window
void nautilus_window_go_to (NautilusWindow *window,
GFile *location);
void nautilus_window_new_tab (NautilusWindow *window);
-
-void nautilus_window_view_visible (NautilusWindow *window,
- NautilusView *view);
NautilusWindowSlot * nautilus_window_get_active_slot (NautilusWindow *window);
void nautilus_window_set_active_slot (NautilusWindow *window,
NautilusWindowSlot *slot);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]