]>
Commit | Line | Data |
---|---|---|
2affc725 MB |
1 | diff -urN bluefish-1.0.7/src/bluefish.c bluefish-1.0.7.new/src/bluefish.c |
2 | --- bluefish-1.0.7/src/bluefish.c 2006-02-10 14:24:35.000000000 +0100 | |
3 | +++ bluefish-1.0.7.new/src/bluefish.c 2007-02-07 12:41:03.000000000 +0100 | |
4 | @@ -186,7 +186,7 @@ | |
fbc0aed0 | 5 | #endif /* #ifndef NOSPLASH */ |
6 | ||
7 | { | |
8 | - gchar *filename = g_strconcat(g_get_home_dir(), "/.bluefish/dir_history", NULL); | |
2affc725 | 9 | + gchar *filename = g_strconcat(_HEdir, "/.bluefish/dir_history", NULL); |
fbc0aed0 | 10 | main_v->recent_directories = get_stringlist(filename, NULL); |
11 | g_free(filename); | |
12 | } | |
2affc725 | 13 | @@ -230,7 +230,7 @@ |
fbc0aed0 | 14 | gchar *shortcutfilename; |
15 | GtkSettings* gtksettings = gtk_settings_get_default(); | |
16 | g_object_set(G_OBJECT(gtksettings), "gtk-can-change-accels", TRUE, NULL); | |
17 | - shortcutfilename = g_strconcat(g_get_home_dir(), "/.bluefish/menudump_2", NULL); | |
2affc725 | 18 | + shortcutfilename = g_strconcat(_HEdir, "/.bluefish/menudump_2", NULL); |
fbc0aed0 | 19 | gtk_accel_map_load(shortcutfilename); |
20 | g_free(shortcutfilename); | |
21 | } | |
2affc725 | 22 | @@ -347,7 +347,7 @@ |
fbc0aed0 | 23 | |
24 | rcfile_save_all(); | |
25 | { | |
26 | - gchar *filename = g_strconcat(g_get_home_dir(), "/.bluefish/dir_history", NULL); | |
2affc725 | 27 | + gchar *filename = g_strconcat(_HEdir, "/.bluefish/dir_history", NULL); |
fbc0aed0 | 28 | put_stringlist_limited(filename, main_v->recent_directories, main_v->props.max_dir_history); |
29 | g_free(filename); | |
30 | } | |
2affc725 MB |
31 | diff -urN bluefish-1.0.7/src/bluefish.h bluefish-1.0.7.new/src/bluefish.h |
32 | --- bluefish-1.0.7/src/bluefish.h 2006-01-18 10:18:08.000000000 +0100 | |
33 | +++ bluefish-1.0.7.new/src/bluefish.h 2007-02-07 12:40:12.000000000 +0100 | |
34 | @@ -72,6 +72,7 @@ | |
35 | #include <libgnomevfs/gnome-vfs.h> | |
36 | #endif | |
37 | ||
38 | +#include <home_etc.h> | |
39 | ||
40 | /*********************/ | |
41 | /* undo/redo structs */ | |
42 | diff -urN bluefish-1.0.7/src/fref.c bluefish-1.0.7.new/src/fref.c | |
43 | --- bluefish-1.0.7/src/fref.c 2006-08-22 06:06:56.000000000 +0200 | |
44 | +++ bluefish-1.0.7.new/src/fref.c 2007-02-07 12:47:57.000000000 +0100 | |
45 | @@ -1814,7 +1814,7 @@ | |
46 | ||
47 | static void fref_popup_menu_rescan_lcb(GtkWidget * widget, gpointer user_data) | |
48 | { | |
fbc0aed0 | 49 | - gchar *userdir = g_strconcat(g_get_home_dir(), "/.bluefish/", NULL); |
2affc725 | 50 | + gchar *userdir = g_strconcat(_HEdir, "/.bluefish/", NULL); |
fbc0aed0 | 51 | DEBUG_MSG("fref_popup_menu_rescan_lcb, started\n"); |
52 | fref_rescan_dir(PKGDATADIR); | |
53 | fref_rescan_dir(userdir); | |
2affc725 MB |
54 | diff -urN bluefish-1.0.7/src/Makefile.in bluefish-1.0.7.new/src/Makefile.in |
55 | --- bluefish-1.0.7/src/Makefile.in 2006-10-21 18:36:18.000000000 +0200 | |
56 | +++ bluefish-1.0.7.new/src/Makefile.in 2007-02-07 12:49:57.000000000 +0100 | |
57 | @@ -36,7 +36,7 @@ | |
58 | CC = @CC@ | |
59 | CFLAGS = @CFLAGS@ | |
60 | LDFLAGS = @LDFLAGS@ | |
61 | -LIBS = @LIBS@ | |
62 | +LIBS = @LIBS@ -lhome_etc | |
63 | INSTALL = @INSTALL@ | |
64 | INSTALL_DIR = $(INSTALL) -d -m 755 | |
65 | INSTALL_PROGRAM = $(INSTALL) -s -m 755 | |
66 | diff -urN bluefish-1.0.7/src/rcfile.c bluefish-1.0.7.new/src/rcfile.c | |
67 | --- bluefish-1.0.7/src/rcfile.c 2006-10-08 17:51:07.000000000 +0200 | |
68 | +++ bluefish-1.0.7.new/src/rcfile.c 2007-02-07 12:52:19.000000000 +0100 | |
69 | @@ -491,7 +491,7 @@ | |
fbc0aed0 | 70 | /*Make the config_rc list ready for filling with data and set default values */ |
71 | main_configlist = props_init_main(NULL); | |
72 | ||
73 | - filename = g_strconcat(g_get_home_dir(), "/.bluefish/rcfile_v2", NULL); | |
2affc725 | 74 | + filename = g_strconcat(_HEdir, "/.bluefish/rcfile_v2", NULL); |
fbc0aed0 | 75 | if (!parse_config_file(main_configlist, filename)) { |
76 | /* should we initialize some things ?? */ | |
77 | } | |
2affc725 | 78 | @@ -582,7 +582,7 @@ |
fbc0aed0 | 79 | main_v->props.filefilters = g_list_append(main_v->props.filefilters, arr); |
80 | } | |
81 | if (main_v->props.reference_files == NULL) { | |
82 | - gchar *userdir = g_strconcat(g_get_home_dir(), "/.bluefish/", NULL); | |
2affc725 | 83 | + gchar *userdir = g_strconcat(_HEdir, "/.bluefish/", NULL); |
fbc0aed0 | 84 | /* if the user does not yet have any function reference files, set them to default values */ |
85 | fref_rescan_dir(PKGDATADIR); | |
86 | fref_rescan_dir(userdir); | |
2affc725 | 87 | @@ -616,7 +616,7 @@ |
fbc0aed0 | 88 | } |
89 | ||
90 | static gint rcfile_save_main(void) { | |
91 | - gchar *filename = g_strconcat(g_get_home_dir(), "/.bluefish/rcfile_v2", NULL); | |
2affc725 | 92 | + gchar *filename = g_strconcat(_HEdir, "/.bluefish/rcfile_v2", NULL); |
fbc0aed0 | 93 | return save_config_file(main_configlist, filename); |
94 | } | |
95 | /* | |
2affc725 | 96 | @@ -640,7 +640,7 @@ |
fbc0aed0 | 97 | highlighting_configlist = NULL; |
2affc725 | 98 | init_prop_arraylist(&highlighting_configlist, &main_v->props.highlight_patterns, "patterns:", 0, TRUE); |
fbc0aed0 | 99 | |
100 | - filename = g_strconcat(g_get_home_dir(), "/.bluefish/highlighting", NULL); | |
2affc725 | 101 | + filename = g_strconcat(_HEdir, "/.bluefish/highlighting", NULL); |
fbc0aed0 | 102 | defaultfile = return_first_existing_filename(PKGDATADIR"highlighting.default", |
103 | "data/highlighting.default", | |
104 | "../data/highlighting.default",NULL); | |
2affc725 | 105 | @@ -666,7 +666,7 @@ |
fbc0aed0 | 106 | |
107 | static gint rcfile_save_highlighting(void) { | |
108 | gint retval; | |
109 | - gchar *filename = g_strconcat(g_get_home_dir(), "/.bluefish/highlighting", NULL); | |
2affc725 | 110 | + gchar *filename = g_strconcat(_HEdir, "/.bluefish/highlighting", NULL); |
fbc0aed0 | 111 | retval = save_config_file(highlighting_configlist, filename); |
112 | g_free(filename); | |
113 | return retval; | |
2affc725 MB |
114 | @@ -694,7 +694,7 @@ |
115 | init_prop_arraylist(&custom_menu_configlist, &main_v->props.cmenu_insert, "cmenu_insert:", 0, TRUE); | |
116 | init_prop_arraylist(&custom_menu_configlist, &main_v->props.cmenu_replace, "cmenu_replace:", 0, TRUE); | |
fbc0aed0 | 117 | |
118 | - filename = g_strconcat(g_get_home_dir(), "/.bluefish/custom_menu", NULL); | |
2affc725 MB |
119 | + filename = g_strconcat(_HEdir, "/.bluefish/custom_menu", NULL); |
120 | ||
121 | if (full_reset || !parse_config_file(custom_menu_configlist, filename) || (main_v->props.cust_menu==NULL && main_v->props.cmenu_insert==NULL && main_v->props.cmenu_replace==NULL )) { | |
122 | DEBUG_MSG("error parsing the custom menu file, or full_reset is set\n"); | |
123 | @@ -815,7 +815,7 @@ | |
fbc0aed0 | 124 | } |
125 | static gint rcfile_save_custom_menu(void) { | |
126 | gint retval; | |
127 | - gchar *filename = g_strconcat(g_get_home_dir(), "/.bluefish/custom_menu", NULL); | |
2affc725 | 128 | + gchar *filename = g_strconcat(_HEdir, "/.bluefish/custom_menu", NULL); |
fbc0aed0 | 129 | retval = save_config_file(custom_menu_configlist, filename); |
130 | g_free(filename); | |
131 | return retval; | |
2affc725 | 132 | @@ -823,7 +823,7 @@ |
fbc0aed0 | 133 | |
134 | #define DIR_MODE (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) /* same as 0755 */ | |
135 | void rcfile_check_directory(void) { | |
136 | - gchar *rcdir = g_strconcat(g_get_home_dir(), "/.bluefish", NULL); | |
2affc725 | 137 | + gchar *rcdir = g_strconcat(_HEdir, "/.bluefish", NULL); |
fbc0aed0 | 138 | if (!g_file_test(rcdir, G_FILE_TEST_IS_DIR)) { |
139 | mkdir(rcdir, DIR_MODE); | |
140 | } | |
2affc725 | 141 | @@ -843,7 +843,7 @@ |
fbc0aed0 | 142 | break; |
143 | case 3: | |
144 | { | |
145 | - gchar *shortcutfilename = g_strconcat(g_get_home_dir(), "/.bluefish/menudump_2", NULL); | |
2affc725 | 146 | + gchar *shortcutfilename = g_strconcat(_HEdir, "/.bluefish/menudump_2", NULL); |
fbc0aed0 | 147 | gtk_accel_map_save(shortcutfilename); |
148 | g_free(shortcutfilename); | |
149 | } | |
2affc725 MB |
150 | @@ -935,7 +935,7 @@ |
151 | ||
152 | gboolean rcfile_save_global_session(void) { | |
153 | gboolean retval; | |
154 | - gchar *filename = g_strconcat(g_get_home_dir(), "/.bluefish/session", NULL); | |
155 | + gchar *filename = g_strconcat(_HEdir, "/.bluefish/session", NULL); | |
156 | GList *configlist = return_globalsession_configlist(FALSE); | |
157 | configlist = return_session_configlist(configlist, main_v->session); | |
158 | DEBUG_MSG("rcfile_save_global_session, saving global session to %s\n",filename); | |
159 | @@ -954,12 +954,12 @@ | |
160 | gchar *filename; | |
161 | GList *configlist = return_globalsession_configlist(TRUE); | |
162 | configlist = return_session_configlist(configlist, main_v->session); | |
163 | - filename = g_strconcat(g_get_home_dir(), "/.bluefish/session", NULL); | |
164 | + filename = g_strconcat(_HEdir, "/.bluefish/session", NULL); | |
165 | if (!file_exists_and_readable(filename)) { | |
166 | /* versions before 0.13 did not have a separate session file, so | |
167 | we'll try to load these items from rcfile_v2 */ | |
168 | g_free(filename); | |
169 | - filename = g_strconcat(g_get_home_dir(), "/.bluefish/rcfile_v2", NULL); | |
170 | + filename = g_strconcat(_HEdir, "/.bluefish/rcfile_v2", NULL); | |
171 | } | |
172 | retval = parse_config_file(configlist, filename); | |
173 | free_configlist(configlist); |