Commit cff594ae authored by Cosimo Cecchi's avatar Cosimo Cecchi

window: cleanup header

parent f57a9580
......@@ -104,10 +104,6 @@ struct NautilusWindowDetails
guint extensions_toolbar_merge_id;
GtkActionGroup *extensions_toolbar_action_group;
/* spinner */
gboolean spinner_active;
GtkWidget *spinner;
/* focus widget before the location bar has been shown temporarily */
GtkWidget *last_focus_widget;
......@@ -151,9 +147,6 @@ struct NautilusWindowDetails
typedef void (*NautilusBookmarkFailedCallback) (NautilusWindow *window,
NautilusBookmark *bookmark);
void nautilus_window_set_status (NautilusWindow *window,
NautilusWindowSlot *slot,
const char *status);
void nautilus_window_load_view_as_menus (NautilusWindow *window);
void nautilus_window_load_extension_menus (NautilusWindow *window);
void nautilus_window_initialize_menus (NautilusWindow *window);
......@@ -168,7 +161,6 @@ void nautilus_menus_append_bookmark_to_menu (Nautil
guint merge_id,
GCallback refresh_callback,
NautilusBookmarkFailedCallback failed_callback);
void nautilus_window_update_find_menu_item (NautilusWindow *window);
NautilusWindowSlot *nautilus_window_open_slot (NautilusWindowPane *pane,
NautilusWindowOpenSlotFlags flags);
......@@ -185,9 +177,6 @@ void nautilus_window_set_active_pane (Nautil
NautilusWindowPane *new_pane);
NautilusWindowPane * nautilus_window_get_active_pane (NautilusWindow *window);
gboolean nautilus_add_bookmark_to_history_list (NautilusBookmark *bookmark);
void nautilus_window_bookmarks_preference_changed_callback (gpointer user_data);
/* sync window GUI with current slot. Used when changing slots,
* and when updating the slot state.
......@@ -207,16 +196,8 @@ void nautilus_window_remove_bookmarks_menu_callback (Nautil
void nautilus_window_remove_bookmarks_menu_items (NautilusWindow *window);
void nautilus_window_update_show_hide_menu_items (NautilusWindow *window);
void nautilus_window_update_spatial_menu_item (NautilusWindow *window);
/* window toolbar */
void nautilus_window_activate_spinner (NautilusWindow *window);
void nautilus_window_initialize_toolbars (NautilusWindow *window);
void nautilus_window_load_extension_toolbar_items (NautilusWindow *window);
void nautilus_window_set_spinner_active (NautilusWindow *window,
gboolean active);
void nautilus_window_go_back (NautilusWindow *window);
void nautilus_window_go_forward (NautilusWindow *window);
void nautilus_window_close_pane (NautilusWindowPane *pane);
void nautilus_window_update_split_view_actions_sensitivity (NautilusWindow *window);
......
......@@ -1933,6 +1933,40 @@ nautilus_window_state_event (GtkWidget *widget,
return FALSE;
}
static void
nautilus_window_go_back (NautilusWindow *window)
{
nautilus_window_back_or_forward (window, TRUE, 0, FALSE);
}
static void
nautilus_window_go_forward (NautilusWindow *window)
{
nautilus_window_back_or_forward (window, FALSE, 0, FALSE);
}
void
nautilus_window_allow_back (NautilusWindow *window, gboolean allow)
{
GtkAction *action;
action = gtk_action_group_get_action (nautilus_navigation_state_get_master (window->details->nav_state),
NAUTILUS_ACTION_BACK);
gtk_action_set_sensitive (action, allow);
}
void
nautilus_window_allow_forward (NautilusWindow *window, gboolean allow)
{
GtkAction *action;
action = gtk_action_group_get_action (nautilus_navigation_state_get_master (window->details->nav_state),
NAUTILUS_ACTION_FORWARD);
gtk_action_set_sensitive (action, allow);
}
static gboolean
nautilus_window_button_press_event (GtkWidget *widget,
GdkEventButton *event)
......@@ -2009,40 +2043,6 @@ nautilus_window_restore_focus_widget (NautilusWindow *window)
* Main API
*/
void
nautilus_window_go_back (NautilusWindow *window)
{
nautilus_window_back_or_forward (window, TRUE, 0, FALSE);
}
void
nautilus_window_go_forward (NautilusWindow *window)
{
nautilus_window_back_or_forward (window, FALSE, 0, FALSE);
}
void
nautilus_window_allow_back (NautilusWindow *window, gboolean allow)
{
GtkAction *action;
action = gtk_action_group_get_action (nautilus_navigation_state_get_master (window->details->nav_state),
NAUTILUS_ACTION_BACK);
gtk_action_set_sensitive (action, allow);
}
void
nautilus_window_allow_forward (NautilusWindow *window, gboolean allow)
{
GtkAction *action;
action = gtk_action_group_get_action (nautilus_navigation_state_get_master (window->details->nav_state),
NAUTILUS_ACTION_FORWARD);
gtk_action_set_sensitive (action, allow);
}
void
nautilus_window_show_search (NautilusWindow *window)
{
......@@ -2082,36 +2082,6 @@ nautilus_window_set_search_button (NautilusWindow *window,
g_object_set_data (G_OBJECT (action), "blocked", NULL);
}
/**
* nautilus_window_get_base_page_index:
* @window: Window to get index from
*
* Returns the index of the base page in the history list.
* Base page is not the currently displayed page, but the page
* that acts as the base from which the back and forward commands
* navigate from.
*/
gint
nautilus_window_get_base_page_index (NautilusWindow *window)
{
NautilusWindowSlot *slot;
gint forward_count;
slot = window->details->active_pane->active_slot;
forward_count = g_list_length (slot->forward_list);
/* If forward is empty, the base it at the top of the list */
if (forward_count == 0) {
return 0;
}
/* The forward count indicate the relative postion of the base page
* in the history list
*/
return forward_count;
}
static void
nautilus_window_init (NautilusWindow *window)
{
......
......@@ -93,20 +93,7 @@ typedef struct {
NautilusIconInfo * (* get_icon) (NautilusWindow *window,
NautilusWindowSlot *slot);
void (* sync_allow_stop) (NautilusWindow *window,
NautilusWindowSlot *slot);
void (* set_allow_up) (NautilusWindow *window, gboolean allow);
void (* prompt_for_location) (NautilusWindow *window, const char *initial);
void (* get_min_size) (NautilusWindow *window, guint *default_width, guint *default_height);
void (* get_default_size) (NautilusWindow *window, guint *default_width, guint *default_height);
void (* close) (NautilusWindow *window);
NautilusWindowSlot * (* open_slot) (NautilusWindowPane *pane,
NautilusWindowOpenSlotFlags flags);
void (* close_slot) (NautilusWindowPane *pane,
NautilusWindowSlot *slot);
void (* set_active_slot) (NautilusWindowPane *pane,
NautilusWindowSlot *slot);
/* Signals used only for keybindings */
gboolean (* go_up) (NautilusWindow *window,
......@@ -170,7 +157,6 @@ void nautilus_window_allow_forward (NautilusWindow *window,
void nautilus_window_clear_back_list (NautilusWindow *window);
void nautilus_window_clear_forward_list (NautilusWindow *window);
void nautilus_forget_history (void);
gint nautilus_window_get_base_page_index (NautilusWindow *window);
void nautilus_window_hide_sidebar (NautilusWindow *window);
void nautilus_window_show_sidebar (NautilusWindow *window);
void nautilus_window_back_or_forward (NautilusWindow *window,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment