filename -> displayName

This commit is contained in:
Kevin Sawicki 2016-10-26 09:47:22 +09:00
parent d26601f695
commit d982376fc4
6 changed files with 23 additions and 18 deletions

View file

@ -730,11 +730,11 @@ void Window::SetAspectRatio(double aspect_ratio, mate::Arguments* args) {
}
void Window::PreviewFile(const std::string& path, mate::Arguments* args) {
std::string fileName;
if (!args->GetNext(&fileName)) {
fileName = path;
std::string display_name;
if (!args->GetNext(&display_name)) {
display_name = path;
}
window_->PreviewFile(path, fileName);
window_->PreviewFile(path, display_name);
}
void Window::SetParentWindow(v8::Local<v8::Value> value,

View file

@ -375,7 +375,7 @@ void NativeWindow::SetAspectRatio(double aspect_ratio,
}
void NativeWindow::PreviewFile(const std::string& path,
const std::string& fileName) {
const std::string& display_name) {
}
void NativeWindow::RequestToClosePage() {

View file

@ -177,7 +177,7 @@ class NativeWindow : public base::SupportsUserData,
gfx::Size GetAspectRatioExtraSize();
virtual void SetAspectRatio(double aspect_ratio, const gfx::Size& extra_size);
virtual void PreviewFile(const std::string& path,
const std::string& fileName);
const std::string& display_name);
base::WeakPtr<NativeWindow> GetWeakPtr() {
return weak_factory_.GetWeakPtr();

View file

@ -55,7 +55,7 @@ class NativeWindowMac : public NativeWindow,
void SetMovable(bool movable) override;
void SetAspectRatio(double aspect_ratio, const gfx::Size& extra_size)
override;
void PreviewFile(const std::string& path, const std::string& fileName)
void PreviewFile(const std::string& path, const std::string& display_name)
override;
bool IsMovable() override;
void SetMinimizable(bool minimizable) override;

View file

@ -290,11 +290,11 @@ bool ScopedDisableResize::disable_resize_ = false;
@implementation AtomPreviewItem
- (id)initWithURL:(NSURL*)url title:(NSString*)title {
self = [super init];
self = [super init];
if (self) {
self.previewItemURL = url;
self.previewItemTitle = title;
}
}
return self;
}
@ -953,11 +953,11 @@ void NativeWindowMac::SetAspectRatio(double aspect_ratio,
[window_ setResizeIncrements:NSMakeSize(1.0, 1.0)];
}
void NativeWindowMac::PreviewFile(const std::string& path, const std::string& fileName) {
NSString* pathStr = [NSString stringWithUTF8String:path.c_str()];
NSString* nameStr = [NSString stringWithUTF8String:fileName.c_str()];
[window_ previewFileAtPath:pathStr withName:nameStr];
void NativeWindowMac::PreviewFile(const std::string& path,
const std::string& display_name) {
NSString* path_ns = [NSString stringWithUTF8String:path.c_str()];
NSString* name_ns = [NSString stringWithUTF8String:display_name.c_str()];
[window_ previewFileAtPath:path_ns withName:name_ns];
}
void NativeWindowMac::SetMovable(bool movable) {