Dongjoon Hyun
fee56df400
Rename function FilterAccecelator
to FilterAccelerator
in submenu_button.cc
.
2016-02-24 11:15:21 -08:00
Cheng Zhao
49f995925c
Notify the global menu bar when window is mapped
2016-02-23 15:43:32 +08:00
Kevin Sawicki
756aeffe03
Set icon on NSAlert when specified
2016-02-08 15:18:05 -08:00
Heilig Benedek
61e0219e91
Added documentation, restructured the files to fit better with electron's style and fixed a typo in keyboard_util's name.
2016-01-31 02:27:14 +01:00
Robo
65325dc63f
browser: fix crash when switching to sibling menu from submenus
2016-01-20 10:54:12 +05:30
Cheng Zhao
26bd97d6cf
Fix style issues of #4029
2016-01-11 21:12:07 +08:00
leethomas
fee301e768
follow style guidelines
2016-01-10 19:15:40 -08:00
leethomas
803b06b7de
🏁 support defaultId for dialog boxes on Windows
2016-01-10 15:55:26 -08:00
leethomas
ae5c6add11
rename all references to default_button_index -> default_id to keep consistent with cancel_id
2016-01-10 15:33:27 -08:00
leethomas
dfce803045
🏁 update windows message_box function signatures to accept default_button_index....and do nothing with it
2016-01-08 08:23:06 -08:00
leethomas
22c455175a
🐧 add default button index for linux/gtk
2016-01-08 08:22:10 -08:00
leethomas
f1edd5f26f
🍎 add default button index for osx
2016-01-08 08:21:54 -08:00
leethomas
59eda67ba4
🍎 🐛 make displaying alternate tray image depend on mouse down event instead of highlight state
2016-01-05 09:49:27 -08:00
Cheng Zhao
2b6ac966c0
Do not write our own filter code
...
The Win32 API has done everything for us, there is no need to do this
oursevles.
2016-01-05 13:45:34 +08:00
Cheng Zhao
698700716b
Show menu by clicking the menu button
2016-01-05 12:05:27 +08:00
Cheng Zhao
43bfce26a7
Do not behave like bookmarkbar menu
2016-01-05 11:57:58 +08:00
Cheng Zhao
8aced2c31e
Add comment on why checking empty set
2015-12-31 18:58:16 +08:00
Cheng Zhao
b308cd6f96
Merge pull request #3967 from leethomas/fix-osx-crash-when-extensions-empty
...
🍎 fix #3864 where saving a file causes a crash if file extensio…
2015-12-31 18:51:55 +08:00
leethomas
eac2f6fec3
🍎 only add sub menus to Window when they actually have menu items. fixes #3873
2015-12-30 19:38:14 -08:00
leethomas
ba26a4b4e6
🍎 fix #3864 where saving a file causes a crash if file extension array is empty
2015-12-30 13:26:38 -08:00
Nishanth Shanmugham
2bbf86c524
tray: Support file-drop from OS X Dock
...
A long-standing Apple bug does not call `prepareForDragOperation:sender`
for file drag-and-drop operations from the Dock. So we manually
call our custom `handleDrop:sender` for all drag-and-drop cases (that
is, from the Dock and from Finder).
References to the bug in question:
- http://stackoverflow.com/q/9534543/3309046
- http://openradar.appspot.com/radar?id=1745403
However, we still need to return YES from `prepareForDragOperation:sender`,
otherwise the "drag failed" animation occurs. For the same reason, we also
return YES from `performDragOperation:sender`.
2015-12-29 03:27:59 -06:00
Cheng Zhao
e8b5a6dedf
Merge pull request #3718 from atom/chrome47-linux
...
Port Chrome47 on Linux
2015-12-08 10:14:27 +08:00
Paul Betts
af28900189
Fix up Chrome47 changes
2015-12-07 13:27:05 -08:00
Paul Betts
3931ebb7ef
Fix up Windows build errors
2015-12-07 10:02:06 -08:00
Cheng Zhao
73e7773d84
Update to API changes of Chrome 47
2015-12-07 19:56:23 +08:00
Cheng Zhao
615ce45849
win: Implement menu parameter
2015-12-02 19:58:10 +08:00
Cheng Zhao
3cdd0f35c7
mac: Implement menu parameter
2015-12-02 19:05:22 +08:00
Cheng Zhao
2fba05b5e7
Add menu
parameter for Tray.popUpContextMenu
2015-12-02 18:43:11 +08:00
Cheng Zhao
87546bd4f8
Merge pull request #3479 from bengotow/tray-resizing
...
Fix sizing of Mac OS X tray icon after image change
2015-11-18 18:49:15 +08:00
Ben Gotow
9c69416e32
Fix sizing of Mac OS X tray icon after image change
...
- Consolidate logic that applies view dimensions into a function
- Use `NSVariableStatusItemLength` instead of trying to sync status item width
- Use modern Obj-C syntax `@[], @{}` in a few places
- Recompute view bounds after updating image in `setImage:`
2015-11-17 13:43:55 -08:00
Nishanth Shanmugham
d1e8e71e3f
Tray: Add drag-end and drop events
2015-11-10 10:02:50 -06:00
Nishanth Shanmugham
8a296f82a0
Tray: Remove extra qualification in header
2015-11-05 19:02:24 -06:00
Nishanth Shanmugham
818892d474
Tray: Add drag-entered and drag-exited events
2015-11-05 18:46:49 -06:00
mgarciaisaia
4013b652ff
🏁 🐛 Buffer overflows in tooltips
...
Fixes #3290 .
2015-11-04 15:34:58 +08:00
Cheng Zhao
c9b53a6e8b
Merge pull request #3240 from atom/reland-win-remove-wildcard-extension
...
Reland win remove wildcard extension
2015-10-27 20:52:43 +08:00
Haojian Wu
f69bafd48a
Win: Fix adding '.*' to filename in callback.
2015-10-27 20:15:43 +08:00
Haojian Wu
fa24e15d8b
Win: Remove adding '*.*' to file name in a save dialog.
2015-10-27 20:15:20 +08:00
Cheng Zhao
dacd921a04
Revert "Win: Remove adding default file filter(*.*) in a save dialog."
...
This reverts commit 00493f64b7
.
2015-10-27 14:58:44 +08:00
Cheng Zhao
3042f604cc
Merge pull request #3234 from atom/win-remove-default-filter
...
Win: Remove adding default file filter(*.*) in a save dialog.
2015-10-27 14:30:35 +08:00
Haojian Wu
00493f64b7
Win: Remove adding default file filter(*.*) in a save dialog.
2015-10-27 13:10:34 +08:00
Brandon Cash
60b14d03e9
Fix: tray NotfiyDropFiles typo
2015-10-18 00:32:13 -05:00
Cheng Zhao
3b1ee994e2
views: Remove hack on setting min/max size for frameless window
2015-10-05 20:37:08 +08:00
Cheng Zhao
a76ea00249
views: Implement NativeWindow::SetSizeConstraints
2015-10-05 20:07:20 +08:00
Cheng Zhao
2b9b4c6789
Merge pull request #2979 from etiktin/fix_calculating_min_max_4_frameless
...
Fix calculating min/max size in frameless view
2015-10-05 15:10:27 +08:00
Eran Tiktin
c34c123b33
Make it work only on Windows
...
Limiting the solution to Windows only.
2015-10-05 04:01:25 +03:00
Cheng Zhao
add9c38023
linux: Enable force showing menubar
...
This is for debugging purpose.
2015-10-04 16:33:03 +08:00
Eran Tiktin
aea1f8aebb
Fix calculating min/max size in frameless views
...
The minimum and maximum size that frameless windows had used, was
incorrect. It included the border, so when it was called it actually
added that to the size, so window increased in size. The fix makes sure
that the view will use the frameless size.
This fixes #2945 and partially fixes #1806 (it also refers to some other
issues with hidpi which might still exist).
2015-10-03 22:09:57 +03:00
Eran Tiktin
6dcc752f67
Set default extension in Windows file dialog
...
On Windows when you open the save dialog and switch the filter, the
extension is supposed to change accordingly. It didn't happen with the
existing code, since the existing code didn't set the default extension
(should be set to the first filter).
This resolves #2915 .
2015-09-28 02:12:47 +03:00
Cheng Zhao
9b1fa04988
win: Fix building
2015-09-24 12:01:57 +08:00
Paul Betts
b0e5039951
Fix initializer
2015-09-23 11:26:57 -07:00
Paul Betts
22e6f15795
Remove GUID from Shell_NotifyIcon calls
...
https://github.com/atom/electron/issues/2468#issuecomment-142684129 has
the details
2015-09-23 11:20:26 -07:00
Cheng Zhao
84ce441fb6
Add converters for WebInputEvent
2015-09-18 13:33:06 +08:00
Cheng Zhao
53b9d61831
Fix building on Windows
2015-09-03 20:07:29 +08:00
Cheng Zhao
4254eb279f
Fix API changes on Linux
2015-09-03 17:50:23 +09:00
Cheng Zhao
45491ca7ab
Fix API changes
2015-09-03 17:50:23 +09:00
Cheng Zhao
d830badc57
Add role property for MenuItem
2015-09-02 09:42:17 +08:00
Cheng Zhao
3e5449561f
Merge pull request #2595 from atom/mac-tray-quick-click
...
mac: make tray's behavior more official when getting clicked quickly multiple times.
2015-08-26 17:18:51 +08:00
Haojian Wu
2b051e3884
mac: make tray's behavior more official when getting clicked quickly
...
multiple times.
2015-08-26 16:28:22 +08:00
Cheng Zhao
da10df3a9a
Merge pull request #2556 from etiktin/fix_msg_box_no_close_btn
...
Fix message box missing a close button on Windows
2015-08-25 13:57:24 +08:00
Eran Tiktin
9232620023
Fixed comment spacing
2015-08-22 04:26:09 +03:00
Eran Tiktin
b1406fbad9
Fix no close button in message box on Windows
...
This resolves #2293 .
2015-08-22 04:20:52 +03:00
Haojian Wu
5f663dbf0a
mac: make * extension filter works.
2015-08-21 12:15:20 +08:00
Haojian Wu
c566ba575f
Linux: make * extension filter works.
2015-08-21 12:13:33 +08:00
Paul Betts
0efdb448b6
Merge pull request #2509 from atom/fix-win-tray
...
Correct generation of GUID on Windows.
2015-08-17 09:02:21 -07:00
Haojian Wu
763dcc545d
Correct generation of GUID on Windows.
2015-08-17 13:20:36 +08:00
Cheng Zhao
33eadad139
popContextMenu => popUpContextMenu
2015-08-10 13:00:15 +08:00
Cheng Zhao
225140bd64
win: Don't emit right-clicked event when there is menu attached
2015-08-10 12:52:55 +08:00
Cheng Zhao
58dee04d5c
mac: Redraw icon when menu is closed
2015-08-10 12:52:35 +08:00
Cheng Zhao
4b9ff309ec
Add our own MenuModel class
2015-08-10 12:39:05 +08:00
Cheng Zhao
a3f3a35fd1
mac: Don't emit "clicked" event if there is menu attached
2015-08-10 12:18:00 +08:00
Cheng Zhao
744059b8bd
Check button size
2015-08-06 15:22:17 +08:00
Cheng Zhao
454085eb95
Fix cpplint warning
2015-08-06 13:07:39 +08:00
Cheng Zhao
6e75af5c0f
Move SetOverlayIcon to TaskbarHost
2015-08-06 13:07:00 +08:00
Cheng Zhao
8da7803f3e
Save the taskbar object
2015-08-06 12:58:40 +08:00
Cheng Zhao
2d6f8350cb
Move SetProgressBar to TaskbarHost
2015-08-06 12:54:00 +08:00
Cheng Zhao
958658513c
Refactor code in taskbarHost
2015-08-06 12:44:07 +08:00
Cheng Zhao
a28f70e85c
Decouple TaskbarHost from NativeWindow
2015-08-06 11:10:34 +08:00
Cheng Zhao
8f8c3aef87
ThumbarHost => TaskbarHost
2015-08-06 10:30:22 +08:00
Cheng Zhao
39af10cc8d
Move thumbar_host_ from TreeHost to NativeWindow
2015-08-06 10:25:50 +08:00
Cheng Zhao
d175a68586
Add MessageHandlerDelegate
2015-08-06 10:15:27 +08:00
Haojian Wu
2f1cb8b52a
Expose NativeWindow.setThumbarButtons API to all platforms.
2015-08-05 22:30:05 +08:00
Haojian Wu
78eac4116c
Polish thumbar code.
...
* Fix a memory leak in thumbar initialization.
* Check the number of thumbar buttons, should be <= 7.
* Correct to check thumbar button click event.
2015-08-05 19:38:12 +08:00
Haojian Wu
dfd076a3e5
Move atom_desktop_window_tree_host_win to atom/browser/ui/win directory.
2015-08-05 13:55:06 +08:00
Haojian Wu
54af048f04
win: Add BrowserWindow.setThumbarButtons API.
2015-08-05 13:55:02 +08:00
Cheng Zhao
488a69d461
Merge pull request #2419 from atom/clean-native-window
...
Clean up NativeWindow code
2015-08-05 13:28:09 +08:00
Cheng Zhao
adbb909b39
Move ShouldUseGlobalMenuBar to x_window_utils
2015-08-05 13:16:03 +08:00
Cheng Zhao
dc60bfa885
Merge pull request #2410 from atom/pop_context_menu_issue
...
Check context menu when calling popContextMenu API.
2015-08-05 10:04:26 +08:00
Cheng Zhao
50f226e34e
win: Use app name as default title of message box
...
TaskDialogIndirect doesn't allow empty name, if we set empty title
it will show "electron.exe" in title.
2015-08-04 21:57:00 +08:00
Haojian Wu
613e5c77ea
Check context menu when calling popContextMenu API.
2015-08-04 19:45:44 +08:00
Cheng Zhao
be24d3e78c
mac: Make the tray icon behave more like the official one
2015-07-30 13:58:53 +08:00
Cheng Zhao
80f45f6226
Merge pull request #2370 from atom/osx-tray
...
Use NSImageView to draw tray icon.
2015-07-29 17:22:47 +08:00
Cheng Zhao
b2f03fc2d8
Add metaKey
2015-07-29 14:44:08 +08:00
Haojian Wu
45f5a10d5d
Use NSImageView to draw tray icon.
...
* Fixes Tempate image doesn't show correctly in dark mode.
* Fixes the tray icon is stretched showing in menubar.
* Fixes title color will not reversed in dark mode.
2015-07-29 13:45:01 +08:00
Cheng Zhao
d42fd6fc7e
win: Pass modifers in 'clicked' events
2015-07-29 13:10:51 +08:00
Cheng Zhao
74248253f5
win: Set GUID when getting icon's bounds
2015-07-29 12:55:44 +08:00
Cheng Zhao
9afa94f4b8
win: Implement double-clicked event
2015-07-29 12:36:01 +08:00
Cheng Zhao
edde653d60
Merge branch 'feature/modifiers-click-tray' of https://github.com/nishanths/electron into nishanths-feature/modifiers-click-tray
2015-07-29 12:19:17 +08:00
Cheng Zhao
0ca9dfbc12
Merge pull request #2337 from nishanths/feature/bounds-tray-dblclick
...
Send bounding Rect on tray double click events
2015-07-29 11:27:04 +08:00
Cheng Zhao
b08af89473
Style fix for #2328
2015-07-29 11:22:12 +08:00
Nishanth Shanmugham
a44f14d76e
Fix code formatting issues
2015-07-27 03:33:15 -07:00
Nishanth Shanmugham
74b4522195
Add keyboard modifiers payload to tray click events
...
* Add keyboard and mouse button bitsum to Tray click events payload
* Move getBoundsFromRect: to common event_util file
* Update documentation
2015-07-27 03:15:51 -07:00
Nishanth Shanmugham
99a8f29de9
Move event type functions to a common event_util file
2015-07-27 00:41:20 -07:00
Nishanth Shanmugham
f53995d555
Send bounding Rect on tray double click events
2015-07-25 20:56:35 -07:00
Paul Betts
5e61974c24
Set NIF_GUID if we have a GUID
2015-07-24 08:05:36 -07:00
Paul Betts
70feb08f84
Fix linting issues
2015-07-24 03:30:23 -07:00
Paul Betts
75b08f510e
Fix up namespaces
2015-07-24 03:27:15 -07:00
Paul Betts
08383a69ce
Propagate User App Model ID to Tray Icon
...
This PR prevents dozens of items showing up in the notification area
preferences when using Squirrel for Windows, by ensuring that
notification tray items are tied to the User App Model ID.
2015-07-24 03:10:03 -07:00
Cheng Zhao
73ded9d378
linux: Fix min/max size not working
2015-07-24 16:21:44 +08:00
Yifei Teng
8960aa956c
Only allow extensions explicitly specified by the user. Fixes #2296
2015-07-23 12:30:07 -07:00
Cheng Zhao
6c44553456
Show all buttons as custom buttons when noLink is specified
2015-07-23 17:34:35 +08:00
Cheng Zhao
cc2a9f617d
Add noLink option for showMessageBox
2015-07-23 17:25:37 +08:00
Cheng Zhao
da724d65d7
Add |options| for ShowMessageBox
2015-07-23 14:16:43 +08:00
Cheng Zhao
dbab889fcc
Merge pull request #2232 from atom/status_item_view
...
Introduce custom status item view on OS X.
2015-07-21 10:36:19 +08:00
Haojian Wu
d342c9a6df
Implement 'drop-files' tray event on OS X.
2015-07-20 20:06:15 +08:00
Haojian Wu
2cd6ad1a97
More code style fixing.
2015-07-16 18:42:20 +08:00
Haojian Wu
736fe0c1db
Fix OS X build error.
2015-07-16 11:43:42 +08:00
Haojian Wu
ed4c69343f
Add 'tray.popContextMenu()' Windows implementation.
2015-07-16 11:42:43 +08:00
Haojian Wu
4421fbf9f3
Implement 'tray.popContextMenu' API on OS X.
2015-07-16 10:50:53 +08:00
Haojian Wu
002eb1a326
Simplify code logic and fix object-c code style.
2015-07-16 10:49:55 +08:00
Haojian Wu
5ad3fff6a0
Implement 'right-clicked' tray event on Windows.
2015-07-15 20:03:05 +08:00
Haojian Wu
cca4f4abd5
Implement 'right-clicked' tray event on OS X.
2015-07-15 19:32:00 +08:00
Haojian Wu
e54fda6b34
Introduce Electron custom statusItem view.
...
Reimplement tray functions on OS X by using custom statusItem view.
2015-07-15 18:26:39 +08:00
Cheng Zhao
5863ed4c33
win: Also map MESSAGE_BOX_TYPE_QUESTION to TD_INFORMATION_ICON
2015-07-13 21:51:19 -07:00
Cheng Zhao
001b4a3179
Final cleanup
2015-07-08 16:24:39 +08:00
Cheng Zhao
9793473b10
Show custom buttons as links
2015-07-08 15:57:45 +08:00
Cheng Zhao
a89e5592f2
Use stock buttons on Windows when possible
2015-07-08 15:55:53 +08:00
Cheng Zhao
989351a41d
Show user's icon when specified
2015-07-08 15:04:34 +08:00
Cheng Zhao
6fb8b2ce4f
Show icon according to dialog's type
2015-07-08 14:46:06 +08:00
Cheng Zhao
f0be4025a5
If "detail" is empty then don't make message hilighted
2015-07-08 14:41:19 +08:00
Cheng Zhao
49da74f976
Handle when dialog is cancelled
2015-07-08 14:35:28 +08:00
Cheng Zhao
1146441c2a
Implement ShowMessageBox with TaskDialog
2015-07-08 14:12:11 +08:00
Cheng Zhao
fb537d91fc
Set default cancelId in JavaScript
2015-07-07 18:39:08 +08:00
Cheng Zhao
b158427271
Add cancelId option for showMessageBox
2015-07-07 18:39:08 +08:00
Cheng Zhao
a2d1ec2c1f
Make "title" work
2015-07-07 17:21:30 +08:00
Cheng Zhao
9b25c16980
Allow "detail" to be empty
2015-07-07 17:21:30 +08:00
Cheng Zhao
810f14aecb
Simplify the code
2015-07-07 17:21:30 +08:00
Cheng Zhao
e627592eed
Reuse ShowMessageBox in ShowErrorBox
2015-07-07 17:21:30 +08:00
Cheng Zhao
3e6394a004
gtk: Map dialog type to message box type
2015-07-07 17:21:30 +08:00
Cheng Zhao
02e28ea758
Fix focusing message box
2015-07-07 17:21:30 +08:00
Cheng Zhao
b98cdf71c4
gtk: Implement message box APIs
2015-07-07 17:21:26 +08:00
Cheng Zhao
8fca1f52d3
Use SetGtkTransientForAura from libgtk2ui
2015-07-07 15:12:08 +08:00
Cheng Zhao
1ff00281f3
Seperate linux's implementation of message box
2015-07-07 15:12:08 +08:00
Haojian Wu
c01a79de6b
Fix the wrong reverse pageup
and pagedown
keys.
2015-07-01 21:24:51 +08:00
Cheng Zhao
03ab9b2686
Merge pull request #1848 from Bitbored/master
...
Added `bounds` payload to tray `clicked` event on Windows
2015-06-09 10:49:01 +08:00
Seppe Stas
cac97cca0d
Initialized rect with zeros
...
As per @zcbenz 's remark: The rect should be initialized with zeros to prevent random values being passed to the click event handler when `Shell_NotifyIconGetRect` fails.
2015-06-08 19:07:46 +02:00
Seppe Stas
16c08e7e37
Switched to gfx::Rect
constructor that takes a RECT
...
As per @zcbenz's suggestion the rect passed to the click event handler now passes a rect constructed using `gfx::Rect(const RECT& r)`.
2015-06-08 19:04:56 +02:00
Haojian Wu
da83ba6c06
Fix dialog.showSaveDialog doesn't show the non-exist file name on Linux.
2015-06-04 14:16:53 +08:00
Seppe Stas
e5c4e34ac4
Ow 💩 , where did that extra space come from?
2015-06-03 07:54:38 +02:00
Seppe Stas
ce8aa073ee
Added bounds
payload to tray clicked
event
...
Used [Shell_NotifyIconGetRect function](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378426 ) to get the bounds of the application's tray icon.
Note: only works with Windows 7 and later.
Related to #1159 , #1500 .
2015-06-02 21:43:37 +02:00
Cheng Zhao
f31bfab127
gtk: Notify the click event
2015-05-21 15:22:52 +08:00