Remove Gtk.IconTheme use as St.IconTheme is preferred (but TBD for now)
This commit is contained in:
parent
fae82334a6
commit
1eecb66c15
2 changed files with 2 additions and 17 deletions
|
@ -85,16 +85,6 @@ class PiHole extends panelMenu.Button
|
||||||
// Create a Soup session with which to do requests
|
// Create a Soup session with which to do requests
|
||||||
this.SoupSession = new Soup.Session();
|
this.SoupSession = new Soup.Session();
|
||||||
|
|
||||||
// Access icon theme and keep it up to date
|
|
||||||
const stsettings = St.Settings.get();
|
|
||||||
this.IconTheme = new Gtk.IconTheme();
|
|
||||||
this.IconTheme.set_theme_name( stsettings.gtk_icon_theme );
|
|
||||||
let this_ = this;
|
|
||||||
stsettings.connect( 'notify::gtk-icon-theme', (settings_,key_) => {
|
|
||||||
this_.IconTheme.set_theme_name( settings_.gtk_icon_theme );
|
|
||||||
this_.setIcon();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create button/icon
|
// Create button/icon
|
||||||
this.Icon = new St.Icon({ style_class: 'system-status-icon' });
|
this.Icon = new St.Icon({ style_class: 'system-status-icon' });
|
||||||
this.add_child( this.Icon );
|
this.add_child( this.Icon );
|
||||||
|
@ -208,12 +198,7 @@ class PiHole extends panelMenu.Button
|
||||||
// Get custom icon from theme or file
|
// Get custom icon from theme or file
|
||||||
getCustomIcon(icon_name)
|
getCustomIcon(icon_name)
|
||||||
{
|
{
|
||||||
// Themed?
|
// TBD deal with icon themes via St.IconTheme
|
||||||
if (this.IconTheme.has_icon(icon_name))
|
|
||||||
{
|
|
||||||
this.dprint("setting new icon " + icon_name + " from theme");
|
|
||||||
return Gio.ThemedIcon({name: icon_name});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Falback to included icons
|
// Falback to included icons
|
||||||
let icon_path = PiHoleExtMetadata.dir.get_child('icons').get_child( icon_name + ".svg" ).get_path();
|
let icon_path = PiHoleExtMetadata.dir.get_child('icons').get_child( icon_name + ".svg" ).get_path();
|
||||||
|
|
|
@ -6,5 +6,5 @@
|
||||||
"description": "Status and basic controls of local Pi-Hole",
|
"description": "Status and basic controls of local Pi-Hole",
|
||||||
"settings-schema": "org.gnome.shell.extensions.fnxweb-pi-hole",
|
"settings-schema": "org.gnome.shell.extensions.fnxweb-pi-hole",
|
||||||
"gettext-domain": "gnome-shell-extension-fnxweb-pi-hole",
|
"gettext-domain": "gnome-shell-extension-fnxweb-pi-hole",
|
||||||
"version": 7
|
"version": 8
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue