bekker / msgbox-rs Goto Github PK
View Code? Open in Web Editor NEWSimple, cross-platform message box GUI library
License: MIT License
Simple, cross-platform message box GUI library
License: MIT License
Thank you for this useful crate.
It would be very useful to know if the message box finally popped up or if there had been some error.
Please consider the following extract of linux.rs
.
pub fn create(title:&str, content:&str, icon_type:IconType) {
if gtk::init().is_err() {
println!("Failed to initialize GTK.");
println!("{}", content);
return;
}
Instead of dumping on the console with println!()
I suggest returning some error type. Otherwise there is no way for the caller to know if something went wrong!
Currently this crate is missing android support.
I'm investigating what this would require.
Building on Linux with rustc 1.36.0-dev (50a0defd5 2019-05-21) cause error:
Compiling glib v0.1.3
error[E0119]: conflicting implementations of trait `value::SetValueOptional` for type `&_`:
--> /home/o01eg/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.1.3/src/value.rs:509:1
|
478 | impl<'a, T: ?Sized + SetValueOptional> SetValueOptional for &'a T {
| ----------------------------------------------------------------- first implementation here
...
509 | impl<T: IsA<Object>> SetValueOptional for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
|
= note: downstream crates may implement trait `object::IsA<object::Object>` for type `&_`
error[E0119]: conflicting implementations of trait `value::SetValue` for type `&_`:
--> /home/o01eg/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.1.3/src/value.rs:503:1
|
472 | impl<'a, T: ?Sized + SetValue> SetValue for &'a T {
| ------------------------------------------------- first implementation here
...
503 | impl<T: IsA<Object>> SetValue for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
|
= note: downstream crates may implement trait `object::IsA<object::Object>` for type `&_`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0119`.
error: Could not compile `glib`.
warning: build failed, waiting for other jobs to finish...
error: build failed
It still build on stabe 1.34
It will be nice if I can choose to display "OK", "OK or Cancel", "Yes or No", "Abort, Retry or Ignore" and anything else and get known which button user click by returned value.
It should not make this library too heavy. But makes it more useful.
This is with msgbox 0.7.0, and on macOS Monterey, version 12.3.1. My machine has an Apple M1 Pro chip, which means it could be an architectture-related bug?
I'll also mention that native-dialog has the same bug so it might be an underlying crate issue?
Hi, I have package msgbox for fedora, and they would like to have a license file to include in the package docs.
Hi, if you hide console with:
#![windows_subsystem = "windows"]
The MsgBox close instantly
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.