diff options
author | portix <none@none> | 2012-12-06 11:10:23 +0100 |
---|---|---|
committer | portix <none@none> | 2012-12-06 11:10:23 +0100 |
commit | cfe31126f94c76ee9c2f1d5c7bfb13f31b9efcc1 (patch) | |
tree | da5a2e74c2d65b7ffbac09bda9f4837189389297 /src/session.c | |
parent | be66d769983932d782e669257f95a6a71114c6cf (diff) | |
download | dwb-cfe31126f94c76ee9c2f1d5c7bfb13f31b9efcc1.zip |
Indentation of adblock.c, renaming static variables
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/session.c b/src/session.c index bf86d003..a6105f75 100644 --- a/src/session.c +++ b/src/session.c @@ -23,8 +23,8 @@ #include "view.h" #include "session.h" -static char *m_session_name; -static gboolean m_has_marked = true; +static char *s_session_name; +static gboolean s_has_marked = true; typedef struct _SessionTab { GList *gl; @@ -125,7 +125,7 @@ session_load_status_callback(WebKitWebView *wv, GParamSpec *p, SessionTab *tab) } void session_clear_session() { - session_save_file(m_session_name ? m_session_name : "default", "", true); + session_save_file(s_session_name ? s_session_name : "default", "", true); } /* session_load_webview(WebKitWebView *, char *, int *){{{*/ @@ -180,24 +180,24 @@ session_restore(char *name, int flags) { gboolean ret = false; int locked_state = 0; if (name == NULL) { - m_session_name = g_strdup("default"); + s_session_name = g_strdup("default"); } else - m_session_name = name; + s_session_name = name; - char *group = session_get_group(m_session_name, &is_marked); + char *group = session_get_group(s_session_name, &is_marked); if (is_marked && (flags & SESSION_FORCE) == 0) { - fprintf(stderr, "Warning: Session '%s' will not be restored.\n", m_session_name); - fprintf(stderr, "There is already a restored session open with name '%s'.\n", m_session_name); + fprintf(stderr, "Warning: Session '%s' will not be restored.\n", s_session_name); + fprintf(stderr, "There is already a restored session open with name '%s'.\n", s_session_name); fputs("To force opening a saved session use -f or --force.\n", stderr); - m_has_marked = false; + s_has_marked = false; goto clean; } if (group == NULL) { return false; } char *group_begin = strchr(group, '\n'); - session_save_file(m_session_name, group_begin+1, true); + session_save_file(s_session_name, group_begin+1, true); if (flags & SESSION_ONLY_MARK) goto clean; char **lines = g_strsplit(group, "\n", -1); @@ -251,12 +251,12 @@ clean: gboolean session_save(const char *name, int flags) { if (!name) { - if (m_session_name) - name = m_session_name; + if (s_session_name) + name = s_session_name; else if (flags & SESSION_FORCE) name = "default"; } - if (!m_has_marked && (flags & SESSION_FORCE) == 0) + if (!s_has_marked && (flags & SESSION_FORCE) == 0) return false; GString *buffer = g_string_new(NULL); @@ -276,7 +276,7 @@ session_save(const char *name, int flags) { } session_save_file(name, buffer->str, (flags & SESSION_SYNC) != 0); if (! (flags & SESSION_SYNC)) - g_free(m_session_name); + g_free(s_session_name); g_string_free(buffer, true); return true; }/*}}}*/ |