diff --git a/src/chat/gui.rs b/src/chat/gui.rs index 0ae243d..f78c453 100644 --- a/src/chat/gui.rs +++ b/src/chat/gui.rs @@ -2,6 +2,7 @@ use std::sync::{mpsc::{channel, Receiver}, Arc, RwLock}; use std::cell::RefCell; use std::time::{Duration, SystemTime}; use std::thread; +use std::error::Error; use chrono::Local; @@ -54,11 +55,11 @@ pub fn add_chat_message(ctx: Arc, message: String) { let _ = ctx.sender.read().unwrap().clone().unwrap().send((message, false)); } -fn load_pixbuf(data: &[u8]) -> Pixbuf { +fn load_pixbuf(data: &[u8]) -> Result> { let loader = PixbufLoader::new(); - loader.write(data).unwrap(); - loader.close().unwrap(); - loader.pixbuf().unwrap() + loader.write(data)?; + loader.close()?; + Ok(loader.pixbuf().ok_or("laod pixbuf error")?) } macro_rules! gui_entry_setting { @@ -361,7 +362,7 @@ fn build_menu(ctx: Arc, app: &Application) { .activate(clone!( #[weak] app, move |_, _, _| { - AboutDialog::builder() + AboutDialog::builder() .application(&app) .authors(["TheMixRay", "MeexReay"]) .license(" DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE @@ -380,7 +381,7 @@ fn build_menu(ctx: Arc, app: &Application) { .comments("better RAC client") .website("https://github.com/MeexReay/bRAC") .website_label("source code") - .logo(&Texture::for_pixbuf(&load_pixbuf(include_bytes!("images/icon.png")))) + .logo(&Texture::for_pixbuf(&load_pixbuf(include_bytes!("images/icon.png")).unwrap())) .build() .present(); } @@ -448,14 +449,14 @@ fn build_ui(ctx: Arc, app: &Application) -> UiModel { let fixed = Fixed::new(); fixed.set_can_target(false); - let konata = Picture::for_pixbuf(&load_pixbuf(include_bytes!("images/konata.png"))); + let konata = Picture::for_pixbuf(&load_pixbuf(include_bytes!("images/konata.png")).unwrap()); konata.set_size_request(174, 127); fixed.put(&konata, 325.0, 4.0); let logo_gif = include_bytes!("images/logo.gif"); - let logo = Picture::for_pixbuf(&load_pixbuf(logo_gif)); + let logo = Picture::for_pixbuf(&load_pixbuf(logo_gif).unwrap()); logo.set_size_request(152, 64); let logo_anim = PixbufAnimation::from_stream( @@ -914,4 +915,4 @@ pub fn run_main_loop(ctx: Arc) { { libnotify::uninit(); } -} \ No newline at end of file +} diff --git a/src/chat/images/icon.png b/src/chat/images/icon.png index 2a83010..7e1fd4e 100644 Binary files a/src/chat/images/icon.png and b/src/chat/images/icon.png differ diff --git a/src/chat/images/konata.png b/src/chat/images/konata.png index cf6026c..e29a4cb 100644 Binary files a/src/chat/images/konata.png and b/src/chat/images/konata.png differ diff --git a/src/chat/images/logo.gif b/src/chat/images/logo.gif index f7c8325..1d921ee 100644 --- a/src/chat/images/logo.gif +++ b/src/chat/images/logo.gif @@ -1,3 +1,2042 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fdc05097ef32682f52da42028169b180d711742163dc9d142522c8bfffb93510 -size 20425 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bRAC/src/chat/images/logo.gif at main · MeexReay/bRAC · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ Skip to content + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + +
+ +
+ +
+ +
+ + + + / + + bRAC + + + Public +
+ + +
+ +
+ + +
+
+ +
+
+ + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ +
+
+ +
+ +
+

Footer

+ + + + +
+
+ + + + + © 2025 GitHub, Inc. + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +