gtkhtml r8832 - trunk/components/editor
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkhtml r8832 - trunk/components/editor
- Date: Thu, 24 Apr 2008 18:20:49 +0100 (BST)
Author: mbarnes
Date: Thu Apr 24 17:20:49 2008
New Revision: 8832
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=8832&view=rev
Log:
2008-04-24 Matthew Barnes <mbarnes redhat com>
** Related to bug #525996
* gtkhtml-editor-private.c (gtkhtml_editor_find_data_file):
Look for data files in our own installation prefix, to make
running local builds easier.
Modified:
trunk/components/editor/ChangeLog
trunk/components/editor/Makefile.am
trunk/components/editor/gtkhtml-editor-private.c
Modified: trunk/components/editor/Makefile.am
==============================================================================
--- trunk/components/editor/Makefile.am (original)
+++ trunk/components/editor/Makefile.am Thu Apr 24 17:20:49 2008
@@ -11,6 +11,7 @@
-I$(top_srcdir)/gtkhtml \
-I$(top_srcdir)/components/editor \
-DG_LOG_DOMAIN=\"gtkhtml-editor\" \
+ -DDATADIR=\""$(datadir)"\" \
-DLOCALEDIR=\""$(datadir)/locale/"\" \
-DICONDIR=\""$(gtkhtml_data)/icons"\" \
-DHAVE_CONFIG_H
Modified: trunk/components/editor/gtkhtml-editor-private.c
==============================================================================
--- trunk/components/editor/gtkhtml-editor-private.c (original)
+++ trunk/components/editor/gtkhtml-editor-private.c Thu Apr 24 17:20:49 2008
@@ -403,6 +403,14 @@
return filename;
g_free (filename);
+ /* Check our own installation prefix. */
+ filename = g_build_filename (
+ DATADIR, GTKHTML_RELEASE_STRING, basename, NULL);
+ if (g_file_test (filename, G_FILE_TEST_EXISTS))
+ return filename;
+ g_free (filename);
+
+ /* Check the standard system data directories. */
datadirs = g_get_system_data_dirs ();
while (*datadirs != NULL) {
filename = g_build_filename (
@@ -414,6 +422,10 @@
/* Print a helpful message and die. */
g_printerr (DATA_FILE_NOT_FOUND_MESSAGE, basename);
+ filename = g_build_filename (
+ DATADIR, GTKHTML_RELEASE_STRING, basename, NULL);
+ g_printerr ("\t%s\n", filename);
+ g_free (filename);
datadirs = g_get_system_data_dirs ();
while (*datadirs != NULL) {
filename = g_build_filename (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]