filename as Optional argument
This commit is contained in:
parent
9736dc3115
commit
b44371f4bf
3 changed files with 10 additions and 5 deletions
|
@ -729,8 +729,11 @@ void Window::SetAspectRatio(double aspect_ratio, mate::Arguments* args) {
|
|||
window_->SetAspectRatio(aspect_ratio, extra_size);
|
||||
}
|
||||
|
||||
void Window::PreviewFile(const std::string& filepath,
|
||||
const std::string& filename) {
|
||||
void Window::PreviewFile(const std::string& filepath, mate::Arguments* args) {
|
||||
std::string filename;
|
||||
if (!args->GetNext(&filename)) {
|
||||
filename = filepath;
|
||||
}
|
||||
window_->PreviewFile(filepath, filename);
|
||||
}
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ class Window : public mate::TrackableObject<Window>,
|
|||
void SetMenuBarVisibility(bool visible);
|
||||
bool IsMenuBarVisible();
|
||||
void SetAspectRatio(double aspect_ratio, mate::Arguments* args);
|
||||
void PreviewFile(const std::string& filepath, const std::string& filename);
|
||||
void PreviewFile(const std::string& filepath, mate::Arguments* args);
|
||||
void SetParentWindow(v8::Local<v8::Value> value, mate::Arguments* args);
|
||||
v8::Local<v8::Value> GetParentWindow() const;
|
||||
std::vector<v8::Local<v8::Object>> GetChildWindows() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue