Combine both license generations into one file

This commit is contained in:
Mikayla Maki
2023-01-26 18:25:28 -08:00
parent c44acaefff
commit 3a1d533c01
5 changed files with 31 additions and 51 deletions
+1 -5
View File
@@ -339,11 +339,7 @@ pub fn menus() -> Vec<Menu<'static>> {
},
MenuItem::Action {
name: "View Dependency Licenses",
action: Box::new(crate::OpenSoftwareLicenses),
},
MenuItem::Action {
name: "View Theme Licenses",
action: Box::new(crate::OpenThemeLicenses),
action: Box::new(crate::OpenLicenses),
},
MenuItem::Separator,
MenuItem::Action {
+3 -19
View File
@@ -57,8 +57,7 @@ actions!(
DebugElements,
OpenSettings,
OpenLog,
OpenSoftwareLicenses,
OpenThemeLicenses,
OpenLicenses,
OpenTelemetryLog,
OpenKeymap,
OpenDefaultSettings,
@@ -180,32 +179,17 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
});
cx.add_action({
let app_state = app_state.clone();
move |workspace: &mut Workspace,
_: &OpenSoftwareLicenses,
cx: &mut ViewContext<Workspace>| {
move |workspace: &mut Workspace, _: &OpenLicenses, cx: &mut ViewContext<Workspace>| {
open_bundled_file(
workspace,
app_state.clone(),
"software_licenses.md",
"licenses.md",
"Open Source License Attribution",
"Markdown",
cx,
);
}
});
cx.add_action({
let app_state = app_state.clone();
move |workspace: &mut Workspace, _: &OpenThemeLicenses, cx: &mut ViewContext<Workspace>| {
open_bundled_file(
workspace,
app_state.clone(),
"theme_licenses.md",
"Theme License Attribution",
"Markdown",
cx,
);
}
});
cx.add_action({
let app_state = app_state.clone();
move |workspace: &mut Workspace, _: &OpenTelemetryLog, cx: &mut ViewContext<Workspace>| {