mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 07:52:19 +03:00
Merge pull request #936 from zed-industries/about-window
Make the 'About Zed' menu item display Zed's version number
This commit is contained in:
commit
d9735f312f
@ -58,6 +58,7 @@ lazy_static! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
|
pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
|
||||||
|
cx.add_action(about);
|
||||||
cx.add_global_action(quit);
|
cx.add_global_action(quit);
|
||||||
cx.add_global_action(move |_: &IncreaseBufferFontSize, cx| {
|
cx.add_global_action(move |_: &IncreaseBufferFontSize, cx| {
|
||||||
cx.update_global::<Settings, _, _>(|settings, cx| {
|
cx.update_global::<Settings, _, _>(|settings, cx| {
|
||||||
@ -210,6 +211,14 @@ fn quit(_: &Quit, cx: &mut gpui::MutableAppContext) {
|
|||||||
cx.platform().quit();
|
cx.platform().quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn about(_: &mut Workspace, _: &About, cx: &mut gpui::ViewContext<Workspace>) {
|
||||||
|
cx.prompt(
|
||||||
|
gpui::PromptLevel::Info,
|
||||||
|
&format!("Zed {}", env!("CARGO_PKG_VERSION")),
|
||||||
|
&["OK"],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
async fn install_cli(cx: &AsyncAppContext) -> Result<()> {
|
async fn install_cli(cx: &AsyncAppContext) -> Result<()> {
|
||||||
let cli_path = cx.platform().path_for_auxiliary_executable("cli")?;
|
let cli_path = cx.platform().path_for_auxiliary_executable("cli")?;
|
||||||
let link_path = Path::new("/usr/local/bin/zed");
|
let link_path = Path::new("/usr/local/bin/zed");
|
||||||
|
Loading…
Reference in New Issue
Block a user