Skip to content

Commit

Permalink
remove manual window icon
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Sep 12, 2023
1 parent bb004e7 commit 78c8435
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 25 deletions.
Binary file removed res/applogo-big.png
Binary file not shown.
Binary file removed res/applogo.png
Binary file not shown.
7 changes: 1 addition & 6 deletions src/view/about/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
// <https://www.gnu.org/licenses/agpl-3.0-standalone.html>.

use gladis::Gladis;
use gtk::gdk_pixbuf::Pixbuf;
use gtk::prelude::*;
use gtk::{gdk, Dialog, Entry, Image};
use relm::Relm;

use super::{Msg, ViewModel};
use crate::view::APP_ICON;

// Create the structure that holds the widgets used in the view.
#[derive(Clone, Gladis)]
Expand All @@ -27,10 +25,7 @@ pub struct Widgets {
}

impl Widgets {
pub fn init_ui(&self, _model: &ViewModel) {
let icon = Pixbuf::from_read(APP_ICON).expect("small app icon is missed");
self.logo_img.set_pixbuf(Some(&icon));
}
pub fn init_ui(&self, _model: &ViewModel) {}

pub fn show(&self) { self.dialog.show() }
pub fn hide(&self) { self.dialog.hide() }
Expand Down
7 changes: 1 addition & 6 deletions src/view/launch/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::path::PathBuf;

use bpro::{Requirement, WalletTemplate};
use gladis::Gladis;
use gtk::gdk_pixbuf::Pixbuf;
use gtk::prelude::*;
use gtk::{
Adjustment, ApplicationWindow, Button, InfoBar, ListBox, ListBoxRow, Notebook,
Expand All @@ -25,7 +24,6 @@ use wallet::descriptors::DescriptorClass;
use wallet::onchain::PublicNetwork;

use super::{Msg, Page};
use crate::view::APP_ICON;

#[derive(Clone, Gladis)]
pub struct Widgets {
Expand Down Expand Up @@ -64,10 +62,7 @@ impl Widgets {
pub fn to_root(&self) -> ApplicationWindow { self.window.clone() }
pub fn as_root(&self) -> &ApplicationWindow { &self.window }

pub fn init_ui(&self) {
let icon = Pixbuf::from_read(APP_ICON).expect("app icon is missed");
self.window.set_icon(Some(&icon));
}
pub fn init_ui(&self) {}

fn is_taproot(&self) -> bool { self.taproot_swch.is_active() }

Expand Down
2 changes: 0 additions & 2 deletions src/view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ pub mod psbt;
pub mod settings;
pub mod wallet;

pub const APP_ICON: &[u8] = include_bytes!("../../res/applogo-big.png");

use std::path::PathBuf;

use gtk::prelude::*;
Expand Down
8 changes: 2 additions & 6 deletions src/view/psbt/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use bitcoin::blockdata::constants::WITNESS_SCALE_FACTOR;
use bitcoin::Address;
use bitcoin_scripts::address::AddressFormat;
use gladis::Gladis;
use gtk::gdk_pixbuf::Pixbuf;
use gtk::prelude::*;
use gtk::{
gdk, ApplicationWindow, Button, Dialog, Entry, Expander, HeaderBar, Label, LevelBar, ListBox,
Expand All @@ -28,10 +27,10 @@ use relm::Relm;
use wallet::onchain::PublicNetwork;

use super::{Msg, ViewModel};
use crate::view::launch;
use crate::view::launch::Page;
use crate::view::psbt::sign_row;
use crate::view::psbt::sign_row::SigningModel;
use crate::view::{launch, APP_ICON};

// Create the structure that holds the widgets used in the view.
#[derive(Clone, Gladis)]
Expand Down Expand Up @@ -76,10 +75,7 @@ pub struct Widgets {
}

impl Widgets {
pub fn init_ui(&self) {
let icon = Pixbuf::from_read(APP_ICON).expect("app icon is missed");
self.window.set_icon(Some(&icon));
}
pub fn init_ui(&self) {}

pub fn update_ui(&self, model: &ViewModel) {
let psbt: &Psbt = model.psbt();
Expand Down
6 changes: 1 addition & 5 deletions src/view/wallet/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use bpro::{
use chrono::{DateTime, NaiveDateTime, Utc};
use electrum_client::HeaderNotification;
use gladis::Gladis;
use gtk::gdk_pixbuf::Pixbuf;
use gtk::prelude::*;
use gtk::{
gdk, Adjustment, ApplicationWindow, Button, CellRendererText, CheckButton, HeaderBar, Image,
Expand All @@ -34,8 +33,8 @@ use wallet::hd::SegmentIndexes;

use super::{ElectrumState, Msg, ViewModel};
use crate::model::{display_accounting_amount, FormatDate, UI as UIColorTrait};
use crate::view::launch;
use crate::view::wallet::pay;
use crate::view::{launch, APP_ICON};
use crate::worker::exchange::{Exchange, Fiat};

trait UI {
Expand Down Expand Up @@ -387,9 +386,6 @@ impl Widgets {
pub fn init_ui(&mut self, model: &mut ViewModel) {
let settings = model.as_settings();

let icon = Pixbuf::from_read(APP_ICON).expect("app icon is missed");
self.window.set_icon(Some(&icon));

self.header_bar
.set_title(model.path().file_name().and_then(OsStr::to_str));
self.header_bar
Expand Down

0 comments on commit 78c8435

Please sign in to comment.