summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog70
-rw-r--r--ChangeLog-200102012
-rw-r--r--libnautilus-extensions/nautilus-icon-factory.c71
-rw-r--r--libnautilus-extensions/nautilus-string.h2
-rw-r--r--libnautilus-private/nautilus-icon-factory.c71
-rw-r--r--libnautilus-private/nautilus-string.h2
-rw-r--r--libnautilus/nautilus-idle-queue.c14
-rw-r--r--librsvg/rsvg-ft.c64
-rw-r--r--src/nautilus-theme-selector.c1
-rw-r--r--src/nautilus-window-manage-views.c2
10 files changed, 193 insertions, 106 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ad275a42..4483041cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,50 @@
+2001-02-13 Darin Adler <darin@eazel.com>
+
+ reviewed by: John Sullivan <sullivan@eazel.com>
+
+ Fix bug 6408 (nautilus_view_report_load_failed causes Nautilus to
+ segfault in an idle callback):
+
+ * libnautilus/nautilus-idle-queue.c: (execute_queued_functions),
+ (nautilus_idle_queue_destroy): Changed the idle queue so it can
+ handle being destroyed while inside one of the queued functions.
+
+ Fix bug 6402 (Click desktop icon -> Nautilus window not moved to
+ front):
+
+ * src/nautilus-window-manage-views.c: (open_location): Bring the
+ existing window up when it's reused in the "open icon on desktop"
+ in single-window mode.
+
+ Other changes:
+
+ * libnautilus-extensions/nautilus-icon-factory.c:
+ (is_theme_in_user_directory): Rename from "check_local_theme"
+ and changed it to use a normal function result instead of taking
+ a gboolean pointer.
+ (set_theme): Use new function and booleans by their new names.
+ "in_user_directory" instead of "local".
+ (make_full_icon_path): Just the name change.
+ (get_themed_icon_file_path): Take a boolean parameter instead of
+ trying to figure out if the theme is in the user directory, because
+ the old way would get it wrong for the default theme.
+ (get_icon_file_path): Pass in the boolean to say if the theme is
+ in the user directory or not.
+
+ * libnautilus-extensions/nautilus-string.h: Remove repeated
+ declaration for nautilus_str_get_prefix.
+
+ (These not reviewed:)
+
+ * librsvg/rsvg-ft.c: (rsvg_ft_glyph_evict): Fix code that was
+ looking at the "prev" pointer of a victim after freeing it. Also
+ made some other code simplifications.
+
+ * src/nautilus-theme-selector.c:
+ (render_theme_name_and_description): Added an explicit call to
+ gtk_widget_realize before grabbing the style field and expecting
+ it to have gc's in it. Not sure why no one ran into this before.
+
2001-02-13 Eric Fischer <eric@eazel.com>
* configure.in:
@@ -494,10 +541,10 @@
reviewed by: Ali Abdin <aliabdin@aucegypt.edu>
* components/help/converters/gnome-db2html2/gdb3html.h
- * /components/help/converters/gnome-db2html2/sect-elements.c
- * /components/help/converters/gnome-db2html2/sect-elements.h
- * /components/help/converters/gnome-db2html2/sect-preparse.c
- * /components/help/converters/gnome-db2html2/toc-elements.c
+ * components/help/converters/gnome-db2html2/sect-elements.c
+ * components/help/converters/gnome-db2html2/sect-elements.h
+ * components/help/converters/gnome-db2html2/sect-preparse.c
+ * components/help/converters/gnome-db2html2/toc-elements.c
add support for <bridgehead> tag in DocBook, fix bug #6492
2001-02-11 Rebecca Schulman <rebecka@eazel.com>
@@ -671,7 +718,7 @@
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize),
(nautilus_rpm_view_update_from_uri):
- made it us nautilus_image so the package image is anti-aliased
+ made it use nautilus_image so the package image is anti-aliased
2001-02-09 John Sullivan <sullivan@eazel.com>
@@ -1205,7 +1252,7 @@
at the DOM event level, notification to Nautilus of navigation is done
as a result of the "location" signal
- Introduces/aggrevates these bugs:
+ Introduces/aggravates these bugs:
6435 No history recorded when using report_location_change
6436 Throbber doesn't throb when using report_location_change
@@ -1240,8 +1287,8 @@
2001-02-08 Fatih Demir <kabalak@kabalak.net>
* components/services/install/lib/eazel-package-system-rpm3.c:
- Include locale.h as you use localeconv() without including
- it -- bad on debian...
+ Include locale.h as you use localeconv() without including
+ it -- bad on debian...
2001-02-08 John Sullivan <sullivan@eazel.com>
@@ -1277,30 +1324,27 @@
true in this case.)
2001-02-08 Laszlo Kovacs <laszlo.kovacs@sun.com>
- * components/help/Makefile.am:
+ * components/help/Makefile.am:
Man page map file moved to new hyperbola data
directory.
* components/help/hyperbola-filefmt.c:
-
Compiler warnings fixed
2001-02-08 Laszlo Kovacs <laszlo.kovacs@sun.com>
- * components/help/hyperbola-filefmt.c:
+ * components/help/hyperbola-filefmt.c:
Toplevel document support added. Docs specified in
$(prefix)/share/nautilus/components/hyperbola/topleveldocs.xml
will be added to the toplevel section of the help tree if
Scrollkeeper is enabled
* components/help/Makefile.am:
-
topleveldocs.xml installed and hyperbola data directory
changed to $(prefix)/share/nautilus/components/hyperbola
* components/help/topleveldocs.xml:
-
new xml file holding the docs that go into the toplevel
section of the help tree
diff --git a/ChangeLog-20010201 b/ChangeLog-20010201
index ff5d31ed6..e913a75b7 100644
--- a/ChangeLog-20010201
+++ b/ChangeLog-20010201
@@ -542,7 +542,7 @@
* librsvg/rsvg-ft.c: (rsvg_ft_glyph_evict),
(rsvg_ft_glyph_insert), (rsvg_ft_measure_or_render_string):
Refactored to use a high water mark based eviction rather then a
- limit and to evict with respects to that mark. *
+ limit and to evict with respect to that mark.
2001-01-31 Maciej Stachowiak <mjs@eazel.com>
diff --git a/libnautilus-extensions/nautilus-icon-factory.c b/libnautilus-extensions/nautilus-icon-factory.c
index 553e1819a..8cd4b1d4b 100644
--- a/libnautilus-extensions/nautilus-icon-factory.c
+++ b/libnautilus-extensions/nautilus-icon-factory.c
@@ -162,13 +162,11 @@ typedef struct {
/* name of current theme */
char *theme_name;
+ gboolean theme_is_in_user_directory;
/* name of default theme, so it can be delegated */
char *default_theme_name;
-
- /* the local_theme boolean is set if the theme was user-added (lives in ~/.nautilus) */
- gboolean local_theme;
- gboolean local_default_theme;
+ gboolean default_theme_is_in_user_directory;
/* A hash table so we pass out the same scalable icon pointer
* every time someone asks for the same icon. Scalable icons
@@ -689,26 +687,28 @@ nautilus_icon_factory_remove_by_uri (const char *image_uri)
(gpointer) image_uri);
}
-/* utility to check if a theme is local or not */
-static void
-check_local_theme (const char *theme_name, gboolean *result_ptr)
+/* utility to check if a theme is in user directory or not */
+static gboolean
+is_theme_in_user_directory (const char *theme_name)
{
char *user_directory, *themes_directory, *this_theme_directory;
+ gboolean result;
if (theme_name == NULL) {
- *result_ptr = FALSE;
- return;
+ return FALSE;
}
user_directory = nautilus_get_user_directory ();
themes_directory = nautilus_make_path (user_directory, "themes");
this_theme_directory = nautilus_make_path (themes_directory, theme_name);
- *result_ptr = g_file_exists (this_theme_directory);
+ result = g_file_exists (this_theme_directory);
g_free (user_directory);
g_free (themes_directory);
g_free (this_theme_directory);
+
+ return result;
}
/* Change the theme. */
@@ -727,12 +727,13 @@ set_theme (const char *theme_name)
g_free (factory->theme_name);
factory->theme_name = g_strdup (theme_name);
- check_local_theme (theme_name, &factory->local_theme);
+ factory->theme_is_in_user_directory = is_theme_in_user_directory (theme_name);
/* now set up the default theme */
g_free (factory->default_theme_name);
factory->default_theme_name = nautilus_theme_get_theme_data ("icon-images", "default_theme");
- check_local_theme (factory->default_theme_name, &factory->local_default_theme);
+ factory->default_theme_is_in_user_directory = is_theme_in_user_directory
+ (factory->default_theme_name);
/* we changed the theme, so emit the icons_changed signal */
gtk_signal_emit (GTK_OBJECT (factory),
@@ -840,7 +841,9 @@ nautilus_icon_factory_get_icon_name_for_file (NautilusFile *file)
}
static char *
-make_full_icon_path (const char *path, const char *suffix, gboolean local_theme)
+make_full_icon_path (const char *path,
+ const char *suffix,
+ gboolean theme_is_in_user_directory)
{
char *partial_path, *full_path;
char *user_directory, *themes_directory;
@@ -849,9 +852,9 @@ make_full_icon_path (const char *path, const char *suffix, gboolean local_theme)
return g_strconcat (path, suffix, NULL);
}
- /* Build a path for this icon, depending on the local_theme boolean. */
+ /* Build a path for this icon, depending on the theme_is_in_user_directory boolean. */
partial_path = g_strconcat (path, suffix, NULL);
- if (local_theme) {
+ if (theme_is_in_user_directory) {
user_directory = nautilus_get_user_directory ();
themes_directory = nautilus_make_path (user_directory, "themes");
full_path = nautilus_make_path (themes_directory, partial_path);
@@ -900,6 +903,7 @@ parse_attach_points (NautilusEmblemAttachPoints *attach_points, const char *atta
*/
static char *
get_themed_icon_file_path (const char *theme_name,
+ gboolean theme_is_in_user_directory,
const char *icon_name,
guint icon_size,
gboolean aa_mode,
@@ -914,7 +918,6 @@ get_themed_icon_file_path (const char *theme_name,
ArtIRect parsed_rect;
NautilusIconFactory *factory;
char *user_directory;
- gboolean local_theme;
g_assert (icon_name != NULL);
@@ -926,7 +929,6 @@ get_themed_icon_file_path (const char *theme_name,
include_size = icon_size != NAUTILUS_ICON_SIZE_STANDARD;
factory = get_icon_factory ();
- local_theme = factory->local_theme && theme_name != NULL;
/* Try each suffix. */
for (i = 0; i < NAUTILUS_N_ELEMENTS (icon_file_name_suffixes); i++) {
@@ -943,7 +945,8 @@ get_themed_icon_file_path (const char *theme_name,
if (aa_mode) {
aa_path = g_strconcat (partial_path, "-aa", NULL);
path = make_full_icon_path (aa_path,
- icon_file_name_suffixes[i], local_theme);
+ icon_file_name_suffixes[i],
+ theme_is_in_user_directory);
g_free (aa_path);
/* Return the path if the file exists. */
@@ -956,7 +959,8 @@ get_themed_icon_file_path (const char *theme_name,
}
path = make_full_icon_path (partial_path,
- icon_file_name_suffixes[i], local_theme);
+ icon_file_name_suffixes[i],
+ theme_is_in_user_directory);
g_free (partial_path);
/* Return the path if the file exists. */
@@ -971,7 +975,9 @@ get_themed_icon_file_path (const char *theme_name,
if (path != NULL && details != NULL) {
memset (&details->text_rect, 0, sizeof (details->text_rect));
- xml_path = make_full_icon_path (themed_icon_name, ".xml", local_theme);
+ xml_path = make_full_icon_path (themed_icon_name,
+ ".xml",
+ theme_is_in_user_directory);
doc = xmlParseFile (xml_path);
g_free (xml_path);
@@ -1045,8 +1051,9 @@ get_icon_file_path (const char *name,
gboolean aa_mode,
IconDetails *details)
{
- NautilusIconFactory *icon_factory;
+ NautilusIconFactory *factory;
const char *theme_to_use;
+ gboolean theme_is_in_user_directory;
char *path;
char *name_with_modifier;
@@ -1054,32 +1061,36 @@ get_icon_file_path (const char *name,
return NULL;
}
- icon_factory = get_icon_factory ();
+ factory = get_icon_factory ();
theme_to_use = NULL;
-
+ theme_is_in_user_directory = FALSE;
/* Check and see if there is a theme icon to use.
* If there's a default theme specified, try it, too.
* This decision must be based on whether there's a non-size-
* specific theme icon.
*/
- if (icon_factory->theme_name != NULL) {
- path = get_themed_icon_file_path (icon_factory->theme_name,
+ if (factory->theme_name != NULL) {
+ path = get_themed_icon_file_path (factory->theme_name,
+ factory->theme_is_in_user_directory,
name,
NAUTILUS_ICON_SIZE_STANDARD,
aa_mode,
details);
if (path != NULL) {
- theme_to_use = icon_factory->theme_name;
+ theme_to_use = factory->theme_name;
+ theme_is_in_user_directory = factory->theme_is_in_user_directory;
g_free (path);
- } else if (icon_factory->default_theme_name != NULL) {
- path = get_themed_icon_file_path (icon_factory->default_theme_name,
+ } else if (factory->default_theme_name != NULL) {
+ path = get_themed_icon_file_path (factory->default_theme_name,
+ factory->default_theme_is_in_user_directory,
name,
NAUTILUS_ICON_SIZE_STANDARD,
aa_mode,
details);
if (path != NULL) {
- theme_to_use = icon_factory->default_theme_name;
+ theme_to_use = factory->default_theme_name;
+ theme_is_in_user_directory = factory->default_theme_is_in_user_directory;
g_free (path);
}
}
@@ -1091,6 +1102,7 @@ get_icon_file_path (const char *name,
if (modifier && modifier[0] != '\0') {
name_with_modifier = g_strconcat (name, "-", modifier, NULL);
path = get_themed_icon_file_path (theme_to_use,
+ theme_is_in_user_directory,
name_with_modifier,
size_in_pixels,
aa_mode,
@@ -1102,6 +1114,7 @@ get_icon_file_path (const char *name,
}
return get_themed_icon_file_path (theme_to_use,
+ theme_is_in_user_directory,
name,
size_in_pixels,
aa_mode,
diff --git a/libnautilus-extensions/nautilus-string.h b/libnautilus-extensions/nautilus-string.h
index af1c68d51..d4e128bae 100644
--- a/libnautilus-extensions/nautilus-string.h
+++ b/libnautilus-extensions/nautilus-string.h
@@ -76,8 +76,6 @@ gboolean nautilus_str_has_suffix (const char *target,
const char *suffix);
gboolean nautilus_istr_has_suffix (const char *target,
const char *suffix);
-char * nautilus_str_get_prefix (const char *source,
- const char *delimiter);
char * nautilus_str_strip_chr (const char *str,
char remove_this);
char * nautilus_str_strip_trailing_chr (const char *str,
diff --git a/libnautilus-private/nautilus-icon-factory.c b/libnautilus-private/nautilus-icon-factory.c
index 553e1819a..8cd4b1d4b 100644
--- a/libnautilus-private/nautilus-icon-factory.c
+++ b/libnautilus-private/nautilus-icon-factory.c
@@ -162,13 +162,11 @@ typedef struct {
/* name of current theme */
char *theme_name;
+ gboolean theme_is_in_user_directory;
/* name of default theme, so it can be delegated */
char *default_theme_name;
-
- /* the local_theme boolean is set if the theme was user-added (lives in ~/.nautilus) */
- gboolean local_theme;
- gboolean local_default_theme;
+ gboolean default_theme_is_in_user_directory;
/* A hash table so we pass out the same scalable icon pointer
* every time someone asks for the same icon. Scalable icons
@@ -689,26 +687,28 @@ nautilus_icon_factory_remove_by_uri (const char *image_uri)
(gpointer) image_uri);
}
-/* utility to check if a theme is local or not */
-static void
-check_local_theme (const char *theme_name, gboolean *result_ptr)
+/* utility to check if a theme is in user directory or not */
+static gboolean
+is_theme_in_user_directory (const char *theme_name)
{
char *user_directory, *themes_directory, *this_theme_directory;
+ gboolean result;
if (theme_name == NULL) {
- *result_ptr = FALSE;
- return;
+ return FALSE;
}
user_directory = nautilus_get_user_directory ();
themes_directory = nautilus_make_path (user_directory, "themes");
this_theme_directory = nautilus_make_path (themes_directory, theme_name);
- *result_ptr = g_file_exists (this_theme_directory);
+ result = g_file_exists (this_theme_directory);
g_free (user_directory);
g_free (themes_directory);
g_free (this_theme_directory);
+
+ return result;
}
/* Change the theme. */
@@ -727,12 +727,13 @@ set_theme (const char *theme_name)
g_free (factory->theme_name);
factory->theme_name = g_strdup (theme_name);
- check_local_theme (theme_name, &factory->local_theme);
+ factory->theme_is_in_user_directory = is_theme_in_user_directory (theme_name);
/* now set up the default theme */
g_free (factory->default_theme_name);
factory->default_theme_name = nautilus_theme_get_theme_data ("icon-images", "default_theme");
- check_local_theme (factory->default_theme_name, &factory->local_default_theme);
+ factory->default_theme_is_in_user_directory = is_theme_in_user_directory
+ (factory->default_theme_name);
/* we changed the theme, so emit the icons_changed signal */
gtk_signal_emit (GTK_OBJECT (factory),
@@ -840,7 +841,9 @@ nautilus_icon_factory_get_icon_name_for_file (NautilusFile *file)
}
static char *
-make_full_icon_path (const char *path, const char *suffix, gboolean local_theme)
+make_full_icon_path (const char *path,
+ const char *suffix,
+ gboolean theme_is_in_user_directory)
{
char *partial_path, *full_path;
char *user_directory, *themes_directory;
@@ -849,9 +852,9 @@ make_full_icon_path (const char *path, const char *suffix, gboolean local_theme)
return g_strconcat (path, suffix, NULL);
}
- /* Build a path for this icon, depending on the local_theme boolean. */
+ /* Build a path for this icon, depending on the theme_is_in_user_directory boolean. */
partial_path = g_strconcat (path, suffix, NULL);
- if (local_theme) {
+ if (theme_is_in_user_directory) {
user_directory = nautilus_get_user_directory ();
themes_directory = nautilus_make_path (user_directory, "themes");
full_path = nautilus_make_path (themes_directory, partial_path);
@@ -900,6 +903,7 @@ parse_attach_points (NautilusEmblemAttachPoints *attach_points, const char *atta
*/
static char *
get_themed_icon_file_path (const char *theme_name,
+ gboolean theme_is_in_user_directory,
const char *icon_name,
guint icon_size,
gboolean aa_mode,
@@ -914,7 +918,6 @@ get_themed_icon_file_path (const char *theme_name,
ArtIRect parsed_rect;
NautilusIconFactory *factory;
char *user_directory;
- gboolean local_theme;
g_assert (icon_name != NULL);
@@ -926,7 +929,6 @@ get_themed_icon_file_path (const char *theme_name,
include_size = icon_size != NAUTILUS_ICON_SIZE_STANDARD;
factory = get_icon_factory ();
- local_theme = factory->local_theme && theme_name != NULL;
/* Try each suffix. */
for (i = 0; i < NAUTILUS_N_ELEMENTS (icon_file_name_suffixes); i++) {
@@ -943,7 +945,8 @@ get_themed_icon_file_path (const char *theme_name,
if (aa_mode) {
aa_path = g_strconcat (partial_path, "-aa", NULL);
path = make_full_icon_path (aa_path,
- icon_file_name_suffixes[i], local_theme);
+ icon_file_name_suffixes[i],
+ theme_is_in_user_directory);
g_free (aa_path);
/* Return the path if the file exists. */
@@ -956,7 +959,8 @@ get_themed_icon_file_path (const char *theme_name,
}
path = make_full_icon_path (partial_path,
- icon_file_name_suffixes[i], local_theme);
+ icon_file_name_suffixes[i],
+ theme_is_in_user_directory);
g_free (partial_path);
/* Return the path if the file exists. */
@@ -971,7 +975,9 @@ get_themed_icon_file_path (const char *theme_name,
if (path != NULL && details != NULL) {
memset (&details->text_rect, 0, sizeof (details->text_rect));
- xml_path = make_full_icon_path (themed_icon_name, ".xml", local_theme);
+ xml_path = make_full_icon_path (themed_icon_name,
+ ".xml",
+ theme_is_in_user_directory);
doc = xmlParseFile (xml_path);
g_free (xml_path);
@@ -1045,8 +1051,9 @@ get_icon_file_path (const char *name,
gboolean aa_mode,
IconDetails *details)
{
- NautilusIconFactory *icon_factory;
+ NautilusIconFactory *factory;
const char *theme_to_use;
+ gboolean theme_is_in_user_directory;
char *path;
char *name_with_modifier;
@@ -1054,32 +1061,36 @@ get_icon_file_path (const char *name,
return NULL;
}
- icon_factory = get_icon_factory ();
+ factory = get_icon_factory ();
theme_to_use = NULL;
-
+ theme_is_in_user_directory = FALSE;
/* Check and see if there is a theme icon to use.
* If there's a default theme specified, try it, too.
* This decision must be based on whether there's a non-size-
* specific theme icon.
*/
- if (icon_factory->theme_name != NULL) {
- path = get_themed_icon_file_path (icon_factory->theme_name,
+ if (factory->theme_name != NULL) {
+ path = get_themed_icon_file_path (factory->theme_name,
+ factory->theme_is_in_user_directory,
name,
NAUTILUS_ICON_SIZE_STANDARD,
aa_mode,
details);
if (path != NULL) {
- theme_to_use = icon_factory->theme_name;
+ theme_to_use = factory->theme_name;
+ theme_is_in_user_directory = factory->theme_is_in_user_directory;
g_free (path);
- } else if (icon_factory->default_theme_name != NULL) {
- path = get_themed_icon_file_path (icon_factory->default_theme_name,
+ } else if (factory->default_theme_name != NULL) {
+ path = get_themed_icon_file_path (factory->default_theme_name,
+ factory->default_theme_is_in_user_directory,
name,
NAUTILUS_ICON_SIZE_STANDARD,
aa_mode,
details);
if (path != NULL) {
- theme_to_use = icon_factory->default_theme_name;
+ theme_to_use = factory->default_theme_name;
+ theme_is_in_user_directory = factory->default_theme_is_in_user_directory;
g_free (path);
}
}
@@ -1091,6 +1102,7 @@ get_icon_file_path (const char *name,
if (modifier && modifier[0] != '\0') {
name_with_modifier = g_strconcat (name, "-", modifier, NULL);
path = get_themed_icon_file_path (theme_to_use,
+ theme_is_in_user_directory,
name_with_modifier,
size_in_pixels,
aa_mode,
@@ -1102,6 +1114,7 @@ get_icon_file_path (const char *name,
}
return get_themed_icon_file_path (theme_to_use,
+ theme_is_in_user_directory,
name,
size_in_pixels,
aa_mode,
diff --git a/libnautilus-private/nautilus-string.h b/libnautilus-private/nautilus-string.h
index af1c68d51..d4e128bae 100644
--- a/libnautilus-private/nautilus-string.h
+++ b/libnautilus-private/nautilus-string.h
@@ -76,8 +76,6 @@ gboolean nautilus_str_has_suffix (const char *target,
const char *suffix);
gboolean nautilus_istr_has_suffix (const char *target,
const char *suffix);
-char * nautilus_str_get_prefix (const char *source,
- const char *delimiter);
char * nautilus_str_strip_chr (const char *str,
char remove_this);
char * nautilus_str_strip_trailing_chr (const char *str,
diff --git a/libnautilus/nautilus-idle-queue.c b/libnautilus/nautilus-idle-queue.c
index e2e3ac50c..11cb8d275 100644
--- a/libnautilus/nautilus-idle-queue.c
+++ b/libnautilus/nautilus-idle-queue.c
@@ -31,6 +31,8 @@
struct NautilusIdleQueue {
GList *functions;
guint idle_id;
+ gboolean in_idle;
+ gboolean destroy;
};
typedef struct {
@@ -52,6 +54,7 @@ execute_queued_functions (gpointer callback_data)
/* We could receive more incoming functions while dispatching
* these, so keep going until the queue is empty.
*/
+ queue->in_idle = TRUE;
while (queue->functions != NULL) {
functions = g_list_reverse (queue->functions);
queue->functions = NULL;
@@ -67,8 +70,14 @@ execute_queued_functions (gpointer callback_data)
g_list_free (functions);
}
+ queue->in_idle = FALSE;
queue->idle_id = 0;
+
+ if (queue->destroy) {
+ nautilus_idle_queue_destroy (queue);
+ }
+
return FALSE;
}
@@ -106,6 +115,11 @@ nautilus_idle_queue_destroy (NautilusIdleQueue *queue)
GList *node;
QueuedFunction *function;
+ if (queue->in_idle) {
+ queue->destroy = TRUE;
+ return;
+ }
+
for (node = queue->functions; node != NULL; node = node->next) {
function = node->data;
diff --git a/librsvg/rsvg-ft.c b/librsvg/rsvg-ft.c
index f551d38c9..53cd3e391 100644
--- a/librsvg/rsvg-ft.c
+++ b/librsvg/rsvg-ft.c
@@ -208,37 +208,41 @@ rsvg_ft_glyph_bytes (RsvgFTGlyph *glyph)
static void
rsvg_ft_glyph_evict (RsvgFTCtx *ctx, int amount_to_evict)
{
- RsvgFTGlyphCacheEntry *victim;
+ RsvgFTGlyphCacheEntry *victim, *prev;
RsvgFTGlyph *glyph;
- int evicted_so_far = 0;
-
- for (victim = ctx->glyph_last; victim != NULL; victim = victim->prev) {
- if (victim->glyph->refcnt == 1) {
- evicted_so_far += rsvg_ft_glyph_bytes (victim->glyph);
-
- if (victim->prev != NULL) {
- victim->prev->next = victim->next;
- }
- else {
- ctx->glyph_first = victim->next;
- }
- if (victim->next != NULL) {
- victim->next->prev = victim->prev;
- } else {
- ctx->glyph_last = victim->prev;
- }
-
- glyph = victim->glyph;
- ctx->glyph_bytes -= rsvg_ft_glyph_bytes (glyph);
- rsvg_ft_glyph_unref (glyph);
-
- g_hash_table_remove (ctx->glyph_hash_table, victim->desc);
- g_free (victim->desc);
- g_free (victim);
-
- if (evicted_so_far >= amount_to_evict) {
- break;
- }
+ int glyph_bytes, evicted_so_far;
+
+ evicted_so_far = 0;
+ for (victim = ctx->glyph_last; victim != NULL; victim = prev) {
+ prev = victim->prev;
+ glyph = victim->glyph;
+
+ if (glyph->refcnt != 1) {
+ continue;
+ }
+
+ if (victim->prev != NULL) {
+ victim->prev->next = victim->next;
+ } else {
+ ctx->glyph_first = victim->next;
+ }
+ if (victim->next != NULL) {
+ victim->next->prev = victim->prev;
+ } else {
+ ctx->glyph_last = victim->prev;
+ }
+
+ glyph_bytes = rsvg_ft_glyph_bytes (glyph);
+ ctx->glyph_bytes -= glyph_bytes;
+ rsvg_ft_glyph_unref (glyph);
+
+ g_hash_table_remove (ctx->glyph_hash_table, victim->desc);
+ g_free (victim->desc);
+ g_free (victim);
+
+ evicted_so_far += glyph_bytes;
+ if (evicted_so_far >= amount_to_evict) {
+ break;
}
}
}
diff --git a/src/nautilus-theme-selector.c b/src/nautilus-theme-selector.c
index 27030f6a4..3dd002290 100644
--- a/src/nautilus-theme-selector.c
+++ b/src/nautilus-theme-selector.c
@@ -735,6 +735,7 @@ render_theme_name_and_description (GtkWidget *widget, const char *theme_name, co
visual = gdk_visual_get_system ();
/* allocate the fonts and measure the text so we know how big a pixmap to allocate */
+ gtk_widget_realize (widget);
style = widget->style;
big_font = nautilus_gdk_font_get_larger (style->font, 6);
small_font = nautilus_gdk_font_get_smaller (style->font, 3);
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index fec1a5166..7e6486658 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -663,6 +663,8 @@ open_location (NautilusWindow *window,
target_window = get_topmost_nautilus_window ();
if (target_window == window) {
create_new_window = TRUE;
+ } else {
+ nautilus_gtk_window_present (GTK_WINDOW (target_window));
}
}