diff options
author | mutantturkey <crazycal00@gmail.com> | 2011-05-01 12:57:48 -0400 |
---|---|---|
committer | mutantturkey <crazycal00@gmail.com> | 2011-05-01 12:57:48 -0400 |
commit | 39664b1963bd6ffac88d9fa8b822055b61d23749 (patch) | |
tree | 17c1df4eb8e7c8b201e503fe4d80cfb1efafe88f /sb.c | |
parent | 9afed8fe16c216a48e7cb05d38d81f99d3868024 (diff) |
added DEFAULT_COOKIE_FILE for cookie location, and changed from gstrdup to g_build_filename for DEFAULT_HISTORY_FILE
Diffstat (limited to 'sb.c')
-rw-r--r-- | sb.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -42,7 +42,8 @@ static struct { #define DEFAULT_SEARCH "http://www.google.com/search?q=" #define DEFAULT_FONT "san-serif" #define DEFAULT_TAB_LENGTH 25 -#define DEFAULT_HISTORY_FILE "/.sb_history" +#define DEFAULT_HISTORY_FILE ".sb_history" +#define DEFAULT_COOKIE_FILE ".sb_cookies" #define DEFAULT_ZOOM_SIZE .05 #define DEFAULT_HEIGHT 900 #define DEFAULT_WIDTH 800 @@ -163,7 +164,7 @@ const gchar* uri = webkit_web_frame_get_uri(frame); if (gtk_notebook_get_current_page(GTK_NOTEBOOK(w.notebook)) == gtk_notebook_page_num(GTK_NOTEBOOK(w.notebook), t->scroll)) { gtk_entry_set_text (GTK_ENTRY (w.bar), uri); } -FILE *history = fopen(g_strconcat(g_get_home_dir(), DEFAULT_HISTORY_FILE, NULL), "a+"); +FILE *history = fopen(g_build_filename(g_get_home_dir(), DEFAULT_HISTORY_FILE, NULL), "a+"); fprintf(history, "%s \n", uri); fclose(history); @@ -385,7 +386,7 @@ w.webkitwindowfeatures = webkit_web_window_features_new(); w.session = webkit_get_default_session(); -w.jar = soup_cookie_jar_text_new(g_build_filename(g_get_home_dir(), ".sb_cookies", NULL), FALSE); +w.jar = soup_cookie_jar_text_new(g_build_filename(g_get_home_dir(), DEFAULT_COOKIE_FILE, NULL), FALSE); soup_session_add_feature(w.session, SOUP_SESSION_FEATURE(w.jar)); tab_new(FALSE); |