-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Arteiii/zenity
- Loading branch information
Showing
6 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "zenity" | ||
version = "3.0.1" | ||
version = "3.1.0" | ||
authors = ["Arteii <[email protected]>"] | ||
edition = "2021" | ||
license-file = "LICENSE.md" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
use regex::Regex; | ||
use zenity::menu::input::{valid_regex, valid_path}; | ||
use zenity::menu::input::{valid_path, valid_regex}; | ||
|
||
fn main() { | ||
println!("\n\nReturn: {}", valid_regex(Regex::new(r"^\d{3}$").unwrap())); | ||
println!( | ||
"\n\nReturn: {}", | ||
valid_regex(Regex::new(r"^\d{3}$").unwrap()) | ||
); | ||
println!("\n\nPath: {:?}", valid_path()); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
// rmeoved for now will work on it soon | ||
|
||
|
||
// use zenity::menu::selection::{MenuOption, SelectionMenu}; | ||
// use zenity::style::{Color, StyledString}; | ||
// | ||
// | ||
// fn main() { | ||
// let hello_world = MenuOption { | ||
// text: StyledString::new("Hello World"), | ||
// notes: StyledString::new("bli bla blub"), | ||
// }; | ||
// | ||
// | ||
// let method2 = MenuOption { | ||
// text: StyledString::new("method2 says Hi"), | ||
// notes: StyledString::new("No!"), | ||
// }; | ||
// | ||
// | ||
// let menu = SelectionMenu { | ||
// title: StyledString::simple("Selection Menu", Some(Color::Red), None, None), | ||
// options: [hello_world.clone(), method2.clone()].to_vec(), | ||
// }; | ||
// | ||
// | ||
// let selected_option = menu.single(); | ||
// | ||
// | ||
// if selected_option == hello_world { | ||
// println!("User selected Hello World"); | ||
// } else if selected_option == method2 { | ||
// println!("Method2 says Hi"); | ||
// } else { | ||
// // handle other cases (shouldn't be any...) | ||
// } | ||
// | ||
// | ||
// | ||
// | ||
// } | ||
fn main() {} | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters