Commit 35992826 authored by Darin Adler's avatar Darin Adler
Browse files

reviewed by: Mike Engber <engber@eazel.com>

	Fixed bug 6839 (Nautilus crashes with a segmentation fault when
	clicking Edit->Nautilus Themes).

	* src/nautilus-theme-selector.c:
	(get_theme_description_and_display_name): Make a bad URI be
	non-fatal (not really needed for bug fix).
	(populate_list_with_themes): Pass the URI for the URI parameter,
	not the local path.

	Other stuff.

	* src/nautilus-sidebar.c: (nautilus_sidebar_update_buttons): Added
	a FIXME to some questionable code.
parent dd91ac61
2001-02-21 Darin Adler <darin@eazel.com>
reviewed by: Mike Engber <engber@eazel.com>
Fixed bug 6839 (Nautilus crashes with a segmentation fault when
clicking Edit->Nautilus Themes).
* src/nautilus-theme-selector.c:
(get_theme_description_and_display_name): Make a bad URI be
non-fatal (not really needed for bug fix).
(populate_list_with_themes): Pass the URI for the URI parameter,
not the local path.
Other stuff.
* src/nautilus-sidebar.c: (nautilus_sidebar_update_buttons): Added
a FIXME to some questionable code.
2001-02-21 John Harper <jsh@eazel.com>
* src/file-manager/fm-directory-view.c (activate_callback):
......
......@@ -1386,6 +1386,7 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar)
/* here is a hack to provide an "empty trash" button when displaying the trash. Eventually, we
* need a framework to allow protocols to add commands buttons */
if (nautilus_istr_has_prefix (sidebar->details->uri, "trash:")) {
/* FIXME: We don't use spaces to pad labels! */
temp_button = gtk_button_new_with_label (_(" Empty Trash "));
gtk_box_pack_start (GTK_BOX (sidebar->details->button_box),
temp_button, FALSE, FALSE, 0);
......
......@@ -1386,6 +1386,7 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar)
/* here is a hack to provide an "empty trash" button when displaying the trash. Eventually, we
* need a framework to allow protocols to add commands buttons */
if (nautilus_istr_has_prefix (sidebar->details->uri, "trash:")) {
/* FIXME: We don't use spaces to pad labels! */
temp_button = gtk_button_new_with_label (_(" Empty Trash "));
gtk_box_pack_start (GTK_BOX (sidebar->details->button_box),
temp_button, FALSE, FALSE, 0);
......
......@@ -678,8 +678,12 @@ get_theme_description_and_display_name (const char *theme_name, const char *them
theme_file_name = g_strdup_printf ("%s.xml", theme_name);
theme_local_path = gnome_vfs_get_local_path_from_uri (theme_path_uri);
theme_path = nautilus_make_path (theme_local_path, theme_file_name);
g_free (theme_local_path);
if (theme_local_path == NULL) {
theme_path = NULL;
} else {
theme_path = nautilus_make_path (theme_local_path, theme_file_name);
g_free (theme_local_path);
}
if (theme_path != NULL) {
/* read the xml document */
......@@ -798,7 +802,11 @@ add_pixbuf_to_theme_list (GtkCList *list, int row, int column, GdkPixbuf *pixbuf
/* utility to add a theme folder to the list */
static void
add_theme (NautilusThemeSelector *theme_selector, const char *theme_path_uri, const char *theme_name, const char *current_theme, int theme_index)
add_theme (NautilusThemeSelector *theme_selector,
const char *theme_path_uri,
const char *theme_name,
const char *current_theme,
int theme_index)
{
char *theme_description, *theme_display_name;
GdkPixbuf *theme_pixbuf;
......@@ -911,12 +919,11 @@ populate_list_with_themes (NautilusThemeSelector *theme_selector)
pixmap_directory = nautilus_get_pixmap_directory ();
directory_uri = gnome_vfs_get_uri_from_local_path (pixmap_directory);
g_free (pixmap_directory);
/* add a theme element for the default theme */
current_theme = nautilus_theme_get_theme();
add_theme (theme_selector, pixmap_directory, "default", current_theme, index++);
g_free (pixmap_directory);
add_theme (theme_selector, directory_uri, "default", current_theme, index++);
g_free (current_theme);
/* process the built-in themes */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment