mirror of
https://github.com/MeexReay/bRAC.git
synced 2025-05-06 13:38:04 +03:00
disable gtk as default
This commit is contained in:
parent
c1f6afe563
commit
6e5d050de3
@ -18,7 +18,7 @@ gtk4 = { version = "0.9.6", optional = true }
|
||||
cfg-if = "1.0.0"
|
||||
|
||||
[features]
|
||||
default = ["ssl", "homedir", "gtk_gui"]
|
||||
default = ["ssl", "homedir", "pretty_tui"]
|
||||
ssl = ["dep:native-tls"]
|
||||
pretty_tui = ["dep:crossterm"]
|
||||
gtk_gui = ["dep:gtk4"]
|
||||
|
13
README.md
13
README.md
@ -49,6 +49,12 @@ Minimal version:
|
||||
cargo build --release --no-default-features
|
||||
cargo run --release --no-default-features
|
||||
```
|
||||
GTK version:
|
||||
|
||||
```bash
|
||||
cargo build --release --features gtk_gui
|
||||
cargo run --release --features gtk_gui
|
||||
```
|
||||
|
||||
### nix package
|
||||
|
||||
@ -66,6 +72,13 @@ nix build github:MeexReay/bRAC#bRAC-minimal
|
||||
nix run github:MeexReay/bRAC#bRAC-minimal
|
||||
```
|
||||
|
||||
GTK version:
|
||||
|
||||
```bash
|
||||
nix build github:MeexReay/bRAC#bRAC-gtk
|
||||
nix run github:MeexReay/bRAC#bRAC-gtk
|
||||
```
|
||||
|
||||
## default config
|
||||
|
||||
get config path - `bRAC --config-path` \
|
||||
|
@ -32,11 +32,12 @@ struct UiModel {
|
||||
chat_scrolled: ScrolledWindow
|
||||
}
|
||||
|
||||
thread_local!(
|
||||
static GLOBAL: RefCell<Option<(UiModel, Receiver<String>)>> = RefCell::new(None);
|
||||
);
|
||||
|
||||
pub fn add_chat_message(ctx: Arc<Context>, message: String) {
|
||||
let _ = ctx.chat().sender.send(message);
|
||||
// MainContext::default().invoke_local(move || {
|
||||
// ctx.chat().chat_box.upgrade().unwrap().append(&Label::new(Some(message.as_str())));
|
||||
// });
|
||||
}
|
||||
|
||||
pub fn print_message(ctx: Arc<Context>, message: String) -> Result<(), Box<dyn Error>> {
|
||||
@ -461,7 +462,3 @@ pub fn run_main_loop(ctx: Arc<Context>) {
|
||||
|
||||
application.run();
|
||||
}
|
||||
|
||||
thread_local!(
|
||||
static GLOBAL: RefCell<Option<(UiModel, Receiver<String>)>> = RefCell::new(None);
|
||||
);
|
Loading…
Reference in New Issue
Block a user