Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GNOME
Files
Commits
4e06f3a8
Commit
4e06f3a8
authored
Dec 17, 1999
by
John Sullivan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed evil // comments I added earlier; Added beginnings of Bookmarks menu.
parent
8ebbd3a6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
305 additions
and
138 deletions
+305
-138
ChangeLog-20000414
ChangeLog-20000414
+9
-0
src/file-manager/fm-directory-view.c
src/file-manager/fm-directory-view.c
+3
-2
src/nautilus-main.c
src/nautilus-main.c
+4
-3
src/nautilus-navigation-window.c
src/nautilus-navigation-window.c
+57
-26
src/nautilus-object-window.c
src/nautilus-object-window.c
+57
-26
src/nautilus-spatial-window.c
src/nautilus-spatial-window.c
+57
-26
src/nautilus-window.c
src/nautilus-window.c
+57
-26
src/ntl-main.c
src/ntl-main.c
+4
-3
src/ntl-window.c
src/ntl-window.c
+57
-26
No files found.
ChangeLog-20000414
View file @
4e06f3a8
1999-12-16 John Sullivan <sullivan@eazel.com>
* src/ntl-window.c:
* src/ntl-main.c:
* src/file-manager/fm-directory-view.c:
Changed evil // comments to /* */. Sorry about that!
* src/ntl-window.c: added insensitive rudimentary Bookmark menu
1999-12-16 Havoc Pennington <hp@redhat.com>
1999-12-16 Havoc Pennington <hp@redhat.com>
* src/ntl-window-state.c (nautilus_window_save_state): lookup
* src/ntl-window-state.c (nautilus_window_save_state): lookup
...
...
src/file-manager/fm-directory-view.c
View file @
4e06f3a8
...
@@ -735,8 +735,9 @@ directory_load_cb (GnomeVFSAsyncHandle *handle,
...
@@ -735,8 +735,9 @@ directory_load_cb (GnomeVFSAsyncHandle *handle,
view
=
FM_DIRECTORY_VIEW
(
callback_data
);
view
=
FM_DIRECTORY_VIEW
(
callback_data
);
// FIXME: This should be an assert, changed to a warning for now
/* FIXME: This should be an assert, changed to a warning for now
// so we can continue developing other features until this is resolved.
* so we can continue developing other features until this is resolved.
*/
if
(
!
view
->
directory_list
||
view
->
directory_list
==
list
)
{
if
(
!
view
->
directory_list
||
view
->
directory_list
==
list
)
{
g_warning
(
"unexpected view->directory_list!"
);
g_warning
(
"unexpected view->directory_list!"
);
}
}
...
...
src/nautilus-main.c
View file @
4e06f3a8
...
@@ -67,9 +67,10 @@ int main(int argc, char *argv[])
...
@@ -67,9 +67,10 @@ int main(int argc, char *argv[])
GtkWidget
*
mainwin
;
GtkWidget
*
mainwin
;
GnomeGenericFactory
*
gfact
;
GnomeGenericFactory
*
gfact
;
// FIXME: This should also include G_LOG_LEVEL_WARNING, but I had to take it
/* FIXME: This should also include G_LOG_LEVEL_WARNING, but I had to take it
// out temporarily so we could continue to work on other parts of the software
* out temporarily so we could continue to work on other parts of the software
// until the only-one-icon-shows-up problem is fixed
* until the only-one-icon-shows-up problem is fixed
*/
if
(
getenv
(
"NAUTILUS_DEBUG"
))
if
(
getenv
(
"NAUTILUS_DEBUG"
))
g_log_set_always_fatal
(
G_LOG_FATAL_MASK
|
G_LOG_LEVEL_CRITICAL
);
g_log_set_always_fatal
(
G_LOG_FATAL_MASK
|
G_LOG_LEVEL_CRITICAL
);
...
...
src/nautilus-navigation-window.c
View file @
4e06f3a8
...
@@ -166,8 +166,9 @@ static GnomeUIInfo file_menu_info[] = {
...
@@ -166,8 +166,9 @@ static GnomeUIInfo file_menu_info[] = {
GNOMEUIINFO_END
GNOMEUIINFO_END
};
};
// FIXME: These all need implementation, though we might end up doing that
/* FIXME: These all need implementation, though we might end up doing that
// separately for each content view (and merging with the insensitive items here)
* separately for each content view (and merging with the insensitive items here)
*/
static
GnomeUIInfo
edit_menu_info
[]
=
{
static
GnomeUIInfo
edit_menu_info
[]
=
{
GNOMEUIINFO_MENU_UNDO_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_UNDO_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_SEPARATOR
,
GNOMEUIINFO_SEPARATOR
,
...
@@ -176,7 +177,7 @@ static GnomeUIInfo edit_menu_info[] = {
...
@@ -176,7 +177,7 @@ static GnomeUIInfo edit_menu_info[] = {
GNOMEUIINFO_MENU_PASTE_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_PASTE_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_CLEAR_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_CLEAR_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_SEPARATOR
,
GNOMEUIINFO_SEPARATOR
,
/
/
Didn't use standard SELECT_ALL_ITEM 'cuz it didn't have accelerator
/
*
Didn't use standard SELECT_ALL_ITEM 'cuz it didn't have accelerator
*/
{
{
GNOME_APP_UI_ITEM
,
GNOME_APP_UI_ITEM
,
N_
(
"Select All"
),
NULL
,
N_
(
"Select All"
),
NULL
,
...
@@ -187,7 +188,27 @@ static GnomeUIInfo edit_menu_info[] = {
...
@@ -187,7 +188,27 @@ static GnomeUIInfo edit_menu_info[] = {
GNOMEUIINFO_END
GNOMEUIINFO_END
};
};
// FIXME: This needs implementation.
/* FIXME: This needs implementation. */
static
GnomeUIInfo
bookmarks_menu_info
[]
=
{
{
GNOME_APP_UI_ITEM
,
N_
(
"Add Bookmark"
),
N_
(
"Create a new bookmark for the current location"
),
NULL
,
NULL
,
NULL
,
GNOME_APP_PIXMAP_NONE
,
NULL
,
0
,
0
,
NULL
},
{
GNOME_APP_UI_ITEM
,
N_
(
"Edit Bookmarks..."
),
N_
(
"Open the bookmark-editing window"
),
NULL
,
NULL
,
NULL
,
GNOME_APP_PIXMAP_NONE
,
NULL
,
0
,
0
,
NULL
},
GNOMEUIINFO_SEPARATOR
,
GNOMEUIINFO_END
};
/* FIXME: This needs implementation. */
static
GnomeUIInfo
help_menu_info
[]
=
{
static
GnomeUIInfo
help_menu_info
[]
=
{
{
{
GNOME_APP_UI_ITEM
,
GNOME_APP_UI_ITEM
,
...
@@ -202,6 +223,7 @@ static GnomeUIInfo help_menu_info[] = {
...
@@ -202,6 +223,7 @@ static GnomeUIInfo help_menu_info[] = {
static
GnomeUIInfo
main_menu
[]
=
{
static
GnomeUIInfo
main_menu
[]
=
{
GNOMEUIINFO_MENU_FILE_TREE
(
file_menu_info
),
GNOMEUIINFO_MENU_FILE_TREE
(
file_menu_info
),
GNOMEUIINFO_MENU_EDIT_TREE
(
edit_menu_info
),
GNOMEUIINFO_MENU_EDIT_TREE
(
edit_menu_info
),
GNOMEUIINFO_SUBTREE
(
N_
(
"_Bookmarks"
),
bookmarks_menu_info
),
GNOMEUIINFO_MENU_HELP_TREE
(
help_menu_info
),
GNOMEUIINFO_MENU_HELP_TREE
(
help_menu_info
),
GNOMEUIINFO_END
GNOMEUIINFO_END
};
};
...
@@ -389,36 +411,40 @@ nautilus_window_constructed(NautilusWindow *window)
...
@@ -389,36 +411,40 @@ nautilus_window_constructed(NautilusWindow *window)
app
=
GNOME_APP
(
window
);
app
=
GNOME_APP
(
window
);
/
/
set up menu bar
/
*
set up menu bar
*/
gnome_app_create_menus_with_data
(
app
,
main_menu
,
window
);
gnome_app_create_menus_with_data
(
app
,
main_menu
,
window
);
// desensitize the items that haven't yet been implemented
/* desensitize the items that haven't yet been implemented
// FIXME: these all need to be implemented. I'm using hardwired numbers
* FIXME: these all need to be implemented. I'm using hardwired numbers
// rather than enum symbols here just 'cuz the enums aren't needed (I think)
* rather than enum symbols here just 'cuz the enums aren't needed (I think)
// once we've implemented things. If it turns out they are, we'll define 'em.
* once we've implemented things. If it turns out they are, we'll define 'em.
// gtk_widget_set_sensitive(file_menu_info[0].widget, FALSE); // New Window
*/
gtk_widget_set_sensitive
(
edit_menu_info
[
0
].
widget
,
FALSE
);
/* Undo */
gtk_widget_set_sensitive
(
edit_menu_info
[
2
].
widget
,
FALSE
);
/* Cut */
gtk_widget_set_sensitive
(
edit_menu_info
[
3
].
widget
,
FALSE
);
/* Copy */
gtk_widget_set_sensitive
(
edit_menu_info
[
4
].
widget
,
FALSE
);
/* Paste */
gtk_widget_set_sensitive
(
edit_menu_info
[
5
].
widget
,
FALSE
);
/* Clear */
gtk_widget_set_sensitive
(
edit_menu_info
[
7
].
widget
,
FALSE
);
/* Select All */
gtk_widget_set_sensitive
(
edit_menu_info
[
0
].
widget
,
FALSE
);
// Undo
gtk_widget_set_sensitive
(
bookmarks_menu_info
[
0
].
widget
,
FALSE
);
/* Add Bookmark */
gtk_widget_set_sensitive
(
edit_menu_info
[
2
].
widget
,
FALSE
);
// Cut
gtk_widget_set_sensitive
(
bookmarks_menu_info
[
1
].
widget
,
FALSE
);
/* Edit Bookmarks */
gtk_widget_set_sensitive
(
edit_menu_info
[
3
].
widget
,
FALSE
);
// Copy
gtk_widget_set_sensitive
(
edit_menu_info
[
4
].
widget
,
FALSE
);
// Paste
gtk_widget_set_sensitive
(
edit_menu_info
[
5
].
widget
,
FALSE
);
// Clear
gtk_widget_set_sensitive
(
edit_menu_info
[
7
].
widget
,
FALSE
);
// Select All
gtk_widget_set_sensitive
(
help_menu_info
[
0
].
widget
,
FALSE
);
/
/
About
gtk_widget_set_sensitive
(
help_menu_info
[
0
].
widget
,
FALSE
);
/
*
About
*/
/
/
set up toolbar
/
*
set up toolbar
*/
gnome_app_create_toolbar_with_data
(
app
,
toolbar_info
,
window
);
gnome_app_create_toolbar_with_data
(
app
,
toolbar_info
,
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
;
/
/
set up location bar
/
*
set up location bar
*/
window
->
option_cvtype
=
gtk_option_menu_new
();
window
->
option_cvtype
=
gtk_option_menu_new
();
window
->
menu_cvtype
=
gtk_menu_new
();
window
->
menu_cvtype
=
gtk_menu_new
();
// FIXME: Add in placeholder item for now; rework this when we get the right views showing up.
/* FIXME: Add in placeholder item for now; rework this when we get the right views showing up.
// Since menu doesn't yet work, make it insensitive.
* Since menu doesn't yet work, make it insensitive.
*/
gtk_container_add
(
GTK_CONTAINER
(
window
->
menu_cvtype
),
gtk_container_add
(
GTK_CONTAINER
(
window
->
menu_cvtype
),
gtk_menu_item_new_with_label
(
_
(
"View as (placeholder)"
)));
gtk_menu_item_new_with_label
(
_
(
"View as (placeholder)"
)));
gtk_widget_set_sensitive
(
window
->
option_cvtype
,
FALSE
);
gtk_widget_set_sensitive
(
window
->
option_cvtype
,
FALSE
);
...
@@ -441,9 +467,10 @@ nautilus_window_constructed(NautilusWindow *window)
...
@@ -441,9 +467,10 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_widget_show
(
window
->
option_cvtype
);
gtk_widget_show
(
window
->
option_cvtype
);
gtk_widget_show_all
(
location_bar_box
);
gtk_widget_show_all
(
location_bar_box
);
// For mysterious reasons, connecting these signals before laying out the menu
/* For mysterious reasons, connecting these signals before laying out the menu
// and option menu ends up making the option menu not know how to size itself (i.e,
* and option menu ends up making the option menu not know how to size itself (i.e,
// it is zero-width unless you turn on expand and fill). So we do it here afterwards.
* it is zero-width unless you turn on expand and fill). So we do it here afterwards.
*/
gtk_signal_connect_while_alive
(
GTK_OBJECT
(
window
->
menu_cvtype
),
"add"
,
gtk_signal_connect_while_alive
(
GTK_OBJECT
(
window
->
menu_cvtype
),
"add"
,
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_OBJECT
(
window
->
option_cvtype
));
GTK_OBJECT
(
window
->
option_cvtype
));
...
@@ -451,15 +478,19 @@ nautilus_window_constructed(NautilusWindow *window)
...
@@ -451,15 +478,19 @@ nautilus_window_constructed(NautilusWindow *window)
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_OBJECT
(
window
->
option_cvtype
));
GTK_OBJECT
(
window
->
option_cvtype
));
/
/
set up status bar
/
*
set up status bar
*/
/* FIXME: The text in the statusbar is jammed up against the left edge of the frame.
* This looks ugly, but appears to be "standard appearance" in GTK.
* I haven't found a good workaround yet.
*/
gnome_app_set_statusbar
(
app
,
(
statusbar
=
gtk_statusbar_new
()));
gnome_app_set_statusbar
(
app
,
(
statusbar
=
gtk_statusbar_new
()));
window
->
statusbar_ctx
=
gtk_statusbar_get_context_id
(
GTK_STATUSBAR
(
statusbar
),
"IhateGtkStatusbar"
);
window
->
statusbar_ctx
=
gtk_statusbar_get_context_id
(
GTK_STATUSBAR
(
statusbar
),
"IhateGtkStatusbar"
);
gnome_app_install_menu_hints
(
app
,
main_menu
);
/* This has to go here
gnome_app_install_menu_hints
(
app
,
main_menu
);
/* This has to go here
after the statusbar
after the statusbar
creation */
creation */
/
/
set up window contents and policy
/
*
set up window contents and policy
*/
gtk_window_set_policy
(
GTK_WINDOW
(
window
),
FALSE
,
TRUE
,
FALSE
);
gtk_window_set_policy
(
GTK_WINDOW
(
window
),
FALSE
,
TRUE
,
FALSE
);
gtk_window_set_default_size
(
GTK_WINDOW
(
window
),
650
,
400
);
gtk_window_set_default_size
(
GTK_WINDOW
(
window
),
650
,
400
);
...
...
src/nautilus-object-window.c
View file @
4e06f3a8
...
@@ -166,8 +166,9 @@ static GnomeUIInfo file_menu_info[] = {
...
@@ -166,8 +166,9 @@ static GnomeUIInfo file_menu_info[] = {
GNOMEUIINFO_END
GNOMEUIINFO_END
};
};
// FIXME: These all need implementation, though we might end up doing that
/* FIXME: These all need implementation, though we might end up doing that
// separately for each content view (and merging with the insensitive items here)
* separately for each content view (and merging with the insensitive items here)
*/
static
GnomeUIInfo
edit_menu_info
[]
=
{
static
GnomeUIInfo
edit_menu_info
[]
=
{
GNOMEUIINFO_MENU_UNDO_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_UNDO_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_SEPARATOR
,
GNOMEUIINFO_SEPARATOR
,
...
@@ -176,7 +177,7 @@ static GnomeUIInfo edit_menu_info[] = {
...
@@ -176,7 +177,7 @@ static GnomeUIInfo edit_menu_info[] = {
GNOMEUIINFO_MENU_PASTE_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_PASTE_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_CLEAR_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_CLEAR_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_SEPARATOR
,
GNOMEUIINFO_SEPARATOR
,
/
/
Didn't use standard SELECT_ALL_ITEM 'cuz it didn't have accelerator
/
*
Didn't use standard SELECT_ALL_ITEM 'cuz it didn't have accelerator
*/
{
{
GNOME_APP_UI_ITEM
,
GNOME_APP_UI_ITEM
,
N_
(
"Select All"
),
NULL
,
N_
(
"Select All"
),
NULL
,
...
@@ -187,7 +188,27 @@ static GnomeUIInfo edit_menu_info[] = {
...
@@ -187,7 +188,27 @@ static GnomeUIInfo edit_menu_info[] = {
GNOMEUIINFO_END
GNOMEUIINFO_END
};
};
// FIXME: This needs implementation.
/* FIXME: This needs implementation. */
static
GnomeUIInfo
bookmarks_menu_info
[]
=
{
{
GNOME_APP_UI_ITEM
,
N_
(
"Add Bookmark"
),
N_
(
"Create a new bookmark for the current location"
),
NULL
,
NULL
,
NULL
,
GNOME_APP_PIXMAP_NONE
,
NULL
,
0
,
0
,
NULL
},
{
GNOME_APP_UI_ITEM
,
N_
(
"Edit Bookmarks..."
),
N_
(
"Open the bookmark-editing window"
),
NULL
,
NULL
,
NULL
,
GNOME_APP_PIXMAP_NONE
,
NULL
,
0
,
0
,
NULL
},
GNOMEUIINFO_SEPARATOR
,
GNOMEUIINFO_END
};
/* FIXME: This needs implementation. */
static
GnomeUIInfo
help_menu_info
[]
=
{
static
GnomeUIInfo
help_menu_info
[]
=
{
{
{
GNOME_APP_UI_ITEM
,
GNOME_APP_UI_ITEM
,
...
@@ -202,6 +223,7 @@ static GnomeUIInfo help_menu_info[] = {
...
@@ -202,6 +223,7 @@ static GnomeUIInfo help_menu_info[] = {
static
GnomeUIInfo
main_menu
[]
=
{
static
GnomeUIInfo
main_menu
[]
=
{
GNOMEUIINFO_MENU_FILE_TREE
(
file_menu_info
),
GNOMEUIINFO_MENU_FILE_TREE
(
file_menu_info
),
GNOMEUIINFO_MENU_EDIT_TREE
(
edit_menu_info
),
GNOMEUIINFO_MENU_EDIT_TREE
(
edit_menu_info
),
GNOMEUIINFO_SUBTREE
(
N_
(
"_Bookmarks"
),
bookmarks_menu_info
),
GNOMEUIINFO_MENU_HELP_TREE
(
help_menu_info
),
GNOMEUIINFO_MENU_HELP_TREE
(
help_menu_info
),
GNOMEUIINFO_END
GNOMEUIINFO_END
};
};
...
@@ -389,36 +411,40 @@ nautilus_window_constructed(NautilusWindow *window)
...
@@ -389,36 +411,40 @@ nautilus_window_constructed(NautilusWindow *window)
app
=
GNOME_APP
(
window
);
app
=
GNOME_APP
(
window
);
/
/
set up menu bar
/
*
set up menu bar
*/
gnome_app_create_menus_with_data
(
app
,
main_menu
,
window
);
gnome_app_create_menus_with_data
(
app
,
main_menu
,
window
);
// desensitize the items that haven't yet been implemented
/* desensitize the items that haven't yet been implemented
// FIXME: these all need to be implemented. I'm using hardwired numbers
* FIXME: these all need to be implemented. I'm using hardwired numbers
// rather than enum symbols here just 'cuz the enums aren't needed (I think)
* rather than enum symbols here just 'cuz the enums aren't needed (I think)
// once we've implemented things. If it turns out they are, we'll define 'em.
* once we've implemented things. If it turns out they are, we'll define 'em.
// gtk_widget_set_sensitive(file_menu_info[0].widget, FALSE); // New Window
*/
gtk_widget_set_sensitive
(
edit_menu_info
[
0
].
widget
,
FALSE
);
/* Undo */
gtk_widget_set_sensitive
(
edit_menu_info
[
2
].
widget
,
FALSE
);
/* Cut */
gtk_widget_set_sensitive
(
edit_menu_info
[
3
].
widget
,
FALSE
);
/* Copy */
gtk_widget_set_sensitive
(
edit_menu_info
[
4
].
widget
,
FALSE
);
/* Paste */
gtk_widget_set_sensitive
(
edit_menu_info
[
5
].
widget
,
FALSE
);
/* Clear */
gtk_widget_set_sensitive
(
edit_menu_info
[
7
].
widget
,
FALSE
);
/* Select All */
gtk_widget_set_sensitive
(
edit_menu_info
[
0
].
widget
,
FALSE
);
// Undo
gtk_widget_set_sensitive
(
bookmarks_menu_info
[
0
].
widget
,
FALSE
);
/* Add Bookmark */
gtk_widget_set_sensitive
(
edit_menu_info
[
2
].
widget
,
FALSE
);
// Cut
gtk_widget_set_sensitive
(
bookmarks_menu_info
[
1
].
widget
,
FALSE
);
/* Edit Bookmarks */
gtk_widget_set_sensitive
(
edit_menu_info
[
3
].
widget
,
FALSE
);
// Copy
gtk_widget_set_sensitive
(
edit_menu_info
[
4
].
widget
,
FALSE
);
// Paste
gtk_widget_set_sensitive
(
edit_menu_info
[
5
].
widget
,
FALSE
);
// Clear
gtk_widget_set_sensitive
(
edit_menu_info
[
7
].
widget
,
FALSE
);
// Select All
gtk_widget_set_sensitive
(
help_menu_info
[
0
].
widget
,
FALSE
);
/
/
About
gtk_widget_set_sensitive
(
help_menu_info
[
0
].
widget
,
FALSE
);
/
*
About
*/
/
/
set up toolbar
/
*
set up toolbar
*/
gnome_app_create_toolbar_with_data
(
app
,
toolbar_info
,
window
);
gnome_app_create_toolbar_with_data
(
app
,
toolbar_info
,
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
;
/
/
set up location bar
/
*
set up location bar
*/
window
->
option_cvtype
=
gtk_option_menu_new
();
window
->
option_cvtype
=
gtk_option_menu_new
();
window
->
menu_cvtype
=
gtk_menu_new
();
window
->
menu_cvtype
=
gtk_menu_new
();
// FIXME: Add in placeholder item for now; rework this when we get the right views showing up.
/* FIXME: Add in placeholder item for now; rework this when we get the right views showing up.
// Since menu doesn't yet work, make it insensitive.
* Since menu doesn't yet work, make it insensitive.
*/
gtk_container_add
(
GTK_CONTAINER
(
window
->
menu_cvtype
),
gtk_container_add
(
GTK_CONTAINER
(
window
->
menu_cvtype
),
gtk_menu_item_new_with_label
(
_
(
"View as (placeholder)"
)));
gtk_menu_item_new_with_label
(
_
(
"View as (placeholder)"
)));
gtk_widget_set_sensitive
(
window
->
option_cvtype
,
FALSE
);
gtk_widget_set_sensitive
(
window
->
option_cvtype
,
FALSE
);
...
@@ -441,9 +467,10 @@ nautilus_window_constructed(NautilusWindow *window)
...
@@ -441,9 +467,10 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_widget_show
(
window
->
option_cvtype
);
gtk_widget_show
(
window
->
option_cvtype
);
gtk_widget_show_all
(
location_bar_box
);
gtk_widget_show_all
(
location_bar_box
);
// For mysterious reasons, connecting these signals before laying out the menu
/* For mysterious reasons, connecting these signals before laying out the menu
// and option menu ends up making the option menu not know how to size itself (i.e,
* and option menu ends up making the option menu not know how to size itself (i.e,
// it is zero-width unless you turn on expand and fill). So we do it here afterwards.
* it is zero-width unless you turn on expand and fill). So we do it here afterwards.
*/
gtk_signal_connect_while_alive
(
GTK_OBJECT
(
window
->
menu_cvtype
),
"add"
,
gtk_signal_connect_while_alive
(
GTK_OBJECT
(
window
->
menu_cvtype
),
"add"
,
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_OBJECT
(
window
->
option_cvtype
));
GTK_OBJECT
(
window
->
option_cvtype
));
...
@@ -451,15 +478,19 @@ nautilus_window_constructed(NautilusWindow *window)
...
@@ -451,15 +478,19 @@ nautilus_window_constructed(NautilusWindow *window)
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_OBJECT
(
window
->
option_cvtype
));
GTK_OBJECT
(
window
->
option_cvtype
));
/
/
set up status bar
/
*
set up status bar
*/
/* FIXME: The text in the statusbar is jammed up against the left edge of the frame.
* This looks ugly, but appears to be "standard appearance" in GTK.
* I haven't found a good workaround yet.
*/
gnome_app_set_statusbar
(
app
,
(
statusbar
=
gtk_statusbar_new
()));
gnome_app_set_statusbar
(
app
,
(
statusbar
=
gtk_statusbar_new
()));
window
->
statusbar_ctx
=
gtk_statusbar_get_context_id
(
GTK_STATUSBAR
(
statusbar
),
"IhateGtkStatusbar"
);
window
->
statusbar_ctx
=
gtk_statusbar_get_context_id
(
GTK_STATUSBAR
(
statusbar
),
"IhateGtkStatusbar"
);
gnome_app_install_menu_hints
(
app
,
main_menu
);
/* This has to go here
gnome_app_install_menu_hints
(
app
,
main_menu
);
/* This has to go here
after the statusbar
after the statusbar
creation */
creation */
/
/
set up window contents and policy
/
*
set up window contents and policy
*/
gtk_window_set_policy
(
GTK_WINDOW
(
window
),
FALSE
,
TRUE
,
FALSE
);
gtk_window_set_policy
(
GTK_WINDOW
(
window
),
FALSE
,
TRUE
,
FALSE
);
gtk_window_set_default_size
(
GTK_WINDOW
(
window
),
650
,
400
);
gtk_window_set_default_size
(
GTK_WINDOW
(
window
),
650
,
400
);
...
...
src/nautilus-spatial-window.c
View file @
4e06f3a8
...
@@ -166,8 +166,9 @@ static GnomeUIInfo file_menu_info[] = {
...
@@ -166,8 +166,9 @@ static GnomeUIInfo file_menu_info[] = {
GNOMEUIINFO_END
GNOMEUIINFO_END
};
};
// FIXME: These all need implementation, though we might end up doing that
/* FIXME: These all need implementation, though we might end up doing that
// separately for each content view (and merging with the insensitive items here)
* separately for each content view (and merging with the insensitive items here)
*/
static
GnomeUIInfo
edit_menu_info
[]
=
{
static
GnomeUIInfo
edit_menu_info
[]
=
{
GNOMEUIINFO_MENU_UNDO_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_UNDO_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_SEPARATOR
,
GNOMEUIINFO_SEPARATOR
,
...
@@ -176,7 +177,7 @@ static GnomeUIInfo edit_menu_info[] = {
...
@@ -176,7 +177,7 @@ static GnomeUIInfo edit_menu_info[] = {
GNOMEUIINFO_MENU_PASTE_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_PASTE_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_CLEAR_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_MENU_CLEAR_ITEM
(
NULL
,
NULL
),
GNOMEUIINFO_SEPARATOR
,
GNOMEUIINFO_SEPARATOR
,
/
/
Didn't use standard SELECT_ALL_ITEM 'cuz it didn't have accelerator
/
*
Didn't use standard SELECT_ALL_ITEM 'cuz it didn't have accelerator
*/
{
{
GNOME_APP_UI_ITEM
,
GNOME_APP_UI_ITEM
,
N_
(
"Select All"
),
NULL
,
N_
(
"Select All"
),
NULL
,
...
@@ -187,7 +188,27 @@ static GnomeUIInfo edit_menu_info[] = {
...
@@ -187,7 +188,27 @@ static GnomeUIInfo edit_menu_info[] = {
GNOMEUIINFO_END
GNOMEUIINFO_END
};
};
// FIXME: This needs implementation.
/* FIXME: This needs implementation. */
static
GnomeUIInfo
bookmarks_menu_info
[]
=
{
{
GNOME_APP_UI_ITEM
,
N_
(
"Add Bookmark"
),
N_
(
"Create a new bookmark for the current location"
),
NULL
,
NULL
,
NULL
,
GNOME_APP_PIXMAP_NONE
,
NULL
,
0
,
0
,
NULL
},
{
GNOME_APP_UI_ITEM
,
N_
(
"Edit Bookmarks..."
),
N_
(
"Open the bookmark-editing window"
),
NULL
,
NULL
,
NULL
,
GNOME_APP_PIXMAP_NONE
,
NULL
,
0
,
0
,
NULL
},
GNOMEUIINFO_SEPARATOR
,
GNOMEUIINFO_END
};
/* FIXME: This needs implementation. */
static
GnomeUIInfo
help_menu_info
[]
=
{
static
GnomeUIInfo
help_menu_info
[]
=
{
{
{
GNOME_APP_UI_ITEM
,
GNOME_APP_UI_ITEM
,
...
@@ -202,6 +223,7 @@ static GnomeUIInfo help_menu_info[] = {
...
@@ -202,6 +223,7 @@ static GnomeUIInfo help_menu_info[] = {
static
GnomeUIInfo
main_menu
[]
=
{
static
GnomeUIInfo
main_menu
[]
=
{
GNOMEUIINFO_MENU_FILE_TREE
(
file_menu_info
),
GNOMEUIINFO_MENU_FILE_TREE
(
file_menu_info
),
GNOMEUIINFO_MENU_EDIT_TREE
(
edit_menu_info
),
GNOMEUIINFO_MENU_EDIT_TREE
(
edit_menu_info
),
GNOMEUIINFO_SUBTREE
(
N_
(
"_Bookmarks"
),
bookmarks_menu_info
),
GNOMEUIINFO_MENU_HELP_TREE
(
help_menu_info
),
GNOMEUIINFO_MENU_HELP_TREE
(
help_menu_info
),
GNOMEUIINFO_END
GNOMEUIINFO_END
};
};
...
@@ -389,36 +411,40 @@ nautilus_window_constructed(NautilusWindow *window)
...
@@ -389,36 +411,40 @@ nautilus_window_constructed(NautilusWindow *window)
app
=
GNOME_APP
(
window
);
app
=
GNOME_APP
(
window
);
/
/
set up menu bar
/
*
set up menu bar
*/
gnome_app_create_menus_with_data
(
app
,
main_menu
,
window
);
gnome_app_create_menus_with_data
(
app
,
main_menu
,
window
);
// desensitize the items that haven't yet been implemented
/* desensitize the items that haven't yet been implemented
// FIXME: these all need to be implemented. I'm using hardwired numbers
* FIXME: these all need to be implemented. I'm using hardwired numbers
// rather than enum symbols here just 'cuz the enums aren't needed (I think)
* rather than enum symbols here just 'cuz the enums aren't needed (I think)
// once we've implemented things. If it turns out they are, we'll define 'em.
* once we've implemented things. If it turns out they are, we'll define 'em.
// gtk_widget_set_sensitive(file_menu_info[0].widget, FALSE); // New Window
*/
gtk_widget_set_sensitive
(
edit_menu_info
[
0
].
widget
,
FALSE
);
/* Undo */
gtk_widget_set_sensitive
(
edit_menu_info
[
2
].
widget
,
FALSE
);
/* Cut */
gtk_widget_set_sensitive
(
edit_menu_info
[
3
].
widget
,
FALSE
);
/* Copy */
gtk_widget_set_sensitive
(
edit_menu_info
[
4
].
widget
,
FALSE
);
/* Paste */
gtk_widget_set_sensitive
(
edit_menu_info
[
5
].
widget
,
FALSE
);
/* Clear */
gtk_widget_set_sensitive
(
edit_menu_info
[
7
].
widget
,
FALSE
);
/* Select All */
gtk_widget_set_sensitive
(
edit_menu_info
[
0
].
widget
,
FALSE
);
// Undo
gtk_widget_set_sensitive
(
bookmarks_menu_info
[
0
].
widget
,
FALSE
);
/* Add Bookmark */
gtk_widget_set_sensitive
(
edit_menu_info
[
2
].
widget
,
FALSE
);
// Cut
gtk_widget_set_sensitive
(
bookmarks_menu_info
[
1
].
widget
,
FALSE
);
/* Edit Bookmarks */
gtk_widget_set_sensitive
(
edit_menu_info
[
3
].
widget
,
FALSE
);
// Copy
gtk_widget_set_sensitive
(
edit_menu_info
[
4
].
widget
,
FALSE
);
// Paste
gtk_widget_set_sensitive
(
edit_menu_info
[
5
].
widget
,
FALSE
);
// Clear
gtk_widget_set_sensitive
(
edit_menu_info
[
7
].
widget
,
FALSE
);
// Select All
gtk_widget_set_sensitive
(
help_menu_info
[
0
].
widget
,
FALSE
);
/
/
About
gtk_widget_set_sensitive
(
help_menu_info
[
0
].
widget
,
FALSE
);
/
*
About
*/
/
/
set up toolbar
/
*
set up toolbar
*/
gnome_app_create_toolbar_with_data
(
app
,
toolbar_info
,
window
);
gnome_app_create_toolbar_with_data
(
app
,
toolbar_info
,
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
;
/
/
set up location bar
/
*
set up location bar
*/
window
->
option_cvtype
=
gtk_option_menu_new
();
window
->
option_cvtype
=
gtk_option_menu_new
();
window
->
menu_cvtype
=
gtk_menu_new
();
window
->
menu_cvtype
=
gtk_menu_new
();
// FIXME: Add in placeholder item for now; rework this when we get the right views showing up.
/* FIXME: Add in placeholder item for now; rework this when we get the right views showing up.
// Since menu doesn't yet work, make it insensitive.
* Since menu doesn't yet work, make it insensitive.
*/
gtk_container_add
(
GTK_CONTAINER
(
window
->
menu_cvtype
),
gtk_container_add
(
GTK_CONTAINER
(
window
->
menu_cvtype
),
gtk_menu_item_new_with_label
(
_
(
"View as (placeholder)"
)));
gtk_menu_item_new_with_label
(
_
(
"View as (placeholder)"
)));
gtk_widget_set_sensitive
(
window
->
option_cvtype
,
FALSE
);
gtk_widget_set_sensitive
(
window
->
option_cvtype
,
FALSE
);
...
@@ -441,9 +467,10 @@ nautilus_window_constructed(NautilusWindow *window)
...
@@ -441,9 +467,10 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_widget_show
(
window
->
option_cvtype
);
gtk_widget_show
(
window
->
option_cvtype
);
gtk_widget_show_all
(
location_bar_box
);
gtk_widget_show_all
(
location_bar_box
);
// For mysterious reasons, connecting these signals before laying out the menu
/* For mysterious reasons, connecting these signals before laying out the menu
// and option menu ends up making the option menu not know how to size itself (i.e,
* and option menu ends up making the option menu not know how to size itself (i.e,
// it is zero-width unless you turn on expand and fill). So we do it here afterwards.
* it is zero-width unless you turn on expand and fill). So we do it here afterwards.
*/
gtk_signal_connect_while_alive
(
GTK_OBJECT
(
window
->
menu_cvtype
),
"add"
,
gtk_signal_connect_while_alive
(
GTK_OBJECT
(
window
->
menu_cvtype
),
"add"
,
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_OBJECT
(
window
->
option_cvtype
));
GTK_OBJECT
(
window
->
option_cvtype
));
...
@@ -451,15 +478,19 @@ nautilus_window_constructed(NautilusWindow *window)
...
@@ -451,15 +478,19 @@ nautilus_window_constructed(NautilusWindow *window)
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_SIGNAL_FUNC
(
gtk_option_menu_do_resize
),
window
->
option_cvtype
,
GTK_OBJECT
(
window
->
option_cvtype
));
GTK_OBJECT
(
window
->
option_cvtype
));
/
/
set up status bar
/
*
set up status bar
*/