gtk: Add dummy implementation of dialog.
This commit is contained in:
parent
6bd56f2a52
commit
e3d5b62000
3 changed files with 73 additions and 0 deletions
2
atom.gyp
2
atom.gyp
|
@ -119,6 +119,7 @@
|
|||
'browser/ui/cocoa/nsalert_synchronous_sheet.h',
|
||||
'browser/ui/cocoa/nsalert_synchronous_sheet.mm',
|
||||
'browser/ui/file_dialog.h',
|
||||
'browser/ui/file_dialog_gtk.cc',
|
||||
'browser/ui/file_dialog_mac.mm',
|
||||
'browser/ui/file_dialog_win.cc',
|
||||
'browser/ui/gtk/gtk_custom_menu.cc',
|
||||
|
@ -128,6 +129,7 @@
|
|||
'browser/ui/gtk/gtk_window_util.cc',
|
||||
'browser/ui/gtk/gtk_window_util.h',
|
||||
'browser/ui/message_box.h',
|
||||
'browser/ui/message_box_gtk.cc',
|
||||
'browser/ui/message_box_mac.mm',
|
||||
'browser/ui/message_box_win.cc',
|
||||
'browser/ui/win/menu_2.cc',
|
||||
|
|
41
browser/ui/file_dialog_gtk.cc
Normal file
41
browser/ui/file_dialog_gtk.cc
Normal file
|
@ -0,0 +1,41 @@
|
|||
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "browser/ui/file_dialog.h"
|
||||
|
||||
#include "base/callback.h"
|
||||
|
||||
namespace file_dialog {
|
||||
|
||||
bool ShowOpenDialog(atom::NativeWindow* parent_window,
|
||||
const std::string& title,
|
||||
const base::FilePath& default_path,
|
||||
int properties,
|
||||
std::vector<base::FilePath>* paths) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void ShowOpenDialog(atom::NativeWindow* parent_window,
|
||||
const std::string& title,
|
||||
const base::FilePath& default_path,
|
||||
int properties,
|
||||
const OpenDialogCallback& callback) {
|
||||
callback.Run(false, std::vector<base::FilePath>());
|
||||
}
|
||||
|
||||
bool ShowSaveDialog(atom::NativeWindow* parent_window,
|
||||
const std::string& title,
|
||||
const base::FilePath& default_path,
|
||||
base::FilePath* path) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void ShowSaveDialog(atom::NativeWindow* parent_window,
|
||||
const std::string& title,
|
||||
const base::FilePath& default_path,
|
||||
const SaveDialogCallback& callback) {
|
||||
callback.Run(false, base::FilePath());
|
||||
}
|
||||
|
||||
} // namespace file_dialog
|
30
browser/ui/message_box_gtk.cc
Normal file
30
browser/ui/message_box_gtk.cc
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "browser/ui/message_box.h"
|
||||
|
||||
#include "base/callback.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
int ShowMessageBox(NativeWindow* parent_window,
|
||||
MessageBoxType type,
|
||||
const std::vector<std::string>& buttons,
|
||||
const std::string& title,
|
||||
const std::string& message,
|
||||
const std::string& detail) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ShowMessageBox(NativeWindow* parent_window,
|
||||
MessageBoxType type,
|
||||
const std::vector<std::string>& buttons,
|
||||
const std::string& title,
|
||||
const std::string& message,
|
||||
const std::string& detail,
|
||||
const MessageBoxCallback& callback) {
|
||||
callback.Run(0);
|
||||
}
|
||||
|
||||
} // namespace atom
|
Loading…
Reference in a new issue