Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions dock.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,17 @@ export let Dock = GObject.registerClass(
} catch (err) {
// ignore
}
if (this.dash && c == this.dash._showAppsIcon) {
if (stIcon._defaultIconName === undefined) {
stIcon._defaultIconName = stIcon.icon_name;
}
// themed override; missing names fall back to the stock grid icon
stIcon.fallback_icon_name = stIcon._defaultIconName;
let appsIconName = this.extension.apps_icon_name || '';
stIcon.icon_name = appsIconName.length
? appsIconName
: stIcon._defaultIconName;
}
}
}

Expand Down Expand Up @@ -658,6 +669,10 @@ export let Dock = GObject.registerClass(
}

_cleanupIcon(c) {
if (c._icon && c._icon._defaultIconName !== undefined) {
c._icon.icon_name = c._icon._defaultIconName;
delete c._icon._defaultIconName;
}
if (c._image && c._image.get_parent()) {
c._image.get_parent().remove_child(c._image);
}
Expand Down
1 change: 1 addition & 0 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ export default class Dash2DockLiteExt extends Extension {
break;
case 'apps-icon':
case 'apps-icon-front':
case 'apps-icon-name':
case 'calendar-icon':
case 'clock-icon':
case 'favorites-only': {
Expand Down
4 changes: 4 additions & 0 deletions preferences/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ export const SettingsKeys = () => {
default_value: false,
widget_type: 'switch',
},
'apps-icon-name': {
default_value: '',
widget_type: 'string',
},
'trash-icon': {
default_value: false,
widget_type: 'switch',
Expand Down
16 changes: 15 additions & 1 deletion preferences/prefKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ export let PrefKeys = class {
settings.set_double(name, value);
break;
}
case 'string': {
settings.set_string(name, value);
break;
}
case 'color': {
settings.set_value(name, new GLib.Variant('(dddd)', value));
break;
Expand Down Expand Up @@ -146,7 +150,7 @@ export let PrefKeys = class {
}
case 'string': {
key.value = settings.get_string(name);
if (key.object) key.object.set_value(key.value);
if (key.object && key.object.set_text) key.object.set_text(key.value);
break;
}
case 'color': {
Expand Down Expand Up @@ -264,6 +268,16 @@ export let PrefKeys = class {
});
break;
}
case 'string': {
signal_id = key.object.connect('changed', (w) => {
let value = w.get_text();
self.setValue(name, value);
if (key.callback) {
key.callback(value);
}
});
break;
}
case 'color': {
signal_id = key.object.connect('color-set', (w) => {
let rgba = w.get_rgba();
Expand Down
Binary file modified schemas/gschemas.compiled
Binary file not shown.
5 changes: 5 additions & 0 deletions schemas/org.gnome.shell.extensions.dash2dock-lite.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@
<summary>Apps icon at front</summary>
<description>Position the apps icon at the front.</description>
</key>
<key type="s" name="apps-icon-name">
<default>''</default>
<summary>Apps icon name</summary>
<description>Themed icon name for the apps icon. Leave empty for the default grid icon.</description>
</key>
<key type="i" name="preferred-monitor">
<default>0</default>
<summary>Preferred monitor to dock</summary>
Expand Down
5 changes: 5 additions & 0 deletions ui/others.ui
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
</child>
</object>
</child>
<child>
<object class="AdwEntryRow" id="apps-icon-name">
<property name="title" translatable="yes">Apps Icon Name (themed icon, empty for default)</property>
</object>
</child>
</object>
</child>
<child>
Expand Down