1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

new -remote command: reload()

This commit is contained in:
Marco Migliori 2017-05-16 18:37:29 +02:00 committed by Witold Filipczyk
parent f1fb95835a
commit a75e8dd35c
3 changed files with 10 additions and 0 deletions

View File

@ -204,6 +204,7 @@ enum remote_method_enum {
REMOTE_METHOD_XFEDOCOMMAND,
REMOTE_METHOD_ADDBOOKMARK,
REMOTE_METHOD_INFOBOX,
REMOTE_METHOD_RELOAD,
REMOTE_METHOD_NOT_SUPPORTED,
};
@ -221,6 +222,7 @@ remote_cmd(struct option *o, unsigned char ***argv, int *argc)
{ "addBookmark", REMOTE_METHOD_ADDBOOKMARK },
{ "infoBox", REMOTE_METHOD_INFOBOX },
{ "xfeDoCommand", REMOTE_METHOD_XFEDOCOMMAND },
{ "reload", REMOTE_METHOD_RELOAD },
{ NULL, REMOTE_METHOD_NOT_SUPPORTED },
};
unsigned char *command, *arg, *argend, *argstring;
@ -386,6 +388,10 @@ remote_cmd(struct option *o, unsigned char ***argv, int *argc)
remote_session_flags = SES_REMOTE_INFO_BOX;
break;
case REMOTE_METHOD_RELOAD:
remote_session_flags = SES_REMOTE_RELOAD;
break;
case REMOTE_METHOD_NOT_SUPPORTED:
break;
}

View File

@ -1007,6 +1007,9 @@ init_remote_session(struct session *ses, enum remote_session_flags *remote_ptr,
} else if (remote & SES_REMOTE_PROMPT_URL) {
dialog_goto_url_open(ses);
} else if (remote & SES_REMOTE_RELOAD) {
reload(ses, CACHE_MODE_FORCE_RELOAD);
}
}

View File

@ -35,6 +35,7 @@ enum remote_session_flags {
SES_REMOTE_PING = 16,
SES_REMOTE_ADD_BOOKMARK = 32,
SES_REMOTE_INFO_BOX = 64,
SES_REMOTE_RELOAD = 128,
};
/** This is generic frame descriptor, meaningful mainly for ses_*_frame*(). */