Skip to content

Commit

Permalink
Add the GitHub Icon to the notification
Browse files Browse the repository at this point in the history
  • Loading branch information
mackdk committed Sep 9, 2022
1 parent 275bc5e commit 00798ef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class GithubNotifications {
this.showParticipatingOnly = false;
this._source = null;
this.settings = null;
this.icon = null;
}

interval() {
Expand Down Expand Up @@ -117,12 +118,12 @@ class GithubNotifications {

this.checkVisibility();

let icon = new St.Icon({
this.icon = new St.Icon({
style_class: 'system-status-icon'
});
icon.gicon = Gio.icon_new_for_string(`${Me.path}/github.svg`);
this.icon.gicon = Gio.icon_new_for_string(`${Me.path}/github.svg`);

this.box.add_actor(icon);
this.box.add_actor(this.icon);
this.box.add_actor(this.label);

this.box.connect('button-press-event', (_, event) => {
Expand Down Expand Up @@ -265,7 +266,7 @@ class GithubNotifications {
this.addNotificationSource();

if (this._source && this._source.notifications.length == 0) {
notification = new MessageTray.Notification(this._source, title, message);
notification = new MessageTray.Notification(this._source, title, message, { gicon: this.icon.gicon });

notification.setTransient(false);
notification.setResident(false);
Expand Down

0 comments on commit 00798ef

Please sign in to comment.