gnome-web-photo r105 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-web-photo r105 - trunk/src
- Date: Sun, 24 Feb 2008 18:10:11 +0000 (GMT)
Author: chpe
Date: Sun Feb 24 18:10:11 2008
New Revision: 105
URL: http://svn.gnome.org/viewvc/gnome-web-photo?rev=105&view=rev
Log:
Don't fail to init gecko if we don't have the default font values, or they're invalid. Instead parse the default font names. Based on a patch by Gauvain Pocentek <gauvainpocentek gmail com>.
Modified:
trunk/src/Prefs.cpp
Modified: trunk/src/Prefs.cpp
==============================================================================
--- trunk/src/Prefs.cpp (original)
+++ trunk/src/Prefs.cpp Sun Feb 24 18:10:11 2008
@@ -74,6 +74,8 @@
#define GNOME_VARIABLE_FONT_KEY "/desktop/gnome/interface/document_font_name"
#define GNOME_MONOSPACE_FONT_KEY "/desktop/gnome/interface/monospace_font_name"
#define EPHY_FONT_DIR "/apps/epiphany/web"
+#define DEFAULT_VAR_FONT "Sans 10"
+#define DEFAULT_MONO_FONT "Monospace 10"
#define DEFAULT_MIN_SIZE 7
static PRBool
@@ -122,12 +124,15 @@
char *defaultFontVar = gconf_client_get_string (client, GNOME_VARIABLE_FONT_KEY, NULL);
char *defaultFontMono = gconf_client_get_string (client, GNOME_MONOSPACE_FONT_KEY, NULL);
- if (!defaultFontVar || !defaultFontMono) return PR_FALSE;
char *defaultFont[2] = { nsnull, nsnull };
int defaultSize[2] = { 0, 0 };
- if (!ParsePangoFont (defaultFontVar, &defaultFont[0], &defaultSize[0]) ||
- !ParsePangoFont (defaultFontMono, &defaultFont[1], &defaultSize[1])) return PR_FALSE;
+ if (!defaultFontVar ||
+ !ParsePangoFont (defaultFontVar, &defaultFont[0], &defaultSize[0]))
+ ParsePangoFont (DEFAULT_VAR_FONT, &defaultFont[0], &defaultSize[0]);
+ if (!defaultFontMono||
+ !ParsePangoFont (defaultFontMono, &defaultFont[1], &defaultSize[1]))
+ ParsePangoFont (DEFAULT_MONO_FONT, &defaultFont[1], &defaultSize[1]);
g_free (defaultFontVar);
g_free (defaultFontMono);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]