Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions crates/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ unicode-segmentation = "1"
# macOS, which honours the language chosen for OpenSheet alone; the user's
# interface languages on Windows; LANGUAGE / LC_* / LANG elsewhere).
sys-locale = "0.3"
# Blocking HTTP/1.1 for web queries. Synchronous, so `fetch` can run on
# GPUI's background executor without a second async runtime, and rustls
# (already linked for GPUI) rather than GPUI's async `zed-reqwest` fork,
# which does not enable gzip, brotli or deflate. `flate2` inflates the
# deflate coding ureq itself does not; `url` joins a relative redirect.
ureq = { version = "3", default-features = false, features = ["rustls", "gzip", "brotli"] }
flate2 = "1"
url = "2"

[target.'cfg(target_os = "macos")'.dependencies]
# The Objective-C runtime GPUI already links: for the system spelling
Expand All @@ -45,6 +53,8 @@ winresource = { version = "=0.1.31", default-features = false }
[dev-dependencies]
# The headless window of GPUI, to drive the interface in tests.
gpui = { version = "0.2.2", features = ["test-support"] }
# Encodes brotli in the fetch tests. The application only decompresses it.
brotli = "8"

# Linux packages, made by the release workflow with `cargo deb` and `cargo generate-rpm`.
[package.metadata.deb]
Expand Down
11 changes: 10 additions & 1 deletion crates/app/src/features/data_tools/connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ pub(super) fn set_path(app: &mut ExcelApp, query: &QueryRef, path: &std::path::P
Some(_) => sources::file_url(path),
None => path.to_string_lossy().into_owned(),
};
app.wb.update_import(sheet, index, |import| import.path = address);
app.wb.update_import(sheet, index, |import| import.path = address.clone());
// The user picked this file. A web query may read it again this session.
import::remember_chosen_file(app, &address);
app.commit(t("Change File Path", "Modifier le chemin d’accès au fichier"), cx);
}

Expand Down Expand Up @@ -356,15 +358,22 @@ impl PropertiesDialog {
/// Give a query its edited name and properties, in one undo step.
fn apply(app: &mut ExcelApp, query: &QueryRef, edited: TextImport, cx: &mut Cx) {
let Some((sheet, index)) = query.find(app) else { return };
let previous_minutes = app.wb.sheets[sheet].text_imports[index].props.refresh_minutes;
if app.wb.sheets[sheet].text_imports[index] == edited {
return;
}
let minutes = edited.props.refresh_minutes;
app.wb.update_import(sheet, index, |import| {
// Where the data is may have moved while the dialog was open.
let range = import.range;
*import = edited;
import.range = range;
});
// Turning "Refresh every" on here is the user asking for the clock.
// A workbook that arrived with an interval still has to be agreed to.
if minutes > 0 && minutes != previous_minutes {
import::consent_to_timer(app);
}
app.commit(t("Connection Properties", "Propriétés de connexion"), cx);
}

Expand Down
Loading
Loading