mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
new -remote command: reload()
This commit is contained in:
parent
f1fb95835a
commit
a75e8dd35c
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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*(). */
|
||||
|
Loading…
Reference in New Issue
Block a user