summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2001-03-21 22:04:28 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2001-03-21 22:04:28 +0000
commitbdc797f249fce380178ced44788b00b0328f573e (patch)
tree4d37dae2dde7e2ae34d4d760d5ce6e6b7c51928a
parenta30a94600e60ce44d79fe59bb7b813d12ad321de (diff)
downloadnautilus-bdc797f249fce380178ced44788b00b0328f573e.tar.gz
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bug 7686 - nautilus crashing on startup with the hu_HU (Hungarian) locale (and probably other locales as well) * libnautilus-extensions/nautilus-gdk-font-extensions.c: (nautilus_gdk_font_get_fixed): The issue is that it is lame to use the localization system to pick a default font. We have to do better in 1.2. Bugs 7204 and 7345 have details about this. For 1.0, we make Nautilus' default font finding code more robust by trying unlocalized 'font sets' and 'fonts' if a localized font cannot be found. If the localized fixed font failed to load, then we try an unlocalized fixed font. This (in theory) should always work but it does not for some locales (hu_HU for example) If we still were not able to load the font set, then try just the "fixed" font which in theory always be available regardless of x server font setup or locale.
-rw-r--r--ChangeLog25
-rw-r--r--libnautilus-extensions/nautilus-gdk-font-extensions.c28
-rw-r--r--libnautilus-private/nautilus-gdk-font-extensions.c28
3 files changed, 81 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ab45da11..6011d3ee6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2001-03-21 Ramiro Estrugo <ramiro@eazel.com>
+
+ reviewed by: Pavel Cisler <pavel@eazel.com>
+
+ Fix bug 7686 - nautilus crashing on startup with the hu_HU
+ (Hungarian) locale (and probably other locales as well)
+
+ * libnautilus-extensions/nautilus-gdk-font-extensions.c:
+ (nautilus_gdk_font_get_fixed):
+ The issue is that it is lame to use the localization system to
+ pick a default font. We have to do better in 1.2. Bugs 7204
+ and 7345 have details about this.
+
+ For 1.0, we make Nautilus' default font finding code more robust
+ by trying unlocalized 'font sets' and 'fonts' if a
+ localized font cannot be found.
+
+ If the localized fixed font failed to load, then we try an
+ unlocalized fixed font. This (in theory) should always work but
+ it does not for some locales (hu_HU for example)
+
+ If we still were not able to load the font set, then try just the
+ "fixed" font which in theory always be available regardless of x
+ server font setup or locale.
+
2001-03-19 Robin * Slomkowski <rslomkow@eazel.com>
* components/music/Makefile.am: added non-i386 files
diff --git a/libnautilus-extensions/nautilus-gdk-font-extensions.c b/libnautilus-extensions/nautilus-gdk-font-extensions.c
index 19be1d30d..cba48c48f 100644
--- a/libnautilus-extensions/nautilus-gdk-font-extensions.c
+++ b/libnautilus-extensions/nautilus-gdk-font-extensions.c
@@ -954,6 +954,34 @@ nautilus_gdk_font_get_fixed (void)
* to exist, * even in the most limited user environment
*/
fixed_font = gdk_fontset_load (_("fixed"));
+
+ /* FIXME bugzilla.eazel.com 7204:
+ * Bug 7345 is related too. The issue is that it is lame to
+ * use the localization system to pick a default font. We have
+ * to do better in 1.2. The bugs above have details about this.
+ *
+ * For 1.0, we make Nautilus' default font finding code more
+ * robust by trying unlocalized 'font sets' and 'fonts' if a
+ * localized font cannot be found.
+ */
+
+ /* If the localized fixed font failed to load, then
+ * try an unlocalized fixed font. This (in theory)
+ * should always work but it does not for some
+ * locales (hu_HU for example)
+ */
+ if (fixed_font == NULL) {
+ fixed_font = gdk_fontset_load ("fixed");
+ }
+
+ /* If we still were not able to load the font set, then
+ * try just the "fixed" font which in theory always will
+ * be available regardless of x server font setup or
+ * locale.
+ */
+ if (fixed_font == NULL) {
+ fixed_font = gdk_font_load ("fixed");
+ }
g_assert (fixed_font != NULL);
g_atexit (unref_fixed_font);
}
diff --git a/libnautilus-private/nautilus-gdk-font-extensions.c b/libnautilus-private/nautilus-gdk-font-extensions.c
index 19be1d30d..cba48c48f 100644
--- a/libnautilus-private/nautilus-gdk-font-extensions.c
+++ b/libnautilus-private/nautilus-gdk-font-extensions.c
@@ -954,6 +954,34 @@ nautilus_gdk_font_get_fixed (void)
* to exist, * even in the most limited user environment
*/
fixed_font = gdk_fontset_load (_("fixed"));
+
+ /* FIXME bugzilla.eazel.com 7204:
+ * Bug 7345 is related too. The issue is that it is lame to
+ * use the localization system to pick a default font. We have
+ * to do better in 1.2. The bugs above have details about this.
+ *
+ * For 1.0, we make Nautilus' default font finding code more
+ * robust by trying unlocalized 'font sets' and 'fonts' if a
+ * localized font cannot be found.
+ */
+
+ /* If the localized fixed font failed to load, then
+ * try an unlocalized fixed font. This (in theory)
+ * should always work but it does not for some
+ * locales (hu_HU for example)
+ */
+ if (fixed_font == NULL) {
+ fixed_font = gdk_fontset_load ("fixed");
+ }
+
+ /* If we still were not able to load the font set, then
+ * try just the "fixed" font which in theory always will
+ * be available regardless of x server font setup or
+ * locale.
+ */
+ if (fixed_font == NULL) {
+ fixed_font = gdk_font_load ("fixed");
+ }
g_assert (fixed_font != NULL);
g_atexit (unref_fixed_font);
}