idanarye / woab

Widgets on Actors Bridge - a GUI microframework for combining GTK with Actix
https://crates.io/crates/woab
MIT License
14 stars 1 forks source link

run_dialog variant for native dialogs #34

Closed piegamesde closed 3 years ago

piegamesde commented 3 years ago

run_dialog turns out to be incredibly useful, but I just ran into the issue that native dialogues implement other traits. See FileChooserNative for example. It would be cool if run_dialog supported this as well (maybe run_native_dialog?).

piegamesde commented 3 years ago

I think using

ctx.spawn(
            woab::outside(async move {
                (choose.clone(), choose.run())
            })
            .into_actor(self)
            .map(move |result, this, _ctx| {
                todo!()
            })
        );

as a workaround is concise enough for this kind of edge case.

idanarye commented 3 years ago

No, it is not good enough. The problem with dialog.run() is that it blocks the Actix loop, and this still happens when running native dialogs.

idanarye commented 3 years ago

OK, I see your point. It turns out that:

  1. Native dialogs are not in gtk-rs' default features.
  2. FileChooserNative is the only native dialog.
  3. One can always use FileChooser instead.

So yea, fuck it, I'm not incentivized enough to go through the trouble of introducing features to WoAB just to support this. Reclosing.