1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ |
---|
2 | |
---|
3 | /* |
---|
4 | * Nautilus |
---|
5 | * |
---|
6 | * Copyright (C) 1999, 2000 Red Hat, Inc. |
---|
7 | * Copyright (C) 1999, 2000, 2001 Eazel, Inc. |
---|
8 | * |
---|
9 | * Nautilus is free software; you can redistribute it and/or |
---|
10 | * modify it under the terms of the GNU General Public License as |
---|
11 | * published by the Free Software Foundation; either version 2 of the |
---|
12 | * License, or (at your option) any later version. |
---|
13 | * |
---|
14 | * Nautilus is distributed in the hope that it will be useful, |
---|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
17 | * General Public License for more details. |
---|
18 | * |
---|
19 | * You should have received a copy of the GNU General Public License |
---|
20 | * along with this program; if not, write to the Free Software |
---|
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
22 | * |
---|
23 | * Authors: Elliot Lee <sopwith@redhat.com> |
---|
24 | * Darin Adler <darin@bentspoon.com> |
---|
25 | * |
---|
26 | */ |
---|
27 | |
---|
28 | #ifndef NAUTILUS_WINDOW_PRIVATE_H |
---|
29 | #define NAUTILUS_WINDOW_PRIVATE_H |
---|
30 | |
---|
31 | #include "nautilus-window.h" |
---|
32 | #include <bonobo/bonobo-ui-component.h> |
---|
33 | #include <bonobo/bonobo-ui-container.h> |
---|
34 | #include <bonobo/bonobo-ui-toolbar-button-item.h> |
---|
35 | #include <libnautilus-private/nautilus-directory.h> |
---|
36 | |
---|
37 | typedef enum { |
---|
38 | NAUTILUS_LOCATION_CHANGE_STANDARD, |
---|
39 | NAUTILUS_LOCATION_CHANGE_BACK, |
---|
40 | NAUTILUS_LOCATION_CHANGE_FORWARD, |
---|
41 | NAUTILUS_LOCATION_CHANGE_RELOAD, |
---|
42 | NAUTILUS_LOCATION_CHANGE_REDIRECT |
---|
43 | } NautilusLocationChangeType; |
---|
44 | |
---|
45 | /* FIXME bugzilla.gnome.org 42575: Migrate more fields into here. */ |
---|
46 | struct NautilusWindowDetails |
---|
47 | { |
---|
48 | /* Bonobo. */ |
---|
49 | BonoboUIContainer *ui_container; |
---|
50 | BonoboUIComponent *shell_ui; |
---|
51 | BonoboUIComponent *status_ui; |
---|
52 | gboolean updating_bonobo_state; |
---|
53 | |
---|
54 | int ui_change_depth; |
---|
55 | guint ui_idle_id; |
---|
56 | gboolean ui_is_frozen; |
---|
57 | gboolean ui_pending_initialize_menus_part_2; |
---|
58 | |
---|
59 | /* Menus. */ |
---|
60 | guint refresh_bookmarks_menu_idle_id; |
---|
61 | guint refresh_go_menu_idle_id; |
---|
62 | |
---|
63 | /* Toolbar. */ |
---|
64 | GtkTooltips *tooltips; |
---|
65 | BonoboUIToolbarItem *back_button_item; |
---|
66 | BonoboUIToolbarItem *forward_button_item; |
---|
67 | |
---|
68 | /* Current location. */ |
---|
69 | char *location; |
---|
70 | GList *selection; |
---|
71 | char *title; |
---|
72 | NautilusFile *viewed_file; |
---|
73 | gboolean viewed_file_seen; |
---|
74 | |
---|
75 | /* New location. */ |
---|
76 | NautilusLocationChangeType location_change_type; |
---|
77 | guint location_change_distance; |
---|
78 | char *pending_location; |
---|
79 | GList *pending_selection; |
---|
80 | NautilusDetermineViewHandle *determine_view_handle; |
---|
81 | |
---|
82 | /* View As choices */ |
---|
83 | GList *short_list_viewers; |
---|
84 | NautilusViewIdentifier *extra_viewer; |
---|
85 | |
---|
86 | /* Throbber. */ |
---|
87 | gboolean throbber_active; |
---|
88 | gboolean throbber_activating; |
---|
89 | Bonobo_PropertyBag throbber_property_bag; |
---|
90 | |
---|
91 | /* Deferred location change. */ |
---|
92 | char *location_to_change_to_at_idle; |
---|
93 | guint location_change_at_idle_id; |
---|
94 | |
---|
95 | /* Location bar */ |
---|
96 | gboolean temporary_navigation_bar; |
---|
97 | |
---|
98 | /* Side Pane */ |
---|
99 | int side_pane_width; |
---|
100 | GtkWidget *current_side_panel; |
---|
101 | }; |
---|
102 | |
---|
103 | #define NAUTILUS_MENU_PATH_BACK_ITEM "/menu/Go/Back" |
---|
104 | #define NAUTILUS_MENU_PATH_FORWARD_ITEM "/menu/Go/Forward" |
---|
105 | #define NAUTILUS_MENU_PATH_UP_ITEM "/menu/Go/Up" |
---|
106 | |
---|
107 | #define NAUTILUS_MENU_PATH_RELOAD_ITEM "/menu/View/Reload" |
---|
108 | #define NAUTILUS_MENU_PATH_ZOOM_IN_ITEM "/menu/View/Zoom Items Placeholder/Zoom In" |
---|
109 | #define NAUTILUS_MENU_PATH_ZOOM_OUT_ITEM "/menu/View/Zoom Items Placeholder/Zoom Out" |
---|
110 | #define NAUTILUS_MENU_PATH_ZOOM_NORMAL_ITEM "/menu/View/Zoom Items Placeholder/Zoom Normal" |
---|
111 | |
---|
112 | #define NAUTILUS_COMMAND_BACK "/commands/Back" |
---|
113 | #define NAUTILUS_COMMAND_FORWARD "/commands/Forward" |
---|
114 | #define NAUTILUS_COMMAND_UP "/commands/Up" |
---|
115 | |
---|
116 | #define NAUTILUS_COMMAND_RELOAD "/commands/Reload" |
---|
117 | #define NAUTILUS_COMMAND_STOP "/commands/Stop" |
---|
118 | #define NAUTILUS_COMMAND_ZOOM_IN "/commands/Zoom In" |
---|
119 | #define NAUTILUS_COMMAND_ZOOM_OUT "/commands/Zoom Out" |
---|
120 | #define NAUTILUS_COMMAND_ZOOM_NORMAL "/commands/Zoom Normal" |
---|
121 | |
---|
122 | /* window geometry */ |
---|
123 | /* These are very small, and a Nautilus window at this tiny size is *almost* |
---|
124 | * completely unusable. However, if all the extra bits (sidebar, location bar, etc) |
---|
125 | * are turned off, you can see an icon or two at this size. See bug 5946. |
---|
126 | */ |
---|
127 | #define NAUTILUS_WINDOW_MIN_WIDTH 200 |
---|
128 | #define NAUTILUS_WINDOW_MIN_HEIGHT 200 |
---|
129 | |
---|
130 | #define NAUTILUS_WINDOW_DEFAULT_WIDTH 800 |
---|
131 | #define NAUTILUS_WINDOW_DEFAULT_HEIGHT 550 |
---|
132 | |
---|
133 | void nautilus_window_set_status (NautilusWindow *window, |
---|
134 | const char *status); |
---|
135 | void nautilus_window_load_view_as_menus (NautilusWindow *window); |
---|
136 | void nautilus_window_synch_view_as_menus (NautilusWindow *window); |
---|
137 | void nautilus_window_initialize_menus_part_1 (NautilusWindow *window); |
---|
138 | void nautilus_window_initialize_menus_part_2 (NautilusWindow *window); |
---|
139 | void nautilus_window_initialize_toolbars (NautilusWindow *window); |
---|
140 | void nautilus_window_activate_throbber (NautilusWindow *window); |
---|
141 | void nautilus_window_handle_ui_event_callback (BonoboUIComponent *ui, |
---|
142 | const char *id, |
---|
143 | Bonobo_UIComponent_EventType type, |
---|
144 | const char *state, |
---|
145 | NautilusWindow *window); |
---|
146 | void nautilus_window_go_back (NautilusWindow *window); |
---|
147 | void nautilus_window_go_forward (NautilusWindow *window); |
---|
148 | void nautilus_window_go_up (NautilusWindow *window); |
---|
149 | void nautilus_window_update_find_menu_item (NautilusWindow *window); |
---|
150 | void nautilus_window_remove_bookmarks_menu_callback (NautilusWindow *window); |
---|
151 | void nautilus_window_remove_go_menu_callback (NautilusWindow *window); |
---|
152 | void nautilus_window_remove_bookmarks_menu_items (NautilusWindow *window); |
---|
153 | void nautilus_window_remove_go_menu_items (NautilusWindow *window); |
---|
154 | void nautilus_window_update_show_hide_menu_items (NautilusWindow *window); |
---|
155 | void nautilus_window_zoom_in (NautilusWindow *window); |
---|
156 | void nautilus_window_zoom_out (NautilusWindow *window); |
---|
157 | void nautilus_window_zoom_to_level (NautilusWindow *window, |
---|
158 | float level); |
---|
159 | void nautilus_window_zoom_to_fit (NautilusWindow *window); |
---|
160 | void nautilus_window_show_view_as_dialog (NautilusWindow *window); |
---|
161 | void nautilus_window_set_content_view_widget (NautilusWindow *window, |
---|
162 | NautilusViewFrame *content_view); |
---|
163 | void nautilus_window_add_sidebar_panel (NautilusWindow *window, |
---|
164 | NautilusViewFrame *sidebar_panel); |
---|
165 | void nautilus_window_remove_sidebar_panel (NautilusWindow *window, |
---|
166 | NautilusViewFrame *sidebar_panel); |
---|
167 | Bonobo_UIContainer nautilus_window_get_ui_container (NautilusWindow *window); |
---|
168 | void nautilus_window_set_viewed_file (NautilusWindow *window, |
---|
169 | NautilusFile *file); |
---|
170 | void nautilus_send_history_list_changed (void); |
---|
171 | void nautilus_window_add_current_location_to_history_list (NautilusWindow *window); |
---|
172 | void nautilus_remove_from_history_list_no_notify (const char *location); |
---|
173 | GList * nautilus_get_history_list (void); |
---|
174 | void nautilus_window_bookmarks_preference_changed_callback (gpointer user_data); |
---|
175 | void nautilus_window_update_icon (NautilusWindow *window); |
---|
176 | |
---|
177 | #endif /* NAUTILUS_WINDOW_PRIVATE_H */ |
---|