summaryrefslogtreecommitdiff
path: root/src/nautilus-window-private.h
blob: 93f4aac99fffb546da1f784fa546a6499f94a5cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */

/*
 *  Nautilus
 *
 *  Copyright (C) 1999, 2000 Red Hat, Inc.
 *  Copyright (C) 1999, 2000 Eazel, Inc.
 *
 *  Nautilus is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License as
 *  published by the Free Software Foundation; either version 2 of the
 *  License, or (at your option) any later version.
 *
 *  Nautilus is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *  Author: Elliot Lee <sopwith@redhat.com>
 *
 */

#ifndef NAUTILUS_WINDOW_PRIVATE_H
#define NAUTILUS_WINDOW_PRIVATE_H

#include "nautilus-window.h"
#include <libnautilus/libnautilus.h>
#include <libnautilus-extensions/nautilus-undo-manager.h>
#include <gtk/gtk.h>

typedef enum {
        CV_PROGRESS_INITIAL = 1,
        CV_PROGRESS_DONE,
        CV_PROGRESS_ERROR,
        VIEW_ERROR,
        RESET_TO_IDLE, /* Not a real item - a command */
        NAVINFO_RECEIVED,
        NEW_CONTENT_VIEW_ACTIVATED,
} NautilusWindowStateItem;

/* FIXME bugzilla.eazel.com 2575: Need to migrate window fields into here. */
struct NautilusWindowDetails
{
	guint refresh_bookmarks_menu_idle_id;
	guint refresh_go_menu_idle_id;

        /* Current location. */
        char *title;
	NautilusFile *viewed_file;

        /* Error handling. */
	char *dead_view_name;
};

#define NAUTILUS_MENU_PATH_BACK_ITEM			"/Go/Back"
#define NAUTILUS_MENU_PATH_FORWARD_ITEM			"/Go/Forward"
#define NAUTILUS_MENU_PATH_UP_ITEM			"/Go/Up"

#define NAUTILUS_MENU_PATH_RELOAD_ITEM			"/View/Reload"
#define NAUTILUS_MENU_PATH_ZOOM_IN_ITEM			"/View/Zoom In"
#define NAUTILUS_MENU_PATH_ZOOM_OUT_ITEM		"/View/Zoom Out"
#define NAUTILUS_MENU_PATH_ZOOM_NORMAL_ITEM		"/View/Zoom Normal"

/* FIXME bugzilla.eazel.com 2663: Would be nice to share more command information
 * between menus and toolbars than just these hint strings.
 */
#define NAUTILUS_HINT_BACK				N_("Go to the previous visited location")
#define NAUTILUS_HINT_FORWARD				N_("Go to the next visited location")
#define NAUTILUS_HINT_UP				N_("Go to the location that contains this one")
#define NAUTILUS_HINT_REFRESH				N_("Display the latest contents of the current location")
#define NAUTILUS_HINT_HOME				N_("Go to the home location")
#define NAUTILUS_HINT_FIND				N_("Search this computer for files")
#define NAUTILUS_HINT_WEB_SEARCH			N_("Search the World Wide Web")
#define NAUTILUS_HINT_STOP				N_("Stop loading this location")
#define NAUTILUS_HINT_SERVICES				N_("Go to the Eazel services location")

/* window geometry */
#define NAUTILUS_WINDOW_MIN_WIDTH			450
#define NAUTILUS_WINDOW_MIN_HEIGHT			350

#define NAUTILUS_WINDOW_DEFAULT_WIDTH			700
#define NAUTILUS_WINDOW_DEFAULT_HEIGHT			550

void                 nautilus_window_set_status                        (NautilusWindow             *window,
                                                                        const char                 *status);
void                 nautilus_window_back_or_forward                   (NautilusWindow             *window,
                                                                        gboolean                    back,
                                                                        guint                       distance);
void                 nautilus_window_load_content_view_menu            (NautilusWindow             *window);
void                 nautilus_window_synch_content_view_menu           (NautilusWindow             *window);
void                 nautilus_window_connect_view                      (NautilusWindow             *window,
                                                                        NautilusViewFrame          *view);
void                 nautilus_window_disconnect_view                   (NautilusWindow             *window,
                                                                        NautilusViewFrame          *view);
void                 nautilus_window_view_failed                       (NautilusWindow             *window,
                                                                        NautilusViewFrame          *view);
void                 nautilus_send_history_list_changed                (void);
void                 nautilus_add_to_history_list                      (NautilusBookmark           *bookmark);
GList *              nautilus_get_history_list                         (void);
void                 nautilus_window_add_bookmark_for_current_location (NautilusWindow             *window);
void                 nautilus_window_initialize_menus                  (NautilusWindow             *window);
void                 nautilus_window_initialize_toolbars               (NautilusWindow             *window);
void                 nautilus_window_go_back                           (NautilusWindow             *window);
void                 nautilus_window_go_forward                        (NautilusWindow             *window);
void                 nautilus_window_go_up                             (NautilusWindow             *window);
void                 nautilus_window_update_find_menu_item             (NautilusWindow             *window);
void                 nautilus_window_toolbar_remove_theme_callback     (NautilusWindow             *window);
NautilusUndoManager *nautilus_window_get_undo_manager                  (NautilusWindow             *window);
void                 nautilus_window_begin_location_change             (NautilusWindow             *window,
                                                                        const char                 *location,
                                                                        NautilusLocationChangeType  type,
                                                                        guint                       distance);
void                 nautilus_window_remove_bookmarks_menu_callback    (NautilusWindow             *window);
void                 nautilus_window_remove_go_menu_callback           (NautilusWindow             *window);
void                 nautilus_window_remove_bookmarks_menu_items       (NautilusWindow             *window);
void                 nautilus_window_remove_go_menu_items              (NautilusWindow             *window);
void                 nautilus_window_update_show_hide_menu_items       (NautilusWindow             *window);
void                 nautilus_window_zoom_in                           (NautilusWindow             *window);
void                 nautilus_window_zoom_out                          (NautilusWindow             *window);
void                 nautilus_window_zoom_to_level                     (NautilusWindow             *window,
                                                                        double                      level);
void                 nautilus_window_zoom_to_fit                       (NautilusWindow             *window);
void                 nautilus_window_set_content_view_widget           (NautilusWindow             *window,
                                                                        NautilusViewFrame          *content_view);
void                 nautilus_window_add_sidebar_panel                 (NautilusWindow             *window,
                                                                        NautilusViewFrame          *sidebar_panel);
void                 nautilus_window_remove_sidebar_panel              (NautilusWindow             *window,
                                                                        NautilusViewFrame          *sidebar_panel);

#endif /* NAUTILUS_WINDOW_PRIVATE_H */