Moved some shared Makefile stuff to a shared include file so we don't use

* Makefile.am:
	* Makefile.shared:
	* components/loser/content/Makefile.am:
	* components/loser/sidebar/Makefile.am:
	* components/mozilla/Makefile.am:
	* components/sample/Makefile.am:
	* components/services/install/command-line/Makefile.am:
	* components/services/summary/nautilus-view/Makefile.am:
	* libnautilus-extensions/Makefile.am:
	* libnautilus/Makefile.am:
	* src/Makefile.am:
	* src/file-manager/Makefile.am:
	Moved some shared Makefile stuff to a shared include file so we
	don't use "copy and paste technology" in our Makefiles. Fixed the
	rule that builds .xml.h files so it doesn't have to be copied and
	pasted everywhere.

	* components/loser/content/nautilus-content-loser-ui.xml.h:
	* components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h:
	* components/mozilla/nautilus-mozilla-ui.xml.h:
	* components/sample/nautilus-sample-content-view-ui.xml.h:
	* libnautilus/nautilus-clipboard-ui.xml.h:
	* src/file-manager/nautilus-directory-view-ui.xml.h:
	* src/file-manager/nautilus-icon-view-ui.xml.h:
	* src/file-manager/nautilus-search-list-view-ui.xml.h:
	* src/nautilus-shell-ui.xml.h:
	Regenerated the xml.h files with the new Bonobo tool, which keeps
	things in alphabetical order to minimize cvs thrashing.

	* components/services/summary/nautilus-view/Makefile.am:
	* components/services/summary/nautilus-view/nautilus-summary-view-ui.xml.h:
	Added localization for the summary view UI.

	* src/Makefile.am:
	Added localization for the service UI pieces.

	* libnautilus-extensions/nautilus-buffered-widget.c:
	(nautilus_buffered_widget_initialize),
	(connect_to_background_if_needed): Fixed bug where the widget
	would stay connected after the background was destroyed. John saw
	it once, but I'm not sure how to reproduce it.

	* nautilus.spec.in: Fix some bad spelling and strange wording.

	* src/nautilus-applicable-views.h:
	* src/nautilus-applicable-views.c: (got_file_info_callback),
	(nautilus_navigation_info_new), (nautilus_navigation_info_cancel),
	(nautilus_navigation_info_free),
	(nautilus_navigation_info_get_location),
	(nautilus_navigation_info_get_initial_content_id):
	Removed lots of cruft from this class so it's private and can be
	changed around a bit.

	* src/nautilus-window-manage-views.c:
	(nautilus_window_update_internals): Use the new
	nautilus_navigation_info_get_location.
	(handle_unreadable_location): Get rid of unneeded file == NULL
	check.
	(load_view_for_new_location): Use the new
	nautilus_navigation_info_get_initial_content_id.
	(set_view_location_and_selection): Use the new
	nautilus_navigation_info_get_location.
	(nautilus_window_end_location_change_callback): Use the new
	nautilus_navigation_info_get_location.
	(nautilus_window_begin_location_change): Remove some unnecessary
	code.
This commit is contained in:
Darin Adler 2000-10-20 19:09:34 +00:00
parent 61b85f7dd4
commit 06005f269a
31 changed files with 255 additions and 450 deletions

View file

@ -1,3 +1,72 @@
2000-10-20 Darin Adler <darin@eazel.com>
* Makefile.am:
* Makefile.shared:
* components/loser/content/Makefile.am:
* components/loser/sidebar/Makefile.am:
* components/mozilla/Makefile.am:
* components/sample/Makefile.am:
* components/services/install/command-line/Makefile.am:
* components/services/summary/nautilus-view/Makefile.am:
* libnautilus-extensions/Makefile.am:
* libnautilus/Makefile.am:
* src/Makefile.am:
* src/file-manager/Makefile.am:
Moved some shared Makefile stuff to a shared include file so we
don't use "copy and paste technology" in our Makefiles. Fixed the
rule that builds .xml.h files so it doesn't have to be copied and
pasted everywhere.
* components/loser/content/nautilus-content-loser-ui.xml.h:
* components/loser/sidebar/nautilus-sidebar-loser-ui.xml.h:
* components/mozilla/nautilus-mozilla-ui.xml.h:
* components/sample/nautilus-sample-content-view-ui.xml.h:
* libnautilus/nautilus-clipboard-ui.xml.h:
* src/file-manager/nautilus-directory-view-ui.xml.h:
* src/file-manager/nautilus-icon-view-ui.xml.h:
* src/file-manager/nautilus-search-list-view-ui.xml.h:
* src/nautilus-shell-ui.xml.h:
Regenerated the xml.h files with the new Bonobo tool, which keeps
things in alphabetical order to minimize cvs thrashing.
* components/services/summary/nautilus-view/Makefile.am:
* components/services/summary/nautilus-view/nautilus-summary-view-ui.xml.h:
Added localization for the summary view UI.
* src/Makefile.am:
Added localization for the service UI pieces.
* libnautilus-extensions/nautilus-buffered-widget.c:
(nautilus_buffered_widget_initialize),
(connect_to_background_if_needed): Fixed bug where the widget
would stay connected after the background was destroyed. John saw
it once, but I'm not sure how to reproduce it.
* nautilus.spec.in: Fix some bad spelling and strange wording.
* src/nautilus-applicable-views.h:
* src/nautilus-applicable-views.c: (got_file_info_callback),
(nautilus_navigation_info_new), (nautilus_navigation_info_cancel),
(nautilus_navigation_info_free),
(nautilus_navigation_info_get_location),
(nautilus_navigation_info_get_initial_content_id):
Removed lots of cruft from this class so it's private and can be
changed around a bit.
* src/nautilus-window-manage-views.c:
(nautilus_window_update_internals): Use the new
nautilus_navigation_info_get_location.
(handle_unreadable_location): Get rid of unneeded file == NULL
check.
(load_view_for_new_location): Use the new
nautilus_navigation_info_get_initial_content_id.
(set_view_location_and_selection): Use the new
nautilus_navigation_info_get_location.
(nautilus_window_end_location_change_callback): Use the new
nautilus_navigation_info_get_location.
(nautilus_window_begin_location_change): Remove some unnecessary
code.
2000-10-20 Mathieu Lacage <mathieu@eazel.com>
More ids in sects.

View file

@ -1,4 +1,4 @@
NULL=
include $(top_srcdir)/Makefile.shared
SUBDIRS = \
data \

4
Makefile.shared Normal file
View file

@ -0,0 +1,4 @@
NULL =
%.xml.h: $(BONOBO_UI_EXTRACT) %.xml
$^ > $@

View file

@ -1,4 +1,4 @@
NULL=
include $(top_srcdir)/Makefile.shared
CPPFLAGS = \
-DPREFIX=\"$(prefix)\" \
@ -22,10 +22,6 @@ uidir = $(datadir)/gnome/ui
ui_DATA = nautilus-content-loser-ui.xml
ui_msgs = nautilus-content-loser-ui.xml.h
nautilus-content-loser-ui.xml.h: $(srcdir)/nautilus-content-loser-ui.xml
$(BONOBO_UI_EXTRACT) $(srcdir)/nautilus-content-loser-ui.xml > \
nautilus-content-loser-ui.xml.h
bin_PROGRAMS = \
nautilus-content-loser
@ -43,9 +39,6 @@ nautilus_content_loser_LDADD = \
$(VFS_LIBS) \
$(OAF_LIBS)
EXTRA_DIST = $(oaf_DATA) $(ui_DATA) $(ui_msgs)
EXTRA_DIST = $(oaf_DATA) $(ui_DATA)
CLEANFILES = $(ui_msgs)
BUILT_SOURCES = $(ui_msgs)

View file

@ -1,13 +1,12 @@
/*
* This file is autogenerated from ./nautilus-content-loser-ui.xml, do not edit
* This file is autogenerated from nautilus-content-loser-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("_File");
gchar *s = N_("_Kill Content Loser");
gchar *s = N_("Kill the Loser content view");
gchar *s = N_("Kill Content Loser");
gchar *s = N_("Kill the Loser content view");
gchar *s = N_("_File");
gchar *s = N_("_Kill Content Loser");

View file

@ -1,3 +1,5 @@
include $(top_srcdir)/Makefile.shared
CPPFLAGS = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"Nautilus-Test\" \
@ -19,10 +21,6 @@ uidir = $(datadir)/gnome/ui
ui_DATA = nautilus-sidebar-loser-ui.xml
ui_msgs = nautilus-sidebar-loser-ui.xml.h
nautilus-sidebar-loser-ui.xml.h: $(srcdir)/nautilus-sidebar-loser-ui.xml
$(BONOBO_UI_EXTRACT) $(srcdir)/nautilus-sidebar-loser-ui.xml > \
nautilus-sidebar-loser-ui.xml.h
bin_PROGRAMS = \
nautilus-sidebar-loser
@ -40,11 +38,6 @@ nautilus_sidebar_loser_LDADD = \
$(VFS_LIBS) \
$(OAF_LIBS)
EXTRA_DIST = $(oaf_DATA) $(ui_DATA) $(ui_msgs)
EXTRA_DIST = $(oaf_DATA) $(ui_DATA)
CLEANFILES = $(ui_msgs)
BUILT_SOURCES = $(ui_msgs)

View file

@ -1,13 +1,12 @@
/*
* This file is autogenerated from ./nautilus-sidebar-loser-ui.xml, do not edit
* This file is autogenerated from nautilus-sidebar-loser-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("_File");
gchar *s = N_("_Kill Sidebar Loser");
gchar *s = N_("Kill the Loser sidebar panel");
gchar *s = N_("Kill Sidebar Loser");
gchar *s = N_("Kill the Loser sidebar panel");
gchar *s = N_("_File");
gchar *s = N_("_Kill Sidebar Loser");

View file

@ -1,4 +1,4 @@
NULL =
include $(top_srcdir)/Makefile.shared
CPPFLAGS = \
-DPREFIX=\"$(prefix)\" \
@ -62,12 +62,6 @@ ui_msgs = \
nautilus-mozilla-ui.xml.h \
$(NULL)
nautilus-mozilla-ui.xml.h: $(srcdir)/nautilus-mozilla-ui.xml
$(BONOBO_UI_EXTRACT) $(srcdir)/nautilus-mozilla-ui.xml > \
nautilus-mozilla-ui.xml.h
EXTRA_DIST = $(oaf_DATA) $(ui_DATA) $(ui_msgs)
EXTRA_DIST = $(oaf_DATA) $(ui_DATA)
BUILT_SOURCES = $(ui_msgs)
CLEANFILES = $(ui_msgs)

View file

@ -1,13 +1,13 @@
/*
* This file is autogenerated from ./nautilus-mozilla-ui.xml, do not edit
* This file is autogenerated from nautilus-mozilla-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("Mozilla Test");
gchar *s = N_("This is a Mozilla merged menu item");
gchar *s = N_("This is a Mozilla merged tool bar button");
gchar *s = N_("_File");
gchar *s = N_("_Mozilla Test");
gchar *s = N_("This is a Mozilla merged menu item");
gchar *s = N_("Mozilla Test");
gchar *s = N_("This is a Mozilla merged tool bar button");

View file

@ -1,3 +1,5 @@
include $(top_srcdir)/Makefile.shared
CPPFLAGS = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"Nautilus-Sample\" \
@ -18,10 +20,6 @@ uidir = $(datadir)/gnome/ui
ui_DATA = nautilus-sample-content-view-ui.xml
ui_msgs = nautilus-sample-content-view-ui.xml.h
nautilus-sample-content-view-ui.xml.h: $(srcdir)/nautilus-sample-content-view-ui.xml
$(BONOBO_UI_EXTRACT) $(srcdir)/nautilus-sample-content-view-ui.xml > \
nautilus-sample-content-view-ui.xml.h
bin_PROGRAMS = \
nautilus-sample-content-view
@ -38,8 +36,6 @@ nautilus_sample_content_view_LDADD = \
$(VFS_LIBS) \
$(OAF_LIBS)
EXTRA_DIST = $(oaf_DATA) $(ui_DATA) $(ui_msgs)
EXTRA_DIST = $(oaf_DATA) $(ui_DATA)
BUILT_SOURCES = $(ui_msgs)
CLEANFILES += $(ui_msgs)
CLEANFILES = $(ui_msgs)

View file

@ -1,13 +1,13 @@
/*
* This file is autogenerated from ./nautilus-sample-content-view-ui.xml, do not edit
* This file is autogenerated from nautilus-sample-content-view-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("Sample");
gchar *s = N_("This is a sample merged menu item");
gchar *s = N_("This is a sample merged tool bar button");
gchar *s = N_("_File");
gchar *s = N_("_Sample");
gchar *s = N_("This is a sample merged menu item");
gchar *s = N_("Sample");
gchar *s = N_("This is a sample merged tool bar button");

View file

@ -1,4 +1,4 @@
NULL =
include $(top_srcdir)/Makefile.shared
CPPFLAGS = \
-DPREFIX=\"$(prefix)\" \
@ -41,4 +41,3 @@ eazel_install_SOURCES = \
eazel_gen_xml_SOURCES = \
eazel-gen-xml.c \
$(NULL)

View file

@ -1,4 +1,4 @@
NULL =
include $(top_srcdir)/Makefile.shared
CPPFLAGS = \
-DPREFIX=\"$(prefix)\" \
@ -19,12 +19,11 @@ INCLUDES = \
$(NULL)
oafdir = $(datadir)/oaf
oaf_DATA = \
nautilus-summary-view.oafinfo
oaf_DATA = nautilus-summary-view.oafinfo
uidir = $(datadir)/gnome/ui
ui_DATA = nautilus-summary-view-ui.xml
ui_msgs = nautilus-summary-view-ui.xml.h
bin_PROGRAMS = \
nautilus-summary-view
@ -51,3 +50,5 @@ nautilus_summary_view_LDADD = \
$(NULL)
EXTRA_DIST = $(oaf_DATA) $(ui_DATA)
BUILT_SOURCES = $(ui_msgs)
CLEANFILES = $(ui_msgs)

View file

@ -0,0 +1,16 @@
/*
* This file is autogenerated from nautilus-summary-view-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("Configure your service preferences");
gchar *s = N_("Go to the Eazel Services Registration Form");
gchar *s = N_("Logout from Eazel Services");
gchar *s = N_("Show the login dialog box");
gchar *s = N_("_Login to Eazel Services");
gchar *s = N_("_Logout from Eazel Services");
gchar *s = N_("_Register for Eazel Services");
gchar *s = N_("_Service Preferences");

View file

@ -1,4 +1,4 @@
NULL=
include $(top_srcdir)/Makefile.shared
lib_LTLIBRARIES=libnautilus-extensions.la
@ -227,5 +227,4 @@ noinst_HEADERS = \
nautilus-xml-extensions.h \
$(NULL)
$(lib_LTLIBRARIES): $(dependency_static_libs)

View file

@ -66,7 +66,7 @@ struct _NautilusBufferedWidgetDetail
GdkPixbuf *tile_pixbuf;
int horizontal_offset;
int vertical_offset;
guint background_appearance_changed_connection;
guint background_appearance_changed_connected;
NautilusBackgroundType background_type;
guint32 background_color;
};
@ -143,14 +143,8 @@ nautilus_buffered_widget_initialize (NautilusBufferedWidget *buffered_widget)
GTK_WIDGET_SET_FLAGS (buffered_widget, GTK_NO_WINDOW);
buffered_widget->detail = g_new (NautilusBufferedWidgetDetail, 1);
buffered_widget->detail = g_new0 (NautilusBufferedWidgetDetail, 1);
buffered_widget->detail->copy_area_gc = NULL;
buffered_widget->detail->buffer_pixbuf = NULL;
buffered_widget->detail->tile_pixbuf = NULL;
buffered_widget->detail->horizontal_offset = 0;
buffered_widget->detail->vertical_offset = 0;
buffered_widget->detail->background_appearance_changed_connection = 0;
buffered_widget->detail->background_type = NAUTILUS_BACKGROUND_ANCESTOR_OR_NONE;
buffered_widget->detail->background_color = NAUTILUS_RGB_COLOR_WHITE;
}
@ -635,26 +629,27 @@ static void
connect_to_background_if_needed (NautilusBufferedWidget *buffered_widget)
{
GtkWidget *background_ancestor;
NautilusBackground *background;
g_return_if_fail (NAUTILUS_IS_BUFFERED_WIDGET (buffered_widget));
if (buffered_widget->detail->background_appearance_changed_connection != 0) {
if (buffered_widget->detail->background_appearance_changed_connected) {
return;
}
background_ancestor = nautilus_gtk_widget_find_background_ancestor (GTK_WIDGET (buffered_widget));
if (background_ancestor != NULL) {
NautilusBackground *background;
background = nautilus_get_widget_background (background_ancestor);
g_assert (NAUTILUS_IS_BACKGROUND (background));
buffered_widget->detail->background_appearance_changed_connection =
gtk_signal_connect (GTK_OBJECT (background),
"appearance_changed",
background_appearance_changed_callback,
GTK_OBJECT (buffered_widget));
gtk_signal_connect_while_alive (GTK_OBJECT (background),
"appearance_changed",
background_appearance_changed_callback,
buffered_widget,
GTK_OBJECT (buffered_widget));
buffered_widget->detail->background_appearance_changed_connected = TRUE;
}
}

View file

@ -1,4 +1,4 @@
NULL=
include $(top_srcdir)/Makefile.shared
lib_LTLIBRARIES=libnautilus-extensions.la
@ -227,5 +227,4 @@ noinst_HEADERS = \
nautilus-xml-extensions.h \
$(NULL)
$(lib_LTLIBRARIES): $(dependency_static_libs)

View file

@ -66,7 +66,7 @@ struct _NautilusBufferedWidgetDetail
GdkPixbuf *tile_pixbuf;
int horizontal_offset;
int vertical_offset;
guint background_appearance_changed_connection;
guint background_appearance_changed_connected;
NautilusBackgroundType background_type;
guint32 background_color;
};
@ -143,14 +143,8 @@ nautilus_buffered_widget_initialize (NautilusBufferedWidget *buffered_widget)
GTK_WIDGET_SET_FLAGS (buffered_widget, GTK_NO_WINDOW);
buffered_widget->detail = g_new (NautilusBufferedWidgetDetail, 1);
buffered_widget->detail = g_new0 (NautilusBufferedWidgetDetail, 1);
buffered_widget->detail->copy_area_gc = NULL;
buffered_widget->detail->buffer_pixbuf = NULL;
buffered_widget->detail->tile_pixbuf = NULL;
buffered_widget->detail->horizontal_offset = 0;
buffered_widget->detail->vertical_offset = 0;
buffered_widget->detail->background_appearance_changed_connection = 0;
buffered_widget->detail->background_type = NAUTILUS_BACKGROUND_ANCESTOR_OR_NONE;
buffered_widget->detail->background_color = NAUTILUS_RGB_COLOR_WHITE;
}
@ -635,26 +629,27 @@ static void
connect_to_background_if_needed (NautilusBufferedWidget *buffered_widget)
{
GtkWidget *background_ancestor;
NautilusBackground *background;
g_return_if_fail (NAUTILUS_IS_BUFFERED_WIDGET (buffered_widget));
if (buffered_widget->detail->background_appearance_changed_connection != 0) {
if (buffered_widget->detail->background_appearance_changed_connected) {
return;
}
background_ancestor = nautilus_gtk_widget_find_background_ancestor (GTK_WIDGET (buffered_widget));
if (background_ancestor != NULL) {
NautilusBackground *background;
background = nautilus_get_widget_background (background_ancestor);
g_assert (NAUTILUS_IS_BACKGROUND (background));
buffered_widget->detail->background_appearance_changed_connection =
gtk_signal_connect (GTK_OBJECT (background),
"appearance_changed",
background_appearance_changed_callback,
GTK_OBJECT (buffered_widget));
gtk_signal_connect_while_alive (GTK_OBJECT (background),
"appearance_changed",
background_appearance_changed_callback,
buffered_widget,
GTK_OBJECT (buffered_widget));
buffered_widget->detail->background_appearance_changed_connected = TRUE;
}
}

View file

@ -1,4 +1,4 @@
NULL=
include $(top_srcdir)/Makefile.shared
lib_LTLIBRARIES=libnautilus.la
@ -75,19 +75,14 @@ uidir = $(datadir)/gnome/ui
ui_DATA = \
nautilus-clipboard-ui.xml \
$(NULL)
ui_msgs = \
nautilus-clipboard-ui.xml.h
nautilus-clipboard-ui.xml.h: $(srcdir)/nautilus-clipboard-ui.xml
$(BONOBO_UI_EXTRACT) $(srcdir)/nautilus-clipboard-ui.xml > \
nautilus-clipboard-ui.xml.h
nautilus-clipboard-ui.xml.h \
$(NULL)
EXTRA_DIST = \
$(ui_DATA) \
nautilus-view-component.idl \
nautilus-distributed-undo.idl \
$(ui_msgs) \
$(NULL)
BUILT_SOURCES = \
@ -103,4 +98,3 @@ CLEANFILES = \
nautilus_distributed_undo_idl_stamp \
$(ui_msgs) \
$(NULL)

View file

@ -1,16 +0,0 @@
/*
* This file is autogenerated from ./nautilus-clipboard-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("_Cut Text");
gchar *s = N_("Cut the selected text to the clipboard");
gchar *s = N_("_Copy Text");
gchar *s = N_("Copy the selected text to the clipboard");
gchar *s = N_("_Paste Text");
gchar *s = N_("Paste the text stored on the clipboard");
gchar *s = N_("C_lear Text");
gchar *s = N_("Remove the selected text without putting it on the clipboard");

View file

@ -7,7 +7,7 @@
%define sysconfdir /etc
Name: %name
Summary: Nautilus is an open-source file manager and graphical shell.
Summary: Nautilus is a free file manager and graphical shell.
Version: %ver
Release: %rel
Copyright: GPL
@ -38,7 +38,7 @@ the early stages of development. It will become an integral part of the
GNOME desktop environment when it is finished.
%package devel
Summary: Libraries and include files for developing nautilus components
Summary: Libraries and include files for developing Nautilus components
Group: Development/Libraries
Requires: %name = %{PACKAGE_VERSION}
@ -55,13 +55,13 @@ Requires: %name = %{PACKAGE_VERSION}
Requires: ammonite >= 0.1
%package extras
Summary: extra goodies to use nautilus
Summary: Extra goodies to use with Nautilus
Group: User Interface/Desktop
Requires: xpdf >= 0.90
Requires: mpg123 >= 0.59
%package suggested
Summary: Nautilus and usefull components
Summary: Nautilus and a suggested set of components
Group: User Interface/Desktop
Requires: %name = %{PACKAGE_VERSION}
Requires: %name-mozilla = %{PACKAGE_VERSION}

View file

@ -1,4 +1,4 @@
NULL=
include $(top_srcdir)/Makefile.shared
SUBDIRS=file-manager
@ -134,9 +134,9 @@ nautilus_SOURCES = \
$(NULL)
$(nautilus_shell_interface_idl_sources): nautilus_shell_interface_idl_stamp
nautilus_shell_interface_idl_stamp: nautilus-shell-interface.idl $(top_srcdir)/libnautilus/nautilus-view-component.idl
$(ORBIT_IDL) $(IDL_CFLAGS) -I$(top_srcdir) $(srcdir)/nautilus-shell-interface.idl
touch nautilus_shell_interface_idl_stamp
nautilus_shell_interface_idl_stamp: $(ORBIT_IDL) nautilus-shell-interface.idl $(top_srcdir)/libnautilus/nautilus-view-component.idl
$(ORBIT_IDL) $(IDL_CFLAGS) -I$(top_srcdir) nautilus-shell-interface.idl
touch $@
TESTS=check-nautilus
@ -148,11 +148,10 @@ ui_DATA = \
nautilus-service-ui.xml \
nautilus-shell-ui.xml \
$(NULL)
ui_msgs = nautilus-shell-ui.xml.h
nautilus-shell-ui.xml.h: nautilus-shell-ui.xml
$(BONOBO_UI_EXTRACT) $(srcdir)/nautilus-shell-ui.xml > \
nautilus-shell-ui.xml.h
ui_msgs = \
nautilus-service-ui.xml.h \
nautilus-shell-ui.xml.h \
$(NULL)
CLEANFILES = \
$(nautilus_shell_interface_idl_sources) \
@ -166,7 +165,6 @@ EXTRA_DIST = \
$(oaf_DATA) \
run-nautilus \
$(ui_DATA) \
$(ui_msgs) \
$(NULL)
BUILT_SOURCES = $(nautilus_shell_interface_idl_sources) \
@ -176,8 +174,8 @@ BUILT_SOURCES = $(nautilus_shell_interface_idl_sources) \
install-data-hook: run-nautilus
$(mkinstalldirs) $(DESTDIR)/$(prefix)/bin
@list='run-nautilus'; for p in $$list; do\
if test -f $(srcdir)/$$p; then \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p"; \
$(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)/$(prefix)/bin/$$p; \
else :; fi; \
done

View file

@ -1,4 +1,4 @@
NULL =
include $(top_srcdir)/Makefile.shared
noinst_LTLIBRARIES=libnautilus-file-manager.la
@ -56,17 +56,6 @@ ui_msgs = nautilus-directory-view-ui.xml.h \
nautilus-search-list-view-ui.xml.h \
$(NULL)
nautilus-directory-view-ui.xml.h: $(srcdir)/nautilus-directory-view-ui.xml
$(BONOBO_UI_EXTRACT) $(srcdir)/nautilus-directory-view-ui.xml > \
nautilus-directory-view-ui.xml.h
nautilus-icon-view-ui.xml.h: $(srcdir)/nautilus-icon-view-ui.xml
$(BONOBO_UI_EXTRACT) $(srcdir)/nautilus-icon-view-ui.xml > \
nautilus-icon-view-ui.xml.h
nautilus-search-list-view-ui.xml.h: $(srcdir)/nautilus-search-list-view-ui.xml
$(BONOBO_UI_EXTRACT) $(srcdir)/nautilus-search-list-view-ui.xml >\
nautilus-search-list-view-ui.xml.h
EXTRA_DIST = $(ui_DATA) $(ui_msgs)
CLEANFILES = $(ui_msgs)

View file

@ -1,33 +0,0 @@
/*
* This file is autogenerated from ./nautilus-directory-view-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("New Folder");
gchar *s = N_("Create a new empty folder inside this folder");
gchar *s = N_("_Open");
gchar *s = N_("Open the selected item in this window");
gchar *s = N_("_Open in New Window");
gchar *s = N_("Open each selected item in a new window");
gchar *s = N_("Open With");
gchar *s = N_("Other _Application...");
gchar *s = N_("Choose another application with which to open the selected item");
gchar *s = N_("Other _Viewer...");
gchar *s = N_("Choose another viewer with which to view the selected item");
gchar *s = N_("Show _Properties");
gchar *s = N_("View or modify the properties of each selected item");
gchar *s = N_("Move to _Trash");
gchar *s = N_("Move each selected item to the Trash");
gchar *s = N_("_Duplicate");
gchar *s = N_("Duplicate each selected item");
gchar *s = N_("Create _Link");
gchar *s = N_("Create a symbolic link for each selected item");
gchar *s = N_("_Empty Trash");
gchar *s = N_("Delete all items in the trash");
gchar *s = N_("_Select All Files");
gchar *s = N_("Select all items in this window");
gchar *s = N_("R_emove Custom Images");
gchar *s = N_("Remove any custom images from selected icons");

View file

@ -1,35 +0,0 @@
/*
* This file is autogenerated from ./nautilus-icon-view-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("_Rename");
gchar *s = N_("Rename selected icon");
gchar *s = N_("_Icon Captions...");
gchar *s = N_("Choose which information appears beneath each icon's name");
gchar *s = N_("_Stretch Icon");
gchar *s = N_("Make the selected icon stretchable");
gchar *s = N_("_Restore Icons' Original Sizes");
gchar *s = N_("Restore each selected icon to its original size");
gchar *s = N_("_Lay out items");
gchar *s = N_("_manually");
gchar *s = N_("Leave icons wherever they are dropped");
gchar *s = N_("by _Name");
gchar *s = N_("Keep icons sorted by name in rows");
gchar *s = N_("by _Size");
gchar *s = N_("Keep icons sorted by size in rows");
gchar *s = N_("by _Type");
gchar *s = N_("Keep icons sorted by type in rows");
gchar *s = N_("by Modification _Date");
gchar *s = N_("Keep icons sorted by modification date in rows");
gchar *s = N_("by _Emblems");
gchar *s = N_("Keep icons sorted by emblems in rows");
gchar *s = N_("_Tighter Layout");
gchar *s = N_("Toggle using a tighter layout scheme");
gchar *s = N_("Re_versed Order");
gchar *s = N_("Display icons in the opposite order");
gchar *s = N_("_Clean Up by Name");
gchar *s = N_("Reposition icons to better fit in the window and avoid overlapping");

View file

@ -1,12 +0,0 @@
/*
* This file is autogenerated from ./nautilus-search-list-view-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("_Reveal in New Window");
gchar *s = N_("Reveal each selected item in its original folder");
gchar *s = N_("Show _Indexing Status");
gchar *s = N_("Show status of indexing used by searching");

View file

@ -34,25 +34,30 @@
#include <config.h>
#include "nautilus-applicable-views.h"
#include <ctype.h>
#include <dirent.h>
#include <libgnomevfs/gnome-vfs-async-ops.h>
#include <libgnomevfs/gnome-vfs-file-info.h>
#include <libnautilus-extensions/nautilus-directory.h>
#include <libnautilus-extensions/nautilus-metadata.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-file-attributes.h>
#include <libnautilus-extensions/nautilus-file.h>
#include <libnautilus-extensions/nautilus-view-identifier.h>
#include <libnautilus-extensions/nautilus-glib-extensions.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus-extensions/nautilus-metadata.h>
#include <libnautilus-extensions/nautilus-mime-actions.h>
#include <libgnomevfs/gnome-vfs-file-info.h>
#include <libgnomevfs/gnome-vfs-async-ops.h>
#include <sys/types.h>
#include <dirent.h>
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-view-identifier.h>
#include <limits.h>
#include <ctype.h>
#include <string.h>
#include <sys/types.h>
struct NautilusNavigationInfo {
NautilusNavigationCallback callback;
gpointer callback_data;
NautilusFile *file;
NautilusViewIdentifier *initial_content_id;
GnomeVFSAsyncHandle *handle;
};
static NautilusNavigationResult
get_nautilus_navigation_result_from_gnome_vfs_result (GnomeVFSResult gnome_vfs_result)
@ -98,17 +103,17 @@ got_file_info_callback (NautilusFile *file,
gpointer data)
{
GnomeVFSResult vfs_result_code;
NautilusNavigationInfo *navinfo;
NautilusNavigationInfo *info;
NautilusNavigationResult result_code;
NautilusViewIdentifier *default_id;
OAF_ServerInfo *default_component;
navinfo = (NautilusNavigationInfo *) data;
info = (NautilusNavigationInfo *) data;
g_assert (navinfo->file == file);
g_assert (info->file == file);
result_code = NAUTILUS_NAVIGATION_RESULT_UNDEFINED;
default_id = NULL;
navinfo->ah = NULL;
info->handle = NULL;
/* Get the result. */
vfs_result_code = nautilus_file_get_file_info_result (file);
@ -119,7 +124,7 @@ got_file_info_callback (NautilusFile *file,
goto out;
}
default_component = nautilus_mime_get_default_component_for_file (navinfo->file);
default_component = nautilus_mime_get_default_component_for_file (info->file);
if (default_component != NULL) {
default_id = nautilus_view_identifier_new_from_content_view (default_component);
CORBA_free (default_component);
@ -137,7 +142,7 @@ got_file_info_callback (NautilusFile *file,
/* Map GnomeVFSResult to one of the types that Nautilus knows how to handle. */
if (vfs_result_code == GNOME_VFS_OK && default_id == NULL) {
/* If the complete list is non-empty, the default shouldn't have been NULL */
g_assert (!nautilus_mime_has_any_components_for_file (navinfo->file));
g_assert (!nautilus_mime_has_any_components_for_file (info->file));
result_code = NAUTILUS_NAVIGATION_RESULT_NO_HANDLER_FOR_TYPE;
}
@ -148,13 +153,13 @@ got_file_info_callback (NautilusFile *file,
}
g_assert (default_id != NULL);
navinfo->initial_content_id = nautilus_view_identifier_copy (default_id);
info->initial_content_id = nautilus_view_identifier_copy (default_id);
out:
if (result_code == NAUTILUS_NAVIGATION_RESULT_UNDEFINED) {
result_code = get_nautilus_navigation_result_from_gnome_vfs_result (vfs_result_code);
}
(* (navinfo->callback)) (result_code, navinfo, navinfo->callback_data);
(* info->callback) (result_code, info, info->callback_data);
}
@ -164,8 +169,7 @@ got_file_info_callback (NautilusFile *file,
NautilusNavigationInfo *
nautilus_navigation_info_new (const char *location,
NautilusNavigationCallback notify_when_ready,
gpointer notify_data,
const char *referring_iid)
gpointer notify_data)
{
NautilusNavigationInfo *info;
GList *attributes;
@ -175,10 +179,6 @@ nautilus_navigation_info_new (const char *location,
info->callback = notify_when_ready;
info->callback_data = notify_data;
info->referring_iid = g_strdup (referring_iid);
info->location = g_strdup (location);
info->directory = nautilus_directory_get (location);
info->file = nautilus_file_get (location);
/* Arrange for all the file attributes we will need. */
@ -199,9 +199,9 @@ nautilus_navigation_info_cancel (NautilusNavigationInfo *info)
{
g_return_if_fail (info != NULL);
if (info->ah != NULL) {
gnome_vfs_async_cancel (info->ah);
info->ah = NULL;
if (info->handle != NULL) {
gnome_vfs_async_cancel (info->handle);
info->handle = NULL;
}
nautilus_file_cancel_call_when_ready
@ -217,15 +217,20 @@ nautilus_navigation_info_free (NautilusNavigationInfo *info)
nautilus_navigation_info_cancel (info);
nautilus_g_list_free_deep (info->explicit_iids);
nautilus_view_identifier_free (info->initial_content_id);
g_free (info->referring_iid);
g_free (info->location);
nautilus_directory_unref (info->directory);
nautilus_file_unref (info->file);
nautilus_view_identifier_free (info->initial_content_id);
g_free (info);
}
char *
nautilus_navigation_info_get_location (NautilusNavigationInfo *info)
{
return nautilus_file_get_uri (info->file);
}
NautilusViewIdentifier *
nautilus_navigation_info_get_initial_content_id (NautilusNavigationInfo *info)
{
return nautilus_view_identifier_copy (info->initial_content_id);
}

View file

@ -26,13 +26,9 @@
/* nautilus-applicable-views.h: Interface for mapping a location
change request to a set of views and actual URL to be loaded. */
#ifndef NAUTILUS_URI_MAP_H
#define NAUTILUS_URI_MAP_H
#ifndef NAUTILUS_APPLICABLE_VIEWS_H
#define NAUTILUS_APPLICABLE_VIEWS_H
#include <glib.h>
#include <libgnomevfs/gnome-vfs-types.h>
#include <libnautilus/nautilus-view-component.h>
#include <libnautilus-extensions/nautilus-directory.h>
#include <libnautilus-extensions/nautilus-view-identifier.h>
typedef struct NautilusNavigationInfo NautilusNavigationInfo;
@ -62,27 +58,12 @@ typedef void (*NautilusNavigationCallback) (NautilusNavigationResult result,
NautilusNavigationInfo *info,
gpointer callback_data);
struct NautilusNavigationInfo {
char *location;
NautilusNavigationInfo *nautilus_navigation_info_new (const char *location,
NautilusNavigationCallback ready_callback,
gpointer callback_data);
void nautilus_navigation_info_cancel (NautilusNavigationInfo *info);
void nautilus_navigation_info_free (NautilusNavigationInfo *info);
char * nautilus_navigation_info_get_location (NautilusNavigationInfo *info);
NautilusViewIdentifier *nautilus_navigation_info_get_initial_content_id (NautilusNavigationInfo *info);
char *referring_iid; /* iid of content view that we're coming from */
NautilusViewIdentifier *initial_content_id; /* NautilusViewIdentifier for content view that we're going to display */
GList *files; /* NautilusFile's for files in the dir, if it is one. */
GList *explicit_iids; /* IIDs explicitly mentioned in the metafile. */
/* internal usage */
NautilusNavigationCallback callback;
gpointer callback_data;
GnomeVFSAsyncHandle *ah;
NautilusDirectory *directory;
NautilusFile *file;
};
NautilusNavigationInfo *nautilus_navigation_info_new (const char *location,
NautilusNavigationCallback ready_callback,
gpointer callback_data,
const char *referring_iid);
void nautilus_navigation_info_cancel (NautilusNavigationInfo *info);
void nautilus_navigation_info_free (NautilusNavigationInfo *info);
#endif
#endif /* NAUTILUS_APPLICABLE_VIEWS_H */

View file

View file

@ -1,104 +0,0 @@
/*
* This file is autogenerated from ./nautilus-shell-ui.xml, do not edit
*
* This file contains translatable strings generated by
* bonobo-ui-extract. Add this file to your project's
* POTFILES.in. DO NOT compile it as part of your application.
*/
gchar *s = N_("Go to the previous visited location");
gchar *s = N_("Go to the next visited location");
gchar *s = N_("Open another Nautilus window for the displayed location");
gchar *s = N_("Stop loading this location");
gchar *s = N_("Go to Eazel Services");
gchar *s = N_("Go to the location that contains this one");
gchar *s = N_("Show the contents in more detail");
gchar *s = N_("Show the contents in less detail");
gchar *s = N_("Show the contents at the normal size");
gchar *s = N_("_File");
gchar *s = N_("_New Window");
gchar *s = N_("_Close Window");
gchar *s = N_("Close this window");
gchar *s = N_("Close _All Windows");
gchar *s = N_("Close all Nautilus windows");
gchar *s = N_("_Find");
gchar *s = N_("Search this computer for files");
gchar *s = N_("_Web Search");
gchar *s = N_("Search the World Wide Web");
gchar *s = N_("_Edit");
gchar *s = N_("Cut _Text");
gchar *s = N_("Cut the selected text to the clipboard");
gchar *s = N_("_Copy Text");
gchar *s = N_("Copy the selected text to the clipboard");
gchar *s = N_("_Paste Text");
gchar *s = N_("Paste the text stored on the clipboard");
gchar *s = N_("C_lear Text");
gchar *s = N_("Removes the selected text without putting it on the clipboard");
gchar *s = N_("_Select All");
gchar *s = N_("Custo_mization...");
gchar *s = N_("Display the Property Browser, containing patterns, colors, and emblems");
gchar *s = N_("C_hange Appearance...");
gchar *s = N_("Display the set of available appearance themes");
gchar *s = N_("_View");
gchar *s = N_("_Refresh");
gchar *s = N_("Display the latest contents of the current location");
gchar *s = N_("Hide Sidebar");
gchar *s = N_("Change the visibility of this window's sidebar");
gchar *s = N_("Hide Tool Bar");
gchar *s = N_("Change the visibility of this window's tool bar");
gchar *s = N_("Hide Location Bar");
gchar *s = N_("Change the visibility of this window's location bar");
gchar *s = N_("Hide Status Bar");
gchar *s = N_("Change the visibility of this window's status bar");
gchar *s = N_("Zoom _In");
gchar *s = N_("Zoom _Out");
gchar *s = N_("_Normal Size");
gchar *s = N_("_Go");
gchar *s = N_("_Back");
gchar *s = N_("_Forward");
gchar *s = N_("_Up a Level");
gchar *s = N_("_Home");
gchar *s = N_("Go to the home location");
gchar *s = N_("For_get History");
gchar *s = N_("Clear contents of Go menu and Back/Forward lists");
gchar *s = N_("_Bookmarks");
gchar *s = N_("_Add Bookmark");
gchar *s = N_("Add a bookmark for the current location to this menu");
gchar *s = N_("_Edit Bookmarks...");
gchar *s = N_("Display a window that allows editing the bookmarks in this menu");
gchar *s = N_("_Profiler");
gchar *s = N_("_Start Profiling");
gchar *s = N_("Start Profiling");
gchar *s = N_("_Stop Profiling");
gchar *s = N_("Stop Profiling");
gchar *s = N_("_Reset Profiling");
gchar *s = N_("Reset Profiling");
gchar *s = N_("_Report Profiling");
gchar *s = N_("Report Profiling");
gchar *s = N_("_Help");
gchar *s = N_("_About Nautilus...");
gchar *s = N_("Display credits for the creators of Nautilus");
gchar *s = N_("_Nautilus User Manual");
gchar *s = N_("Display on-line help for Nautilus");
gchar *s = N_("Nautilus _Feedback...");
gchar *s = N_("Show a page from which you can send feedback about Nautilus to its creators");
gchar *s = N_(" Beginner");
gchar *s = N_("Use Beginner settings");
gchar *s = N_(" Intermediate");
gchar *s = N_("Use Intermediate settings");
gchar *s = N_(" Advanced");
gchar *s = N_("Use Advanced settings");
gchar *s = N_("Edit Settings...");
gchar *s = N_("Edit settings for the current user level");
gchar *s = N_("Back");
gchar *s = N_("Forward");
gchar *s = N_("Up");
gchar *s = N_("Refresh");
gchar *s = N_("Display the latest contents of the current location");
gchar *s = N_("Home");
gchar *s = N_("Go to the home location");
gchar *s = N_("Find");
gchar *s = N_("Search this computer for files");
gchar *s = N_("Web Search");
gchar *s = N_("Search the World Wide Web");
gchar *s = N_("Stop");

View file

@ -503,10 +503,10 @@ viewed_file_changed_callback (NautilusWindow *window)
static void
nautilus_window_update_internals (NautilusWindow *window)
{
const char *new_location;
char *new_location;
if (window->pending_ni != NULL) {
new_location = window->pending_ni->location;
new_location = nautilus_navigation_info_get_location (window->pending_ni);
/* Maintain history lists. */
if (window->location_change_type != NAUTILUS_LOCATION_CHANGE_RELOAD) {
@ -526,7 +526,7 @@ nautilus_window_update_internals (NautilusWindow *window)
/* Set the new location. */
g_free (window->location);
window->location = g_strdup (new_location);
window->location = new_location;
/* Create a NautilusFile for this location, so we can
* check if it goes away.
@ -660,13 +660,6 @@ handle_unreadable_location (NautilusWindow *window, const char *uri)
*/
file = nautilus_file_get (uri);
/* Can't make file object; can't check permissions; can't determine
* whether file is readable so return FALSE.
*/
if (file == NULL) {
return FALSE;
}
unreadable = !nautilus_file_can_read (file);
if (unreadable) {
@ -921,22 +914,25 @@ cancel_location_change (NautilusWindow *window)
static void
load_view_for_new_location (NautilusWindow *window)
{
window->new_content_view = load_content_view
(window, window->pending_ni->initial_content_id);
NautilusViewIdentifier *content_id;
content_id = nautilus_navigation_info_get_initial_content_id (window->pending_ni);
window->new_content_view = load_content_view (window, content_id);
nautilus_view_identifier_free (content_id);
}
static void
set_view_location_and_selection (NautilusWindow *window)
{
const char *location;
char *location;
GList *selection, *node;
if (window->pending_ni != NULL) {
location = window->pending_ni->location;
location = nautilus_navigation_info_get_location (window->pending_ni);
selection = window->pending_selection;
} else {
g_assert (window->pending_selection == NULL);
location = window->location;
location = g_strdup (window->location);
selection = window->selection;
}
@ -957,6 +953,8 @@ set_view_location_and_selection (NautilusWindow *window)
nautilus_g_list_free_deep (window->pending_selection);
window->pending_selection = NULL;
g_free (location);
}
static gboolean
@ -1088,7 +1086,7 @@ nautilus_window_set_state_info (NautilusWindow *window, ...)
case NAVINFO_RECEIVED: /* The information needed for a location change to continue has been received */
x_message (("NAVINFO_RECEIVED"));
window->pending_ni = va_arg(args, NautilusNavigationInfo*);
window->pending_ni = va_arg(args, NautilusNavigationInfo *);
window->cancel_tag = NULL;
break;
@ -1185,19 +1183,16 @@ position_and_show_window_callback (NautilusFile *file,
}
gtk_widget_show (GTK_WIDGET (window));
/* This directory object was reffed for this callback */
nautilus_file_unref (file);
}
static void
nautilus_window_end_location_change_callback (NautilusNavigationResult result_code,
NautilusNavigationInfo *navi,
NautilusNavigationInfo *navigation_info,
gpointer data)
{
NautilusWindow *window;
NautilusFile *file;
const char *requested_uri;
char *location;
char *full_uri_for_display;
char *uri_for_display;
char *error_message;
@ -1207,21 +1202,22 @@ nautilus_window_end_location_change_callback (NautilusNavigationResult result_co
GnomeDialog *dialog;
GList *attributes;
g_assert (navi != NULL);
g_assert (navigation_info != NULL);
window = NAUTILUS_WINDOW (data);
window->location_change_end_reached = TRUE;
if (result_code == NAUTILUS_NAVIGATION_RESULT_OK) {
/* Navigation successful. */
window->cancel_tag = navi;
window->cancel_tag = navigation_info;
/* If the window is not yet showing (as is the case for nascent
* windows), position and show it only after we've got the
* metadata (since position info is stored there).
*/
if (!GTK_WIDGET_VISIBLE (window)) {
file = nautilus_file_get (navi->location);
location = nautilus_navigation_info_get_location (navigation_info);
file = nautilus_file_get (location);
attributes = g_list_append (NULL, NAUTILUS_FILE_ATTRIBUTE_METADATA);
nautilus_file_call_when_ready (file,
@ -1229,23 +1225,27 @@ nautilus_window_end_location_change_callback (NautilusNavigationResult result_co
position_and_show_window_callback,
window);
g_list_free (attributes);
nautilus_file_unref (file);
g_free (location);
}
nautilus_window_set_state_info
(window,
(NautilusWindowStateItem) NAVINFO_RECEIVED, navi,
(NautilusWindowStateItem) NAVINFO_RECEIVED, navigation_info,
(NautilusWindowStateItem) 0);
return;
}
/* Some sort of failure occurred. How 'bout we tell the user? */
requested_uri = navi->location;
full_uri_for_display = nautilus_format_uri_for_display (requested_uri);
location = nautilus_navigation_info_get_location (navigation_info);
full_uri_for_display = nautilus_format_uri_for_display (location);
/* Truncate the URI so it doesn't get insanely wide. Note that even
* though the dialog uses wrapped text, if the URI doesn't contain
* white space then the text-wrapping code is too stupid to wrap it.
*/
uri_for_display = nautilus_str_middle_truncate (full_uri_for_display, MAX_URI_IN_DIALOG_LENGTH);
uri_for_display = nautilus_str_middle_truncate
(full_uri_for_display, MAX_URI_IN_DIALOG_LENGTH);
g_free (full_uri_for_display);
dialog_title = NULL;
@ -1269,15 +1269,9 @@ nautilus_window_end_location_change_callback (NautilusNavigationResult result_co
* permissions instantly here. We might need to wait for
* a stat first.
*/
file = nautilus_file_get (requested_uri);
/* FIXME: nautilus_file_get never returns NULL, what
is the code below trying to do? */
if (file == NULL) {
type_string = NULL;
} else {
type_string = nautilus_file_get_string_attribute (file, "type");
nautilus_file_unref (file);
}
file = nautilus_file_get (location);
type_string = nautilus_file_get_string_attribute (file, "type");
nautilus_file_unref (file);
if (type_string == NULL) {
error_message = g_strdup_printf
(_("Couldn't display \"%s\", because Nautilus cannot handle items of this unknown type."),
@ -1294,7 +1288,7 @@ nautilus_window_end_location_change_callback (NautilusNavigationResult result_co
/* Can't create a vfs_uri and get the method from that, because
* gnome_vfs_uri_new might return NULL.
*/
scheme_string = nautilus_str_get_prefix (requested_uri, ":");
scheme_string = nautilus_str_get_prefix (location, ":");
g_assert (scheme_string != NULL); /* Shouldn't have gotten this error unless there's a : separator. */
error_message = g_strdup_printf (_("Couldn't display \"%s\", because Nautilus cannot handle %s: locations."),
uri_for_display, scheme_string);
@ -1324,7 +1318,7 @@ nautilus_window_end_location_change_callback (NautilusNavigationResult result_co
break;
case NAUTILUS_NAVIGATION_RESULT_SERVICE_NOT_AVAILABLE:
if (nautilus_is_search_uri (requested_uri)) {
if (nautilus_is_search_uri (location)) {
/* FIXME bugzilla.eazel.com 2458: Need to give
* the user better advice about what to do
* here.
@ -1342,12 +1336,12 @@ nautilus_window_end_location_change_callback (NautilusNavigationResult result_co
uri_for_display);
}
if (navi != NULL) {
if (navigation_info != NULL) {
if (window->cancel_tag != NULL) {
g_assert (window->cancel_tag == navi);
g_assert (window->cancel_tag == navigation_info);
window->cancel_tag = NULL;
}
nautilus_navigation_info_free (navi);
nautilus_navigation_info_free (navigation_info);
}
if (dialog_title == NULL) {
@ -1387,6 +1381,7 @@ nautilus_window_end_location_change_callback (NautilusNavigationResult result_co
g_free (dialog_title);
g_free (uri_for_display);
g_free (error_message);
g_free (location);
}
/*
@ -1405,7 +1400,6 @@ nautilus_window_begin_location_change (NautilusWindow *window,
NautilusLocationChangeType type,
guint distance)
{
const char *current_iid;
NautilusNavigationInfo *navigation_info;
g_assert (NAUTILUS_IS_WINDOW (window));
@ -1424,11 +1418,6 @@ nautilus_window_begin_location_change (NautilusWindow *window,
nautilus_window_allow_stop (window, TRUE);
current_iid = NULL;
if (window->content_view != NULL) {
current_iid = nautilus_view_frame_get_iid (window->content_view);
}
/* If we just set the cancel tag in the obvious way here we run into
* a problem where the cancel tag is set to point to bogus data, because
* the navigation info is freed by the callback before _new returns.
@ -1439,8 +1428,7 @@ nautilus_window_begin_location_change (NautilusWindow *window,
navigation_info = nautilus_navigation_info_new
(location,
nautilus_window_end_location_change_callback,
window,
current_iid);
window);
if (!window->location_change_end_reached) {
window->cancel_tag = navigation_info;
}
@ -1481,7 +1469,6 @@ nautilus_window_set_content_view (NautilusWindow *window, NautilusViewIdentifier
g_return_if_fail (id != NULL);
file = nautilus_file_get (window->location);
g_assert (file != NULL);
nautilus_mime_set_default_component_for_file
(file, id->iid);
nautilus_file_unref (file);