Commit graph

46 commits

Author SHA1 Message Date
Milan Burda
28fd571d0c refactoring: use std::make_unique<T> (#13245) 2018-06-18 16:32:55 +09:00
Shelley Vohr
12a57ff1c2 clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
Jeremy Apthorp
eb7ccf8afa Bring mac code into conformance with -Wobjc-missing-property-synthesis 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
f1587da480 [chromium-style] out-of-line default constructors and destructors 2018-04-19 11:12:58 -07:00
Cheng Zhao
41134f52d9 Fix memory leaks in file_dialog_mac.mm 2018-04-09 16:51:25 +09:00
Yuya Ochiai
2131dc839a Show file filter name for accessory view of file dialog
- Respect filters option of dialog.showOpenDialog() and
  dialog.showSaveDialog(). (#10335)
- Show "All Files" for <input> apart from "accept" attribute. (#11456)
2018-04-09 16:50:21 +09:00
Zhuo Lu
c50a460ce6 Do not block main process for async dialog (#12404) 2018-03-22 08:57:33 -04:00
acheronfail
d1d50a4c92 Implement App-Scoped Security scoped bookmarks (#11711)
* implementation of security scoped bookmarks

* option is now only available on mas builds
2018-02-12 13:25:06 -05:00
Shelley Vohr
36cf548114
change weak ptr ref to strong 2018-02-10 21:04:26 -05:00
Shelley Vohr
3085c78bcf
implement selectFormat selector 2018-02-09 21:38:21 -05:00
Shelley Vohr
0fff336481
add accessory view for format picker 2018-02-09 09:08:04 -05:00
Heilig Benedek
f8b3009ebf restructure code to use web_preferences if possible 2017-11-13 15:50:49 +09:00
Heilig Benedek
71b36ef54d don't show the dummy window for the rest of the dialogs too on mac 2017-11-13 15:46:46 +09:00
Birunthan Mohanathas
511e82de67 Fix missing extension when saving a file without filters
Previously, when triggering the save dialog through e.g. `<a download>`
links (e.g. http://jsfiddle.net/koldev/cW7W5/), the extension was only
saved if Finder was set to show all extensions by default. We now always
display the extension to make sure that it is saved.

If we want to keep the extension hidden, we could also populate the
allowed file types array with the extension from the default filename,
but that would have interfered with how we set the filters.
2017-09-07 16:48:14 -07:00
Shubham
b25a1d10a2 🍎 Add treatPackageasDirectory as an option 2017-07-18 10:13:25 -07:00
Shubham
80e35b6682 🍎 Fix treat packaged app as directory 2017-06-22 17:10:22 -04:00
Kevin Sawicki
e8911fe48c Merge pull request #9610 from shubham2892/incorrect-file-extension-with-showSaveDialog-fix
Fix incorrect extension when filters is used
2017-06-15 10:29:11 -07:00
Kevin Sawicki
15dd0eb583 Add braces to if statement 2017-06-15 10:27:34 -07:00
Shubham
c2603aaac2 🎨 Add documentation 2017-06-03 11:48:18 -04:00
Shubham
217ddd629d 🍎 Fix incorrect extension when filters is used 2017-05-28 15:20:22 -04:00
Birunthan Mohanathas
19555bbab2 Use last selected directory when using default file name in dialog.showSaveDialog()
Prior to this change, attempting to use
`dialog.showSaveDialog({ defaultPath: 'foo.png' })` would open the save
dialog to the current directory with the default file name set to
`foo.png`. We now use the last selected directory instead of the current
directory.

Absolute paths are not affected by this change.
2017-05-26 02:18:23 +03:00
Haojian Wu
d425b63b0d NULL => nullptr 2017-03-30 22:12:14 +02:00
Kevin Sawicki
a746651d1c Use dialog setter for consistency with other properties 2017-02-13 08:23:53 -08:00
Samuel Attard
e45d8079b8 Add support for a noResolveAliases property 2017-02-13 08:23:53 -08:00
Kevin Sawicki
f7f4de36af Merge remote-tracking branch 'origin/master' into macos-open-save-panel 2017-02-09 11:25:05 -08:00
Kevin Sawicki
867bb5a94e Add DialogSettings helper struct 2017-02-09 10:13:11 -08:00
Tan Wang Leng
347dc835b5 Fix code formatting 2017-02-09 21:51:11 +08:00
Tan Wang Leng
a4a71a1dc9 Change qualifier of ShowSaveDialog() parameter
The normal convention in the codebase is to not use references
or 'const' for primitives like 'bool' and 'int'.
2017-02-09 21:50:55 +08:00
Tan Wang Leng
36209ddd90 🍎 Add additional options for Mac's open dialog
Support an additional attributes available in macOS's NSOpenPanel:
message.
2017-02-09 20:10:57 +08:00
Tan Wang Leng
1d612a12a1 🍎 Add additional options for Mac's save dialog
Support additional attributes available in macOS's NSSavePanel: message,
nameFieldLabel and showsTagField
2017-02-09 20:10:57 +08:00
Kevin Sawicki
4fc4f0ae53 Only call setCanSelectHiddenExtension for save dialogs 2016-08-16 17:22:44 -07:00
Cheng Zhao
f08ac07737 mac: Add showHiddenFiles property for showOpenDialog 2016-07-11 13:30:18 +09:00
Ben Gotow
40c531737d Add buttonLabel param to showOpen/showSave dialogs 2016-05-15 01:03:32 -05:00
Cheng Zhao
8aced2c31e Add comment on why checking empty set 2015-12-31 18:58:16 +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
Haojian Wu
5f663dbf0a mac: make * extension filter works. 2015-08-21 12:15:20 +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
5b2c0110dc Fix other compilation errors 2015-03-18 09:57:41 +08:00
Cheng Zhao
750db6aed8 base/file_util.h has been moved to base/files/file_util.h 2015-01-27 13:18:30 -08:00
Kevin Sawicki
b6b6fc3bfd Remove All Rights Reserved after GitHub copyright
Closes #762
2014-10-31 11:17:05 -07:00
Cheng Zhao
0721b34847 mac: Implement the filters option. 2014-08-06 13:58:42 +08:00
Cheng Zhao
dc257f1f86 Add "filters" parameter for file dialogs. 2014-08-06 13:58:42 +08:00
Cheng Zhao
5086873f78 mac: Guard against closed window, fixes #536. 2014-07-31 10:33:45 +08:00
Cheng Zhao
f176b2c58f Switch to use MIT license. 2014-05-04 20:29:08 +08:00
Cheng Zhao
b6ac06c022 Order header files. 2014-03-16 09:37:04 +08:00
Cheng Zhao
516d46444d Move all sources under atom/. 2014-03-16 08:30:26 +08:00
Renamed from browser/ui/file_dialog_mac.mm (Browse further)