Merge branch 'master' into chrome31
Conflicts: common/atom_version.h
This commit is contained in:
commit
a4715f936b
7 changed files with 42 additions and 12 deletions
|
@ -50,8 +50,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,7,5,0
|
||||
PRODUCTVERSION 0,7,5,0
|
||||
FILEVERSION 0,7,6,0
|
||||
PRODUCTVERSION 0,7,6,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -68,12 +68,12 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "GitHub, Inc."
|
||||
VALUE "FileDescription", "Atom-Shell"
|
||||
VALUE "FileVersion", "0.7.5"
|
||||
VALUE "FileVersion", "0.7.6"
|
||||
VALUE "InternalName", "atom.exe"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved."
|
||||
VALUE "OriginalFilename", "atom.exe"
|
||||
VALUE "ProductName", "Atom-Shell"
|
||||
VALUE "ProductVersion", "0.7.5"
|
||||
VALUE "ProductVersion", "0.7.6"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>atom.icns</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.7.5</string>
|
||||
<string>0.7.6</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
@ -5,8 +5,37 @@
|
|||
#ifndef ATOM_COMMON_SWAP_OR_ASSIGN_H_
|
||||
#define ATOM_COMMON_SWAP_OR_ASSIGN_H_
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
namespace internal {
|
||||
|
||||
#if defined(OS_WIN)
|
||||
template<typename T> inline
|
||||
void SwapOrAssign(T& v1, const T& v2) {
|
||||
__if_exists(T::swap) {
|
||||
v1.swap(const_cast<T&>(v2));
|
||||
}
|
||||
|
||||
__if_not_exists(T::swap) {
|
||||
v1 = v2;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T> inline
|
||||
void SwapOrAssign(T*& v1, T* v2) {
|
||||
v1 = v2;
|
||||
}
|
||||
|
||||
inline
|
||||
void SwapOrAssign(int& v1, int v2) {
|
||||
v1 = v2;
|
||||
}
|
||||
|
||||
inline
|
||||
void SwapOrAssign(bool& v1, bool v2) {
|
||||
v1 = v2;
|
||||
}
|
||||
#else // defined(OS_WIN)
|
||||
// Helper to detect whether value has specified method.
|
||||
template <typename T>
|
||||
class HasSwapMethod {
|
||||
|
@ -24,17 +53,18 @@ struct enable_if {};
|
|||
template<class T>
|
||||
struct enable_if<true, T> { typedef T type; };
|
||||
|
||||
template<typename T>
|
||||
template<typename T> inline
|
||||
typename enable_if<HasSwapMethod<T>::value>::type SwapOrAssign(
|
||||
T& v1, const T& v2) {
|
||||
v1.swap(const_cast<T&>(v2));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename T> inline
|
||||
typename enable_if<!HasSwapMethod<T>::value>::type SwapOrAssign(
|
||||
T& v1, const T& v2) {
|
||||
v1 = v2;
|
||||
}
|
||||
#endif // !defined(OS_WIN)
|
||||
|
||||
} // namespace internal
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ bool FromV8Arguments(const v8::FunctionCallbackInfo<v8::Value>& args,
|
|||
if (!V8ValueCanBeConvertedTo<T1>(args[index]))
|
||||
return false;
|
||||
internal::SwapOrAssign(*value,
|
||||
static_cast<const T1&>(FromV8Value(args[index])));
|
||||
FromV8Value(args[index]).operator T1());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ var Menu = require('menu');
|
|||
var MenuItem = require('menu-item');
|
||||
|
||||
var menu = new Menu();
|
||||
menu.append(new MenuItem({ label: 'MenuItem1', click: function() { console.log('item 1clicked'); } }));
|
||||
menu.append(new MenuItem({ label: 'MenuItem1', click: function() { console.log('item 1 clicked'); } }));
|
||||
menu.append(new MenuItem({ type: 'separator' }));
|
||||
menu.append(new MenuItem({ label: 'MenuItem2', type: 'checkbox', clicked: true }));
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
## Prerequisites
|
||||
|
||||
* Windows 7 or later
|
||||
* Visual Studio 2010 Express or Profissional
|
||||
* Visual Studio 2010 Express or Professional
|
||||
* Make sure "X64 Compilers and Tools" are installed if you use the
|
||||
Profissional edition.
|
||||
Professional edition.
|
||||
* [Python 2.7](http://www.python.org/download/releases/2.7/)
|
||||
* [node.js](http://nodejs.org/)
|
||||
* [git](http://git-scm.com)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "atom-shell",
|
||||
"version": "0.7.5",
|
||||
"version": "0.7.6",
|
||||
|
||||
"devDependencies": {
|
||||
"coffee-script": "~1.6.3",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue