mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
refactor(embedder): rename file select message
This commit is contained in:
parent
2fab94785b
commit
9ff11b9af3
3 changed files with 4 additions and 4 deletions
|
@ -145,7 +145,7 @@ pub enum EmbedderMsg {
|
||||||
/// Open dialog to select bluetooth device.
|
/// Open dialog to select bluetooth device.
|
||||||
GetSelectedBluetoothDevice(Vec<String>, IpcSender<Option<String>>),
|
GetSelectedBluetoothDevice(Vec<String>, IpcSender<Option<String>>),
|
||||||
/// Open file dialog to select files. Set boolean flag to true allows to select multiple files.
|
/// Open file dialog to select files. Set boolean flag to true allows to select multiple files.
|
||||||
GetSelectedFiles(Vec<FilterPattern>, bool, IpcSender<Option<Vec<String>>>),
|
SelectFiles(Vec<FilterPattern>, bool, IpcSender<Option<Vec<String>>>),
|
||||||
/// Request to present an IME to the user when an editable element is focused.
|
/// Request to present an IME to the user when an editable element is focused.
|
||||||
ShowIME(TopLevelBrowsingContextId, InputMethodType),
|
ShowIME(TopLevelBrowsingContextId, InputMethodType),
|
||||||
/// Request to hide the IME when the editable element is blurred.
|
/// Request to hide the IME when the editable element is blurred.
|
||||||
|
@ -251,7 +251,7 @@ impl Debug for EmbedderMsg {
|
||||||
EmbedderMsg::LoadComplete(..) => write!(f, "LoadComplete"),
|
EmbedderMsg::LoadComplete(..) => write!(f, "LoadComplete"),
|
||||||
EmbedderMsg::Panic(..) => write!(f, "Panic"),
|
EmbedderMsg::Panic(..) => write!(f, "Panic"),
|
||||||
EmbedderMsg::GetSelectedBluetoothDevice(..) => write!(f, "GetSelectedBluetoothDevice"),
|
EmbedderMsg::GetSelectedBluetoothDevice(..) => write!(f, "GetSelectedBluetoothDevice"),
|
||||||
EmbedderMsg::GetSelectedFiles(..) => write!(f, "GetSelectedFiles"),
|
EmbedderMsg::SelectFiles(..) => write!(f, "SelectFiles"),
|
||||||
EmbedderMsg::ShowIME(..) => write!(f, "ShowIME"),
|
EmbedderMsg::ShowIME(..) => write!(f, "ShowIME"),
|
||||||
EmbedderMsg::HideIME(..) => write!(f, "HideIME"),
|
EmbedderMsg::HideIME(..) => write!(f, "HideIME"),
|
||||||
EmbedderMsg::Shutdown => write!(f, "Shutdown"),
|
EmbedderMsg::Shutdown => write!(f, "Shutdown"),
|
||||||
|
|
|
@ -220,7 +220,7 @@ impl FileManagerStore {
|
||||||
multiple_files: bool,
|
multiple_files: bool,
|
||||||
embedder_proxy: EmbedderProxy) -> Option<Vec<String>> {
|
embedder_proxy: EmbedderProxy) -> Option<Vec<String>> {
|
||||||
let (ipc_sender, ipc_receiver) = ipc::channel().expect("Failed to create IPC channel!");
|
let (ipc_sender, ipc_receiver) = ipc::channel().expect("Failed to create IPC channel!");
|
||||||
let msg = EmbedderMsg::GetSelectedFiles(patterns, multiple_files, ipc_sender);
|
let msg = EmbedderMsg::SelectFiles(patterns, multiple_files, ipc_sender);
|
||||||
|
|
||||||
embedder_proxy.send(msg);
|
embedder_proxy.send(msg);
|
||||||
match ipc_receiver.recv() {
|
match ipc_receiver.recv() {
|
||||||
|
|
|
@ -297,7 +297,7 @@ impl Browser {
|
||||||
EmbedderMsg::GetSelectedBluetoothDevice(devices, sender) => {
|
EmbedderMsg::GetSelectedBluetoothDevice(devices, sender) => {
|
||||||
platform_get_selected_devices(devices, sender);
|
platform_get_selected_devices(devices, sender);
|
||||||
},
|
},
|
||||||
EmbedderMsg::GetSelectedFiles(patterns, multiple_files, sender) => {
|
EmbedderMsg::SelectFiles(patterns, multiple_files, sender) => {
|
||||||
if opts::get().headless {
|
if opts::get().headless {
|
||||||
let _ = sender.send(None);
|
let _ = sender.send(None);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue