void become_logged_in(char *user, char *pass, char *serv_response)
{
char buf[SIZ];
+ StrBuf *FloorDiv;
WC->logged_in = 1;
extract_token(WC->wc_fullname, &serv_response[4], 0, '|', sizeof WC->wc_fullname);
get_pref_long("current_iconbar", &WC->current_iconbar, current_iconbar_menu);
- get_preference("floordiv_expanded", &WC->floordiv_expanded);
+ get_preference("floordiv_expanded", &FloorDiv);
+ WC->floordiv_expanded = FloorDiv;
}
if (WC->logged_in) {
set_pref_long("current_iconbar", WC->current_iconbar, 0);
- set_preference("floordiv_expanded", WC->floordiv_expanded, 1);
}
serv_puts("QUIT");
void set_floordiv_expanded(void) {
struct wcsession *WCC = WC;
- if (WCC->floordiv_expanded == NULL)
- WCC->floordiv_expanded = NewStrBuf();
- else
- FlushStrBuf(WC->floordiv_expanded);
- StrBufAppendBuf(WC->floordiv_expanded, WC->UrlFragment1, 0);
+ WCC->floordiv_expanded = NewStrBuf();
+ StrBufAppendBuf(WCC->floordiv_expanded, WCC->UrlFragment1, 0);
+ set_preference("floordiv_expanded", WCC->floordiv_expanded, 1);
}
/**
time_t cache_timestamp; /**< ??? todo */
HashList *IconBarSetttings; /**< which icons should be shown / not shown? */
long current_iconbar; /**< What is currently in the iconbar? */
- StrBuf *floordiv_expanded; /**< which floordiv currently expanded */
+ const StrBuf *floordiv_expanded; /**< which floordiv currently expanded */
int selected_language; /**< Language selected by user */
time_t last_pager_check; /**< last time we polled for instant msgs */
int nonce; /**< session nonce (to prevent session riding) */