blob: 08db40db83fc338d47b6eda27171db1b8ab059e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import Adw from 'gi://Adw';
import Gtk from 'gi://Gtk';
import {ExtensionPreferences} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
export default class OrgAgendaIndicatorPreferences extends ExtensionPreferences {
fillPreferencesWindow(window) {
const settings = this.getSettings('org.gnome.shell.extensions.org-agenda-indicator');
const page = new Adw.PreferencesPage();
const group = new Adw.PreferencesGroup({
title: 'Display',
description: 'Configure what the indicator shows.',
});
const row = new Adw.ActionRow({
title: 'Show clocked-in task',
subtitle: 'Display the active Org clock in the panel and menu when one is running.',
});
const toggle = new Gtk.Switch({
active: settings.get_boolean('show-clocked-in-task'),
valign: Gtk.Align.CENTER,
});
toggle.connect('notify::active', widget => {
settings.set_boolean('show-clocked-in-task', widget.get_active());
});
row.add_suffix(toggle);
row.activatable_widget = toggle;
group.add(row);
page.add(group);
window.add(page);
}
}
|