Skip to content

Commit 6bb5300

Browse files
authored
Merge pull request #33 from ranfdev/next
Next
2 parents 0952d9d + fdcdc1a commit 6bb5300

20 files changed

+907
-457
lines changed

.github/workflows/flatpak.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
on:
22
push:
33
tags: [ v*.*.* ]
4-
pull_request:
54
workflow_dispatch:
65

76
concurrency:

data/com.ranfdev.DistroShelf.metainfo.xml.in

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@
7171
</screenshots>
7272

7373
<releases>
74+
<release version="1.0.10" date="2025-06-24">
75+
<description translate="no">
76+
<ul>
77+
<li>Added command log dialog</li>
78+
</ul>
79+
</description>
80+
</release>
81+
<release version="1.0.9" date="2025-06-24">
82+
<description translate="no">
83+
<ul>
84+
<li>Fixed assemble from file and from url</li>
85+
<li>Preview resolved path from host filesystem in assemble dialog</li>
86+
</ul>
87+
</description>
88+
</release>
7489
<release version="1.0.8" date="2025-05-28">
7590
<description translate="no">
7691
<ul>

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project('distroshelf', 'rust',
2-
version: '1.0.8',
2+
version: '1.0.10',
33
meson_version: '>= 1.0.0',
44
default_options: [ 'warning_level=2', 'werror=false', ],
55
)

src/application.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ use gettextrs::gettext;
2727
use gtk::{gio, glib};
2828

2929
use crate::config::VERSION;
30-
use crate::distrobox::{
31-
CommandRunner, Distrobox, DistroboxCommandRunnerResponse, FlatpakCommandRunner,
32-
RealCommandRunner,
33-
};
30+
use crate::distrobox::{Distrobox, DistroboxCommandRunnerResponse, FlatpakCommandRunner};
31+
use crate::fakers::{CommandRunner, RealCommandRunner};
3432
use crate::root_store::RootStore;
3533
use crate::DistroShelfWindow;
3634

@@ -224,13 +222,17 @@ impl DistroShelfApplication {
224222
}
225223
_ => {
226224
if Self::get_is_in_flatpak() {
227-
Rc::new(FlatpakCommandRunner::new(Rc::new(RealCommandRunner {}))) as Rc<dyn CommandRunner>
225+
CommandRunner::new(Rc::new(FlatpakCommandRunner::new(Rc::new(
226+
RealCommandRunner::new(),
227+
))))
228228
} else {
229-
Rc::new(RealCommandRunner {}) as Rc<dyn CommandRunner>
229+
CommandRunner::new_real()
230230
}
231231
}
232232
};
233233

234+
command_runner.output_tracker().enable();
235+
234236
self.set_root_store(RootStore::new(command_runner));
235237
let window =
236238
DistroShelfWindow::new(self.upcast_ref::<adw::Application>(), self.root_store());

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub static VERSION: &str = "1.0.8";
1+
pub static VERSION: &str = "1.0.10";
22
pub static GETTEXT_PACKAGE: &str = "distroshelf";
33
pub static LOCALEDIR: &str = "/app/share/locale";
44
pub static PKGDATADIR: &str = "/app/share/distroshelf";

src/container.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use crate::{
2-
distrobox::{Command, ContainerInfo, ExportableApp, Status},
2+
distrobox::{ContainerInfo, ExportableApp, Status},
33
distrobox_task::DistroboxTask,
44
known_distros::{known_distro_by_image, KnownDistro},
55
remote_resource::RemoteResource,
66
root_store::RootStore,
7+
fakers::Command
78
};
89

910
use gtk::{

src/create_distrobox_dialog.rs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,35 @@ impl CreateDistroboxDialog {
349349

350350
let title = title.to_owned();
351351
let dialog_cb = clone!(
352+
#[weak(rename_to=this)]
353+
self,
354+
#[strong]
355+
title,
352356
#[weak]
353357
row,
354358
move |res: Result<File, _>| {
355359
if let Ok(file) = res {
356360
if let Some(path) = file.path() {
357-
row.set_subtitle(&path.display().to_string());
358-
cb(path);
361+
362+
glib::MainContext::ref_thread_default().spawn_local(async move {
363+
match this
364+
.root_store()
365+
.resolve_host_path(&path.display().to_string())
366+
.await
367+
{
368+
Ok(resolved_path) => {
369+
row.set_subtitle(&resolved_path);
370+
cb(PathBuf::from(resolved_path));
371+
}
372+
373+
Err(e) => {
374+
this.update_errors::<()>(&Err(Error::InvalidField(
375+
title.to_lowercase(),
376+
e.to_string(),
377+
)));
378+
}
379+
}
380+
});
359381
}
360382
}
361383
}
@@ -432,7 +454,9 @@ impl CreateDistroboxDialog {
432454
pub fn build_volumes_group(&self) -> adw::PreferencesGroup {
433455
let volumes_group = adw::PreferencesGroup::new();
434456
volumes_group.set_title("Volumes");
435-
volumes_group.set_description(Some("Specify volumes in the format 'host_path:container_path'"));
457+
volumes_group.set_description(Some(
458+
"Specify volumes in the format 'host_path:container_path'",
459+
));
436460

437461
let add_volume_button = adw::ButtonRow::builder().title("Add Volume").build();
438462
add_volume_button.connect_activated(clone!(

0 commit comments

Comments
 (0)