Commit 9d0a6860 authored by John Sullivan's avatar John Sullivan

Made there be just one About window, and added a utility function for

presenting a window to the user regardless of its current state.
parent 076e9575
2000-01-07 John Sullivan <sullivan@eazel.com>
Added and deployed utility routine for presenting a
window (in any current state) to user.
* libnautilus/nautilus-gtk-extensions.h:
* libnautilus/nautilus-gtk-extensions.c: New files
(nautilus_gtk_window_present): New function, presents
a window to user (opens it, brings it to front w/focus)
regardless of whether it was showing, buried, hidden, or
minimized.
* libnautilus/Makefile.am: added these two new files. Also
changed ".c" to ".h" for two self-check files in the HEADERS
list (apparent typo).
* src/nautilus-bookmarks-menu.c: (edit_bookmarks_cb):
Replaced call to nautilus_bookmarks_window_present with
call to nautilus_gtk_window_present.
* src/nautilus-bookmarks-window.c:
* src/nautilus-bookmarks-window.h:
(nautilus_bookmarks_window_present): Deleted this function.
* src/nautilus-bookmarks-window.c:
(create-bookmarks-window): Now calls nautilus_bookmarks_
window_restore_geometry just once here, instead of every
time window was shown.
* src/ntl-window.c: (nautilus_about_window_cb):
Now it keeps around a single About window, instead of
creating a new one each time (you could litter the screen
with About windows before). Also removed some obsolete
gtk_widget_set_sensitive calls.
2000-01-07 John Sullivan <sullivan@eazel.com>
Bookmarks window position is now saved & restored within
......
......@@ -23,8 +23,9 @@ libnautilusinclude_HEADERS= \
gtkscrollframe.h \
nautilus.h \
nautilus-file-utilities.h \
nautilus-lib-self-check-functions.c \
nautilus-self-checks.c \
nautilus-gtk-extensions.h \
nautilus-lib-self-check-functions.h \
nautilus-self-checks.h \
ntl-content-view-client.h \
ntl-meta-view-client.h \
ntl-view-client.h
......@@ -37,6 +38,7 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
gtkflist.c \
gtkscrollframe.c \
nautilus-file-utilities.c \
nautilus-gtk-extensions.c \
nautilus-lib-self-check-functions.c \
nautilus-self-checks.c \
ntl-content-view-client.c \
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-gtk-extensions.c - implementation of new functions that operate on
gtk classes. Perhaps some of these should be
rolled into gtk someday.
Copyright (C) 1999, 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: John Sullivan <sullivan@eazel.com>
*/
#include "nautilus-gtk-extensions.h"
#include <gnome.h>
/**
* nautilus_gtk_window_hide_retain_geometry:
*
* Hide a GtkWindow such that when reopened it will be in the same
* place it is now.
* @window: The GtkWindow to be hidden.
**/
static void
nautilus_gtk_window_hide_retain_geometry (GtkWindow *window) {
gchar *geometry_string;
gint left, top, width, height;
g_return_if_fail (GTK_IS_WINDOW (window));
/* Save and restore position to keep it in same position when next shown. */
geometry_string = gnome_geometry_string(GTK_WIDGET (window)->window);
gtk_widget_hide (GTK_WIDGET (window));
if (gnome_parse_geometry (geometry_string, &left, &top, &width, &height))
{
gtk_window_set_default_size (window, width, height);
gtk_widget_set_uposition (GTK_WIDGET (window), left, top);
}
g_free (geometry_string);
}
/**
* nautilus_gtk_window_present:
*
* Presents to the user a window that may be hidden, iconified, or buried.
* @window: The GtkWindow to be presented to the user.
**/
void
nautilus_gtk_window_present (GtkWindow *window) {
g_assert (GTK_IS_WINDOW (window));
/* Hide first if already showing, so it will reappear on top.
* This works with iconified windows as well.
*/
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (window)))
{
nautilus_gtk_window_hide_retain_geometry (window);
}
gtk_widget_show (GTK_WIDGET (window));
}
\ No newline at end of file
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-gtk-extensions.h - interface for new functions that operate on
gtk classes. Perhaps some of these should be
rolled into gtk someday.
Copyright (C) 1999, 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: John Sullivan <sullivan@eazel.com>
*/
#ifndef NAUTILUS_GTK_EXTENSIONS_H
#define NAUTILUS_GTK_EXTENSIONS_H 1
#include <gtk/gtkwindow.h>
void nautilus_gtk_window_present (GtkWindow *window);
#endif /* NAUTILUS_GTK_EXTENSIONS_H */
......@@ -23,8 +23,9 @@ libnautilusinclude_HEADERS= \
gtkscrollframe.h \
nautilus.h \
nautilus-file-utilities.h \
nautilus-lib-self-check-functions.c \
nautilus-self-checks.c \
nautilus-gtk-extensions.h \
nautilus-lib-self-check-functions.h \
nautilus-self-checks.h \
ntl-content-view-client.h \
ntl-meta-view-client.h \
ntl-view-client.h
......@@ -37,6 +38,7 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
gtkflist.c \
gtkscrollframe.c \
nautilus-file-utilities.c \
nautilus-gtk-extensions.c \
nautilus-lib-self-check-functions.c \
nautilus-self-checks.c \
ntl-content-view-client.c \
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-gtk-extensions.c - implementation of new functions that operate on
gtk classes. Perhaps some of these should be
rolled into gtk someday.
Copyright (C) 1999, 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: John Sullivan <sullivan@eazel.com>
*/
#include "nautilus-gtk-extensions.h"
#include <gnome.h>
/**
* nautilus_gtk_window_hide_retain_geometry:
*
* Hide a GtkWindow such that when reopened it will be in the same
* place it is now.
* @window: The GtkWindow to be hidden.
**/
static void
nautilus_gtk_window_hide_retain_geometry (GtkWindow *window) {
gchar *geometry_string;
gint left, top, width, height;
g_return_if_fail (GTK_IS_WINDOW (window));
/* Save and restore position to keep it in same position when next shown. */
geometry_string = gnome_geometry_string(GTK_WIDGET (window)->window);
gtk_widget_hide (GTK_WIDGET (window));
if (gnome_parse_geometry (geometry_string, &left, &top, &width, &height))
{
gtk_window_set_default_size (window, width, height);
gtk_widget_set_uposition (GTK_WIDGET (window), left, top);
}
g_free (geometry_string);
}
/**
* nautilus_gtk_window_present:
*
* Presents to the user a window that may be hidden, iconified, or buried.
* @window: The GtkWindow to be presented to the user.
**/
void
nautilus_gtk_window_present (GtkWindow *window) {
g_assert (GTK_IS_WINDOW (window));
/* Hide first if already showing, so it will reappear on top.
* This works with iconified windows as well.
*/
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (window)))
{
nautilus_gtk_window_hide_retain_geometry (window);
}
gtk_widget_show (GTK_WIDGET (window));
}
\ No newline at end of file
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-gtk-extensions.h - interface for new functions that operate on
gtk classes. Perhaps some of these should be
rolled into gtk someday.
Copyright (C) 1999, 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: John Sullivan <sullivan@eazel.com>
*/
#ifndef NAUTILUS_GTK_EXTENSIONS_H
#define NAUTILUS_GTK_EXTENSIONS_H 1
#include <gtk/gtkwindow.h>
void nautilus_gtk_window_present (GtkWindow *window);
#endif /* NAUTILUS_GTK_EXTENSIONS_H */
......@@ -23,8 +23,9 @@ libnautilusinclude_HEADERS= \
gtkscrollframe.h \
nautilus.h \
nautilus-file-utilities.h \
nautilus-lib-self-check-functions.c \
nautilus-self-checks.c \
nautilus-gtk-extensions.h \
nautilus-lib-self-check-functions.h \
nautilus-self-checks.h \
ntl-content-view-client.h \
ntl-meta-view-client.h \
ntl-view-client.h
......@@ -37,6 +38,7 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
gtkflist.c \
gtkscrollframe.c \
nautilus-file-utilities.c \
nautilus-gtk-extensions.c \
nautilus-lib-self-check-functions.c \
nautilus-self-checks.c \
ntl-content-view-client.c \
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-gtk-extensions.c - implementation of new functions that operate on
gtk classes. Perhaps some of these should be
rolled into gtk someday.
Copyright (C) 1999, 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: John Sullivan <sullivan@eazel.com>
*/
#include "nautilus-gtk-extensions.h"
#include <gnome.h>
/**
* nautilus_gtk_window_hide_retain_geometry:
*
* Hide a GtkWindow such that when reopened it will be in the same
* place it is now.
* @window: The GtkWindow to be hidden.
**/
static void
nautilus_gtk_window_hide_retain_geometry (GtkWindow *window) {
gchar *geometry_string;
gint left, top, width, height;
g_return_if_fail (GTK_IS_WINDOW (window));
/* Save and restore position to keep it in same position when next shown. */
geometry_string = gnome_geometry_string(GTK_WIDGET (window)->window);
gtk_widget_hide (GTK_WIDGET (window));
if (gnome_parse_geometry (geometry_string, &left, &top, &width, &height))
{
gtk_window_set_default_size (window, width, height);
gtk_widget_set_uposition (GTK_WIDGET (window), left, top);
}
g_free (geometry_string);
}
/**
* nautilus_gtk_window_present:
*
* Presents to the user a window that may be hidden, iconified, or buried.
* @window: The GtkWindow to be presented to the user.
**/
void
nautilus_gtk_window_present (GtkWindow *window) {
g_assert (GTK_IS_WINDOW (window));
/* Hide first if already showing, so it will reappear on top.
* This works with iconified windows as well.
*/
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (window)))
{
nautilus_gtk_window_hide_retain_geometry (window);
}
gtk_widget_show (GTK_WIDGET (window));
}
\ No newline at end of file
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-gtk-extensions.h - interface for new functions that operate on
gtk classes. Perhaps some of these should be
rolled into gtk someday.
Copyright (C) 1999, 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: John Sullivan <sullivan@eazel.com>
*/
#ifndef NAUTILUS_GTK_EXTENSIONS_H
#define NAUTILUS_GTK_EXTENSIONS_H 1
#include <gtk/gtkwindow.h>
void nautilus_gtk_window_present (GtkWindow *window);
#endif /* NAUTILUS_GTK_EXTENSIONS_H */
......@@ -27,6 +27,7 @@
#include "nautilus-bookmarklist.h"
#include "nautilus-bookmarks-window.h"
#include <libnautilus/nautilus-gtk-extensions.h>
/* object data strings */
#define LAST_STATIC_ITEM "last static item"
......@@ -139,7 +140,7 @@ bookmark_activated_cb(GtkMenuItem* item, gpointer func_data)
static void
edit_bookmarks_cb(GtkMenuItem* item, gpointer ignored)
{
nautilus_bookmarks_window_present (get_bookmarks_window());
nautilus_gtk_window_present (GTK_WINDOW (get_bookmarks_window()));
}
static GtkWidget *
......
......@@ -116,6 +116,7 @@ create_bookmarks_window(NautilusBookmarklist *list)
gtk_widget_set_usize (window,
BOOKMARKS_WINDOW_MIN_WIDTH,
BOOKMARKS_WINDOW_MIN_HEIGHT);
nautilus_bookmarks_window_restore_geometry (window);
gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE);
content_area = gtk_hbox_new (TRUE, GNOME_PAD);
......@@ -260,33 +261,6 @@ get_selection_exists ()
return GTK_CLIST(bookmark_list_widget)->rows > 0;
}
/**
* nautilus_bookmarks_window_present:
*
* Present the bookmarks window on screen in the saved position and size.
* Brings window to front and activates it.
* @window: The bookmarks window to present on screen.
**/
void
nautilus_bookmarks_window_present (GtkWidget *window)
{
g_return_if_fail (GTK_IS_WINDOW (window));
if (GTK_WIDGET_VISIBLE(window))
{
/* Hide window first so it will reappear on top */
nautilus_bookmarks_window_save_geometry (window);
gtk_widget_hide (window);
}
else
{
gtk_widget_realize (window);
}
nautilus_bookmarks_window_restore_geometry (window);
gtk_widget_show (window);
}
static void
nautilus_bookmarks_window_restore_geometry (GtkWidget *window)
{
......@@ -506,6 +480,13 @@ on_window_delete_event (GtkWidget *widget,
/* Hide but don't destroy */
gtk_widget_hide(widget);
/* Seems odd to restore the geometry just after saving it,
* and when the window is hidden, but this insures that
* the next time the window is shown it will have the
* right hints in it to appear in the correct place.
*/
nautilus_bookmarks_window_restore_geometry (widget);
return TRUE;
}
......
......@@ -29,7 +29,6 @@
#include "nautilus-bookmarklist.h"
GtkWidget *create_bookmarks_window (NautilusBookmarklist *bookmarks);
void nautilus_bookmarks_window_present (GtkWidget *window);
void nautilus_bookmarks_window_save_geometry (GtkWidget *window);
#endif /* NAUTILUS_BOOKMARKS_WINDOW_H */
......@@ -33,6 +33,7 @@
#include "ntl-window-private.h"
#include "ntl-miniicon.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libnautilus/nautilus-gtk-extensions.h>
static void nautilus_window_realize (GtkWidget *widget);
......@@ -215,7 +216,6 @@ static GnomeUIInfo bookmarks_menu_info[] = {
GNOMEUIINFO_END
};
/* FIXME: This needs implementation. */
static GnomeUIInfo help_menu_info[] = {
{
GNOME_APP_UI_ITEM,
......@@ -524,10 +524,6 @@ nautilus_window_constructed(NautilusWindow *window)
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(bookmarks_menu_info[0].widget, FALSE); /* Add Bookmark */
gtk_widget_set_sensitive(bookmarks_menu_info[1].widget, FALSE); /* Edit Bookmarks */
gtk_widget_set_sensitive(help_menu_info[0].widget, TRUE); /* About */
/* insert bookmarks menu */
gtk_menu_item_set_submenu(GTK_MENU_ITEM (main_menu[BOOKMARKS_MENU_INDEX].widget),
nautilus_bookmarks_menu_new(window));
......@@ -863,28 +859,43 @@ nautilus_window_stop (GtkWidget *btn, NautilusWindow *window)
nautilus_window_end_location_change(window);
}
/**
* nautilus_window_about_cb:
*
* Display about box, creating it first if necessary. Callback used when
* user selects "About Nautilus".
* @widget: ignored
* @window: ignored
**/
static void
nautilus_window_about_cb (GtkWidget *widget,
NautilusWindow *window)
{
GtkWidget *aboot;
const char *authors[] = {
"Darin Adler",
"Andy Hertzfeld",
"Elliot Lee",
"Ettore Perazzoli",
"Maciej Stachowiak",
"John Sullivan",
NULL
};
aboot = gnome_about_new(_("Nautilus"),
VERSION,
"Copyright (C) 1999, 2000",
authors,
_("The Cool Shell Program"),
"nautilus/nautilus3.jpg");
gtk_widget_show(aboot);
static GtkWidget *aboot = NULL;
if (aboot == NULL)
{
const char *authors[] = {
"Darin Adler",
"Andy Hertzfeld",
"Elliot Lee",
"Ettore Perazzoli",
"Maciej Stachowiak",
"John Sullivan",
NULL
};
aboot = gnome_about_new(_("Nautilus"),
VERSION,
"Copyright (C) 1999, 2000",
authors,
_("The Cool Shell Program"),
"nautilus/nautilus3.jpg");
gnome_dialog_close_hides (GNOME_DIALOG (aboot), TRUE);
}
nautilus_gtk_window_present (GTK_WINDOW (aboot));
}
void
......
......@@ -33,6 +33,7 @@
#include "ntl-window-private.h"
#include "ntl-miniicon.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libnautilus/nautilus-gtk-extensions.h>
static void nautilus_window_realize (GtkWidget *widget);
......@@ -215,7 +216,6 @@ static GnomeUIInfo bookmarks_menu_info[] = {
GNOMEUIINFO_END
};
/* FIXME: This needs implementation. */
static GnomeUIInfo help_menu_info[] = {
{
GNOME_APP_UI_ITEM,
......@@ -524,10 +524,6 @@ nautilus_window_constructed(NautilusWindow *window)
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(bookmarks_menu_info[0].widget, FALSE); /* Add Bookmark */
gtk_widget_set_sensitive(bookmarks_menu_info[1].widget, FALSE); /* Edit Bookmarks */
gtk_widget_set_sensitive(help_menu_info[0].widget, TRUE); /* About */
/* insert bookmarks menu */
gtk_menu_item_set_submenu(GTK_MENU_ITEM (main_menu[BOOKMARKS_MENU_INDEX].widget),
nautilus_bookmarks_menu_new(window));
......@@ -863,28 +859,43 @@ nautilus_window_stop (GtkWidget *btn, NautilusWindow *window)
nautilus_window_end_location_change(window);
}
/**
* nautilus_window_about_cb:
*
* Display about box, creating it first if necessary. Callback used when
* user selects "About Nautilus".
* @widget: ignored
* @window: ignored
**/
static void
nautilus_window_about_cb (GtkWidget *widget,
NautilusWindow *window)
{
GtkWidget *aboot;
const char *authors[] = {
"Darin Adler",
"Andy Hertzfeld",
"Elliot Lee",
"Ettore Perazzoli",
"Maciej Stachowiak",
"John Sullivan",
NULL
};
aboot = gnome_about_new(_("Nautilus"),
VERSION,
"Copyright (C) 1999, 2000",
authors,
_("The Cool Shell Program"),
"nautilus/nautilus3.jpg");
gtk_widget_show(aboot);
static GtkWidget *aboot = NULL;
if (aboot == NULL)
{
const char *authors[] = {
"Darin Adler",
"Andy Hertzfeld",
"Elliot Lee",
"Ettore Perazzoli",
"Maciej Stachowiak",
"John Sullivan",
NULL
};
aboot = gnome_about_new(_("Nautilus"),
VERSION,
"Copyright (C) 1999, 2000",
authors,
_("The Cool Shell Program"),
"nautilus/nautilus3.jpg");
gnome_dialog_close_hides (GNOME_DIALOG (aboot), TRUE);
}
nautilus_gtk_window_present (GTK_WINDOW (aboot));
}
void
......
......@@ -33,6 +33,7 @@
#include "ntl-window-private.h"
#include "ntl-miniicon.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libnautilus/nautilus-gtk-extensions.h>
static void nautilus_window_realize (GtkWidget *widget);
......@@ -215,7 +216,6 @@ static GnomeUIInfo bookmarks_menu_info[] = {
GNOMEUIINFO_END
};
/* FIXME: This needs implementation. */
static GnomeUIInfo help_menu_info[] = {
{
GNOME_APP_UI_ITEM,
......@@ -524,10 +524,6 @@ nautilus_window_constructed(NautilusWindow *window)
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(bookmarks_menu_info[0].widget, FALSE); /* Add Bookmark */
gtk_widget_set_sensitive(bookmarks_menu_info[1].widget, FALSE); /* Edit Bookmarks */
gtk_widget_set_sensitive(help_menu_info[0].widget, TRUE); /* About */
/* insert bookmarks menu */
gtk_menu_item_set_submenu(GTK_MENU_ITEM (main_menu[BOOKMARKS_MENU_INDEX].widget),
nautilus_bookmarks_menu_new(window));
......@@ -863,28 +859,43 @@ nautilus_window_stop (GtkWidget *btn, NautilusWindow *window)
nautilus_window_end_location_change(window);
}
/**
* nautilus_window_about_cb:
*
* Display about box, creating it first if necessary. Callback used when
* user selects "About Nautilus".
* @widget: ignored
* @window: ignored
**/
static void
nautilus_window_about_cb (GtkWidget *widget,
NautilusWindow *window)
{
GtkWidget *aboot;
const char *authors[] = {
"Darin Adler",
"Andy Hertzfeld",
"Elliot Lee",
"Ettore Perazzoli",
"Maciej Stachowiak",
"John Sullivan",
NULL