Commit f7492a63 authored by Elliot Lee's avatar Elliot Lee

Add a specific flag to indicate reload, and make use of it.



* src/ntl-window.[ch], src/ntl-window-msgs.c,
src/ntl-window-private.h: Add a specific flag to indicate reload, and make use of it.
parent dfc585b3
2000-01-21 Elliot Lee <sopwith@redhat.com> 2000-01-21 Elliot Lee <sopwith@redhat.com>
* src/ntl-window.[ch], src/ntl-window-msgs.c,
src/ntl-window-private.h: Add a specific flag to indicate reload, and make use of it.
* libnautilus/nautilus-directory.c: Allocate an extra byte in the * libnautilus/nautilus-directory.c: Allocate an extra byte in the
buffer, for safety's sake. buffer, for safety's sake.
* src/ntl-window-msgs.c: Fix back/fwd buttons. * src/ntl-window-msgs.c: Fix back/fwd buttons.
......
...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window) ...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window)
window->btn_back = toolbar_info[0].widget; window->btn_back = toolbar_info[0].widget;
window->btn_fwd = toolbar_info[1].widget; window->btn_fwd = toolbar_info[1].widget;
nautilus_window_allow_stop(window, FALSE); nautilus_window_allow_stop(window, FALSE);
gtk_widget_set_sensitive(window->btn_back, FALSE);
gtk_widget_set_sensitive(window->btn_fwd, FALSE);
/* set up location bar */ /* set up location bar */
...@@ -741,7 +743,7 @@ nautilus_window_back (GtkWidget *btn, NautilusWindow *window) ...@@ -741,7 +743,7 @@ nautilus_window_back (GtkWidget *btn, NautilusWindow *window)
nri.requested_uri = window->uris_prev->data; nri.requested_uri = window->uris_prev->data;
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE; nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, TRUE); nautilus_window_change_location(window, &nri, NULL, TRUE, FALSE);
} }
static void static void
...@@ -754,7 +756,7 @@ nautilus_window_fwd (GtkWidget *btn, NautilusWindow *window) ...@@ -754,7 +756,7 @@ nautilus_window_fwd (GtkWidget *btn, NautilusWindow *window)
memset(&nri, 0, sizeof(nri)); memset(&nri, 0, sizeof(nri));
nri.requested_uri = window->uris_next->data; nri.requested_uri = window->uris_next->data;
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE; nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, FALSE); nautilus_window_change_location(window, &nri, NULL, FALSE, FALSE);
} }
const char * const char *
...@@ -790,9 +792,12 @@ nautilus_window_up (GtkWidget *btn, NautilusWindow *window) ...@@ -790,9 +792,12 @@ nautilus_window_up (GtkWidget *btn, NautilusWindow *window)
static void static void
nautilus_window_reload (GtkWidget *btn, NautilusWindow *window) nautilus_window_reload (GtkWidget *btn, NautilusWindow *window)
{ {
/* Should enforce same window! */ Nautilus_NavigationRequestInfo nri;
nautilus_window_goto_uri (window,
nautilus_window_get_requested_uri(window)); memset(&nri, 0, sizeof(nri));
nri.requested_uri = (char *)nautilus_window_get_requested_uri(window);
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, FALSE, TRUE);
} }
static void static void
......
...@@ -90,6 +90,7 @@ struct _NautilusWindow { ...@@ -90,6 +90,7 @@ struct _NautilusWindow {
gboolean changes_pending : 1; gboolean changes_pending : 1;
gboolean is_back : 1; gboolean is_back : 1;
gboolean is_reload : 1;
gboolean views_shown : 1; gboolean views_shown : 1;
gboolean view_bombed_out : 1; gboolean view_bombed_out : 1;
gboolean view_activation_complete : 1; gboolean view_activation_complete : 1;
......
...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window) ...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window)
window->btn_back = toolbar_info[0].widget; window->btn_back = toolbar_info[0].widget;
window->btn_fwd = toolbar_info[1].widget; window->btn_fwd = toolbar_info[1].widget;
nautilus_window_allow_stop(window, FALSE); nautilus_window_allow_stop(window, FALSE);
gtk_widget_set_sensitive(window->btn_back, FALSE);
gtk_widget_set_sensitive(window->btn_fwd, FALSE);
/* set up location bar */ /* set up location bar */
...@@ -741,7 +743,7 @@ nautilus_window_back (GtkWidget *btn, NautilusWindow *window) ...@@ -741,7 +743,7 @@ nautilus_window_back (GtkWidget *btn, NautilusWindow *window)
nri.requested_uri = window->uris_prev->data; nri.requested_uri = window->uris_prev->data;
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE; nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, TRUE); nautilus_window_change_location(window, &nri, NULL, TRUE, FALSE);
} }
static void static void
...@@ -754,7 +756,7 @@ nautilus_window_fwd (GtkWidget *btn, NautilusWindow *window) ...@@ -754,7 +756,7 @@ nautilus_window_fwd (GtkWidget *btn, NautilusWindow *window)
memset(&nri, 0, sizeof(nri)); memset(&nri, 0, sizeof(nri));
nri.requested_uri = window->uris_next->data; nri.requested_uri = window->uris_next->data;
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE; nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, FALSE); nautilus_window_change_location(window, &nri, NULL, FALSE, FALSE);
} }
const char * const char *
...@@ -790,9 +792,12 @@ nautilus_window_up (GtkWidget *btn, NautilusWindow *window) ...@@ -790,9 +792,12 @@ nautilus_window_up (GtkWidget *btn, NautilusWindow *window)
static void static void
nautilus_window_reload (GtkWidget *btn, NautilusWindow *window) nautilus_window_reload (GtkWidget *btn, NautilusWindow *window)
{ {
/* Should enforce same window! */ Nautilus_NavigationRequestInfo nri;
nautilus_window_goto_uri (window,
nautilus_window_get_requested_uri(window)); memset(&nri, 0, sizeof(nri));
nri.requested_uri = (char *)nautilus_window_get_requested_uri(window);
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, FALSE, TRUE);
} }
static void static void
......
...@@ -90,6 +90,7 @@ struct _NautilusWindow { ...@@ -90,6 +90,7 @@ struct _NautilusWindow {
gboolean changes_pending : 1; gboolean changes_pending : 1;
gboolean is_back : 1; gboolean is_back : 1;
gboolean is_reload : 1;
gboolean views_shown : 1; gboolean views_shown : 1;
gboolean view_bombed_out : 1; gboolean view_bombed_out : 1;
gboolean view_activation_complete : 1; gboolean view_activation_complete : 1;
......
...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window) ...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window)
window->btn_back = toolbar_info[0].widget; window->btn_back = toolbar_info[0].widget;
window->btn_fwd = toolbar_info[1].widget; window->btn_fwd = toolbar_info[1].widget;
nautilus_window_allow_stop(window, FALSE); nautilus_window_allow_stop(window, FALSE);
gtk_widget_set_sensitive(window->btn_back, FALSE);
gtk_widget_set_sensitive(window->btn_fwd, FALSE);
/* set up location bar */ /* set up location bar */
...@@ -741,7 +743,7 @@ nautilus_window_back (GtkWidget *btn, NautilusWindow *window) ...@@ -741,7 +743,7 @@ nautilus_window_back (GtkWidget *btn, NautilusWindow *window)
nri.requested_uri = window->uris_prev->data; nri.requested_uri = window->uris_prev->data;
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE; nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, TRUE); nautilus_window_change_location(window, &nri, NULL, TRUE, FALSE);
} }
static void static void
...@@ -754,7 +756,7 @@ nautilus_window_fwd (GtkWidget *btn, NautilusWindow *window) ...@@ -754,7 +756,7 @@ nautilus_window_fwd (GtkWidget *btn, NautilusWindow *window)
memset(&nri, 0, sizeof(nri)); memset(&nri, 0, sizeof(nri));
nri.requested_uri = window->uris_next->data; nri.requested_uri = window->uris_next->data;
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE; nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, FALSE); nautilus_window_change_location(window, &nri, NULL, FALSE, FALSE);
} }
const char * const char *
...@@ -790,9 +792,12 @@ nautilus_window_up (GtkWidget *btn, NautilusWindow *window) ...@@ -790,9 +792,12 @@ nautilus_window_up (GtkWidget *btn, NautilusWindow *window)
static void static void
nautilus_window_reload (GtkWidget *btn, NautilusWindow *window) nautilus_window_reload (GtkWidget *btn, NautilusWindow *window)
{ {
/* Should enforce same window! */ Nautilus_NavigationRequestInfo nri;
nautilus_window_goto_uri (window,
nautilus_window_get_requested_uri(window)); memset(&nri, 0, sizeof(nri));
nri.requested_uri = (char *)nautilus_window_get_requested_uri(window);
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, FALSE, TRUE);
} }
static void static void
......
...@@ -90,6 +90,7 @@ struct _NautilusWindow { ...@@ -90,6 +90,7 @@ struct _NautilusWindow {
gboolean changes_pending : 1; gboolean changes_pending : 1;
gboolean is_back : 1; gboolean is_back : 1;
gboolean is_reload : 1;
gboolean views_shown : 1; gboolean views_shown : 1;
gboolean view_bombed_out : 1; gboolean view_bombed_out : 1;
gboolean view_activation_complete : 1; gboolean view_activation_complete : 1;
......
...@@ -180,36 +180,39 @@ nautilus_window_update_internals(NautilusWindow *window, NautilusNavigationInfo ...@@ -180,36 +180,39 @@ nautilus_window_update_internals(NautilusWindow *window, NautilusNavigationInfo
Nautilus_NavigationInfo *newni; Nautilus_NavigationInfo *newni;
/* Maintain history lists. */ /* Maintain history lists. */
if (window->is_back) if(!window->is_reload)
{ {
/* Going back. Remove one item from the prev list and add the current item to the next list. */ if (window->is_back)
{
/* Going back. Remove one item from the prev list and add the current item to the next list. */
g_assert(window->uris_prev); g_assert(window->uris_prev);
g_assert(!strcmp((const char*)window->uris_prev->data, loci->navinfo.requested_uri)); g_assert(!strcmp((const char*)window->uris_prev->data, loci->navinfo.requested_uri));
g_assert(window->ni); g_assert(window->ni);
window->uris_next = g_slist_prepend(window->uris_next, g_strdup(window->ni->requested_uri)); window->uris_next = g_slist_prepend(window->uris_next, g_strdup(window->ni->requested_uri));
g_free(window->uris_prev->data); g_free(window->uris_prev->data);
window->uris_prev = g_slist_remove_link(window->uris_prev, window->uris_prev); window->uris_prev = g_slist_remove_link(window->uris_prev, window->uris_prev);
}
else
{
/* Going forward. Remove one item from the next if it's the same as the the request.
Otherwise, clobber the entire next list.
*/
if (window->uris_next && !strcmp(loci->navinfo.requested_uri, (const char*)window->uris_next->data))
{
g_free(window->uris_next->data);
window->uris_next = g_slist_remove_link(window->uris_next, window->uris_next);
} }
else else
{ {
g_slist_foreach(window->uris_next, (GFunc)g_free, NULL); /* Going forward. Remove one item from the next if it's the same as the the request.
g_slist_free(window->uris_next); window->uris_next = NULL; Otherwise, clobber the entire next list.
*/
if (window->uris_next && !strcmp(loci->navinfo.requested_uri, (const char*)window->uris_next->data))
{
g_free(window->uris_next->data);
window->uris_next = g_slist_remove_link(window->uris_next, window->uris_next);
}
else
{
g_slist_foreach(window->uris_next, (GFunc)g_free, NULL);
g_slist_free(window->uris_next); window->uris_next = NULL;
}
if (window->ni)
window->uris_prev = g_slist_prepend(window->uris_prev, g_strdup(window->ni->requested_uri));
} }
if (window->ni)
window->uris_prev = g_slist_prepend(window->uris_prev, g_strdup(window->ni->requested_uri));
} }
new_uri = gnome_vfs_uri_new (loci->navinfo.requested_uri); new_uri = gnome_vfs_uri_new (loci->navinfo.requested_uri);
...@@ -421,7 +424,7 @@ nautilus_window_request_location_change(NautilusWindow *window, ...@@ -421,7 +424,7 @@ nautilus_window_request_location_change(NautilusWindow *window,
Nautilus_NavigationRequestInfo *loc, Nautilus_NavigationRequestInfo *loc,
NautilusView *requesting_view) NautilusView *requesting_view)
{ {
nautilus_window_change_location(window, loc, requesting_view, FALSE); nautilus_window_change_location(window, loc, requesting_view, FALSE, FALSE);
} }
static NautilusView * static NautilusView *
...@@ -828,7 +831,8 @@ void ...@@ -828,7 +831,8 @@ void
nautilus_window_change_location(NautilusWindow *window, nautilus_window_change_location(NautilusWindow *window,
Nautilus_NavigationRequestInfo *loc, Nautilus_NavigationRequestInfo *loc,
NautilusView *requesting_view, NautilusView *requesting_view,
gboolean is_back) gboolean is_back,
gboolean is_reload)
{ {
nautilus_window_set_state_info(window, (NautilusWindowStateItem)RESET_TO_IDLE, (NautilusWindowStateItem)0); nautilus_window_set_state_info(window, (NautilusWindowStateItem)RESET_TO_IDLE, (NautilusWindowStateItem)0);
...@@ -839,6 +843,7 @@ nautilus_window_change_location(NautilusWindow *window, ...@@ -839,6 +843,7 @@ nautilus_window_change_location(NautilusWindow *window,
nautilus_window_progress_indicate(window, PROGRESS_INITIAL, 0, _("Gathering information")); nautilus_window_progress_indicate(window, PROGRESS_INITIAL, 0, _("Gathering information"));
window->is_back = is_back; window->is_back = is_back;
window->is_reload = is_reload;
window->new_requesting_view = requesting_view; window->new_requesting_view = requesting_view;
window->cancel_tag = window->cancel_tag =
...@@ -866,6 +871,8 @@ view_menu_switch_views_cb (GtkWidget *widget, gpointer data) ...@@ -866,6 +871,8 @@ view_menu_switch_views_cb (GtkWidget *widget, gpointer data)
view = nautilus_window_load_content_view (window, iid, window->ni, NULL); view = nautilus_window_load_content_view (window, iid, window->ni, NULL);
nautilus_window_set_state_info(window, (NautilusWindowStateItem)NEW_CONTENT_VIEW_ACTIVATED, view, (NautilusWindowStateItem)0); nautilus_window_set_state_info(window, (NautilusWindowStateItem)NEW_CONTENT_VIEW_ACTIVATED, view, (NautilusWindowStateItem)0);
window->is_back = FALSE;
window->is_reload = TRUE;
} }
/* /*
......
...@@ -35,7 +35,8 @@ void nautilus_window_set_status(NautilusWindow *window, const char *txt); ...@@ -35,7 +35,8 @@ void nautilus_window_set_status(NautilusWindow *window, const char *txt);
void nautilus_window_change_location(NautilusWindow *window, void nautilus_window_change_location(NautilusWindow *window,
Nautilus_NavigationRequestInfo *loc, Nautilus_NavigationRequestInfo *loc,
NautilusView *requesting_view, NautilusView *requesting_view,
gboolean is_back); gboolean is_back,
gboolean is_reload);
void nautilus_window_remove_meta_view_real(NautilusWindow *window, NautilusView *meta_view); void nautilus_window_remove_meta_view_real(NautilusWindow *window, NautilusView *meta_view);
void nautilus_window_end_location_change(NautilusWindow *window); void nautilus_window_end_location_change(NautilusWindow *window);
void nautilus_window_connect_view (NautilusWindow *window, void nautilus_window_connect_view (NautilusWindow *window,
......
...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window) ...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window)
window->btn_back = toolbar_info[0].widget; window->btn_back = toolbar_info[0].widget;
window->btn_fwd = toolbar_info[1].widget; window->btn_fwd = toolbar_info[1].widget;
nautilus_window_allow_stop(window, FALSE); nautilus_window_allow_stop(window, FALSE);
gtk_widget_set_sensitive(window->btn_back, FALSE);
gtk_widget_set_sensitive(window->btn_fwd, FALSE);
/* set up location bar */ /* set up location bar */
...@@ -741,7 +743,7 @@ nautilus_window_back (GtkWidget *btn, NautilusWindow *window) ...@@ -741,7 +743,7 @@ nautilus_window_back (GtkWidget *btn, NautilusWindow *window)
nri.requested_uri = window->uris_prev->data; nri.requested_uri = window->uris_prev->data;
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE; nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, TRUE); nautilus_window_change_location(window, &nri, NULL, TRUE, FALSE);
} }
static void static void
...@@ -754,7 +756,7 @@ nautilus_window_fwd (GtkWidget *btn, NautilusWindow *window) ...@@ -754,7 +756,7 @@ nautilus_window_fwd (GtkWidget *btn, NautilusWindow *window)
memset(&nri, 0, sizeof(nri)); memset(&nri, 0, sizeof(nri));
nri.requested_uri = window->uris_next->data; nri.requested_uri = window->uris_next->data;
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE; nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, FALSE); nautilus_window_change_location(window, &nri, NULL, FALSE, FALSE);
} }
const char * const char *
...@@ -790,9 +792,12 @@ nautilus_window_up (GtkWidget *btn, NautilusWindow *window) ...@@ -790,9 +792,12 @@ nautilus_window_up (GtkWidget *btn, NautilusWindow *window)
static void static void
nautilus_window_reload (GtkWidget *btn, NautilusWindow *window) nautilus_window_reload (GtkWidget *btn, NautilusWindow *window)
{ {
/* Should enforce same window! */ Nautilus_NavigationRequestInfo nri;
nautilus_window_goto_uri (window,
nautilus_window_get_requested_uri(window)); memset(&nri, 0, sizeof(nri));
nri.requested_uri = (char *)nautilus_window_get_requested_uri(window);
nri.new_window_default = nri.new_window_suggested = nri.new_window_enforced = Nautilus_V_FALSE;
nautilus_window_change_location(window, &nri, NULL, FALSE, TRUE);
} }
static void static void
......
...@@ -90,6 +90,7 @@ struct _NautilusWindow { ...@@ -90,6 +90,7 @@ struct _NautilusWindow {
gboolean changes_pending : 1; gboolean changes_pending : 1;
gboolean is_back : 1; gboolean is_back : 1;
gboolean is_reload : 1;
gboolean views_shown : 1; gboolean views_shown : 1;
gboolean view_bombed_out : 1; gboolean view_bombed_out : 1;
gboolean view_activation_complete : 1; gboolean view_activation_complete : 1;
......
...@@ -180,36 +180,39 @@ nautilus_window_update_internals(NautilusWindow *window, NautilusNavigationInfo ...@@ -180,36 +180,39 @@ nautilus_window_update_internals(NautilusWindow *window, NautilusNavigationInfo
Nautilus_NavigationInfo *newni; Nautilus_NavigationInfo *newni;
/* Maintain history lists. */ /* Maintain history lists. */
if (window->is_back) if(!window->is_reload)
{ {
/* Going back. Remove one item from the prev list and add the current item to the next list. */ if (window->is_back)
{
/* Going back. Remove one item from the prev list and add the current item to the next list. */
g_assert(window->uris_prev); g_assert(window->uris_prev);
g_assert(!strcmp((const char*)window->uris_prev->data, loci->navinfo.requested_uri)); g_assert(!strcmp((const char*)window->uris_prev->data, loci->navinfo.requested_uri));
g_assert(window->ni); g_assert(window->ni);
window->uris_next = g_slist_prepend(window->uris_next, g_strdup(window->ni->requested_uri)); window->uris_next = g_slist_prepend(window->uris_next, g_strdup(window->ni->requested_uri));
g_free(window->uris_prev->data); g_free(window->uris_prev->data);
window->uris_prev = g_slist_remove_link(window->uris_prev, window->uris_prev); window->uris_prev = g_slist_remove_link(window->uris_prev, window->uris_prev);
}
else
{
/* Going forward. Remove one item from the next if it's the same as the the request.
Otherwise, clobber the entire next list.
*/
if (window->uris_next && !strcmp(loci->navinfo.requested_uri, (const char*)window->uris_next->data))
{
g_free(window->uris_next->data);
window->uris_next = g_slist_remove_link(window->uris_next, window->uris_next);
} }
else else
{ {
g_slist_foreach(window->uris_next, (GFunc)g_free, NULL); /* Going forward. Remove one item from the next if it's the same as the the request.
g_slist_free(window->uris_next); window->uris_next = NULL; Otherwise, clobber the entire next list.
*/
if (window->uris_next && !strcmp(loci->navinfo.requested_uri, (const char*)window->uris_next->data))
{
g_free(window->uris_next->data);
window->uris_next = g_slist_remove_link(window->uris_next, window->uris_next);
}
else
{
g_slist_foreach(window->uris_next, (GFunc)g_free, NULL);
g_slist_free(window->uris_next); window->uris_next = NULL;
}
if (window->ni)
window->uris_prev = g_slist_prepend(window->uris_prev, g_strdup(window->ni->requested_uri));
} }
if (window->ni)
window->uris_prev = g_slist_prepend(window->uris_prev, g_strdup(window->ni->requested_uri));
} }
new_uri = gnome_vfs_uri_new (loci->navinfo.requested_uri); new_uri = gnome_vfs_uri_new (loci->navinfo.requested_uri);
...@@ -421,7 +424,7 @@ nautilus_window_request_location_change(NautilusWindow *window, ...@@ -421,7 +424,7 @@ nautilus_window_request_location_change(NautilusWindow *window,
Nautilus_NavigationRequestInfo *loc, Nautilus_NavigationRequestInfo *loc,
NautilusView *requesting_view) NautilusView *requesting_view)
{ {
nautilus_window_change_location(window, loc, requesting_view, FALSE); nautilus_window_change_location(window, loc, requesting_view, FALSE, FALSE);
} }
static NautilusView * static NautilusView *
...@@ -828,7 +831,8 @@ void ...@@ -828,7 +831,8 @@ void
nautilus_window_change_location(NautilusWindow *window, nautilus_window_change_location(NautilusWindow *window,
Nautilus_NavigationRequestInfo *loc, Nautilus_NavigationRequestInfo *loc,
NautilusView *requesting_view, NautilusView *requesting_view,
gboolean is_back) gboolean is_back,
gboolean is_reload)
{ {
nautilus_window_set_state_info(window, (NautilusWindowStateItem)RESET_TO_IDLE, (NautilusWindowStateItem)0); nautilus_window_set_state_info(window, (NautilusWindowStateItem)RESET_TO_IDLE, (NautilusWindowStateItem)0);
...@@ -839,6 +843,7 @@ nautilus_window_change_location(NautilusWindow *window, ...@@ -839,6 +843,7 @@ nautilus_window_change_location(NautilusWindow *window,
nautilus_window_progress_indicate(window, PROGRESS_INITIAL, 0, _("Gathering information")); nautilus_window_progress_indicate(window, PROGRESS_INITIAL, 0, _("Gathering information"));
window->is_back = is_back; window->is_back = is_back;
window->is_reload = is_reload;
window->new_requesting_view = requesting_view; window->new_requesting_view = requesting_view;
window->cancel_tag = window->cancel_tag =
...@@ -866,6 +871,8 @@ view_menu_switch_views_cb (GtkWidget *widget, gpointer data) ...@@ -866,6 +871,8 @@ view_menu_switch_views_cb (GtkWidget *widget, gpointer data)
view = nautilus_window_load_content_view (window, iid, window->ni, NULL); view = nautilus_window_load_content_view (window, iid, window->ni, NULL);
nautilus_window_set_state_info(window, (NautilusWindowStateItem)NEW_CONTENT_VIEW_ACTIVATED, view, (NautilusWindowStateItem)0); nautilus_window_set_state_info(window, (NautilusWindowStateItem)NEW_CONTENT_VIEW_ACTIVATED, view, (NautilusWindowStateItem)0);
window->is_back = FALSE;
window->is_reload = TRUE;
} }
/* /*
......
...@@ -35,7 +35,8 @@ void nautilus_window_set_status(NautilusWindow *window, const char *txt); ...@@ -35,7 +35,8 @@ void nautilus_window_set_status(NautilusWindow *window, const char *txt);
void nautilus_window_change_location(NautilusWindow *window, void nautilus_window_change_location(NautilusWindow *window,
Nautilus_NavigationRequestInfo *loc, Nautilus_NavigationRequestInfo *loc,
NautilusView *requesting_view, NautilusView *requesting_view,
gboolean is_back); gboolean is_back,
gboolean is_reload);
void nautilus_window_remove_meta_view_real(NautilusWindow *window, NautilusView *meta_view); void nautilus_window_remove_meta_view_real(NautilusWindow *window, NautilusView *meta_view);
void nautilus_window_end_location_change(NautilusWindow *window); void nautilus_window_end_location_change(NautilusWindow *window);
void nautilus_window_connect_view (NautilusWindow *window, void nautilus_window_connect_view (NautilusWindow *window,
......
...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window) ...@@ -424,6 +424,8 @@ nautilus_window_constructed(NautilusWindow *window)
window->btn_back = toolbar_info[0].widget; window->btn_back = toolbar_info[0].widget;
window->btn_fwd = toolbar_info[1].widget; window->btn_fwd = toolbar_info[1].widget;
nautilus_window_allow_stop(window, FALSE); nautilus_window_allow_stop(window, FALSE);
gtk_widget_set_sensitive(window->btn_back, FALSE);
gtk_widget_set_sensitive(window->btn_fwd, FALSE);
/* set up location bar */