MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / subtitle_open

Class subtitle_open

src/command/subtitle.cpp:264–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262};
263
264struct subtitle_open final : public Command {
265 CMD_NAME("subtitle/open")
266 CMD_ICON(open_toolbutton)
267 STR_MENU("&Open Subtitles...")
268 STR_DISP("Open Subtitles")
269 STR_HELP("Open a subtitles file")
270
271 void operator()(agi::Context *c) override {
272 if (!is_okay_to_close_subtitles(c)) return;
273
274 auto filename = OpenFileSelector(_("Open subtitles file"), "Path/Last/Subtitles", "","", SubtitleFormat::GetWildcards(0), c->parent);
275 if (!filename.empty())
276 load_subtitles(c, filename);
277 }
278};
279
280struct subtitle_open_autosave final : public Command {
281 CMD_NAME("subtitle/open/autosave")

Callers

nothing calls this directly

Calls 3

OpenFileSelectorFunction · 0.85
load_subtitlesFunction · 0.85

Tested by

no test coverage detected