changeset 782:3f7a0420c293

Allow to modify the aspect of Geeqie through the use of a gtkrc file that may be present in the geeqie rc directory. Patch by Aldric RENAUDIN and me.
author zas_
date Tue, 03 Jun 2008 15:54:05 +0000
parents 2d2cca2bceb0
children d6a7fb4b8e7c
files src/main.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.c	Tue Jun 03 13:54:22 2008 +0000
+++ b/src/main.c	Tue Jun 03 15:54:05 2008 +0000
@@ -651,6 +651,15 @@
 
 	parse_command_line(argc, argv, &cmd_path, &cmd_file, &cmd_list, &collection_list, &geometry);
 
+	/* If a gtkrc file exists in the rc directory, add it to the
+	 * list of files to be parsed at the end of gtk_init() */
+	buf = g_build_filename(homedir(), GQ_RC_DIR, "gtkrc", NULL);
+	bufl = path_from_utf8(buf);
+	if (access(bufl, R_OK) == 0)
+		gtk_rc_add_default_file(bufl);
+	g_free(bufl);
+	g_free(buf);
+
 	gtk_init(&argc, &argv);
 
 	if (gtk_major_version < GTK_MAJOR_VERSION ||