Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Commit

Permalink
Add missing set_icon_from_buffer to Application
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-abramov committed Aug 1, 2017
1 parent 4d7e0c6 commit 79a9fc6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ impl Window {
panic!("Not implemented on this platform!");
}

pub fn set_icon_from_buffer(&self, _: &[u8], _: u32, _: u32) -> Result<(), SystrayError> {
unimplemented!()
}

pub fn quit(&self) {
glib::idle_add(|| {
gtk::main_quit();
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ impl Application {
self.window.set_icon_from_resource(resource)
}

pub fn set_icon_from_buffer(&mut self, buffer: &[u8], width: u32, height: u32)
-> Result<(), SystrayError>
{
self.window.set_icon_from_buffer(buffer, width, height)
}

pub fn shutdown(&self) -> Result<(), SystrayError> {
self.window.shutdown()
}
Expand Down

0 comments on commit 79a9fc6

Please sign in to comment.