File tree Expand file tree Collapse file tree 4 files changed +4
-35
lines changed
Expand file tree Collapse file tree 4 files changed +4
-35
lines changed Original file line number Diff line number Diff line change @@ -209,24 +209,8 @@ const init = () => {};
209209
210210const enable = ( ) => {
211211 // Initialize settings
212- let gschema ;
213- let schemaDir = Me . dir . get_child ( "schemas" ) ;
214- if ( schemaDir . query_exists ( null ) ) {
215- gschema = Gio . SettingsSchemaSource . new_from_directory (
216- schemaDir . get_path ( ) ,
217- Gio . SettingsSchemaSource . get_default ( ) ,
218- false
219- ) ;
220- } else {
221- gschema = Gio . SettingsSchemaSource . get_default ( ) ;
222- }
223212
224- settings = new Gio . Settings ( {
225- settings_schema : gschema . lookup (
226- "org.gnome.shell.extensions.mediacontrols" ,
227- true
228- ) ,
229- } ) ;
213+ settings = ExtensionUtils . getSettings ( ) ;
230214
231215 onUpdateDelayChanged = settings . connect ( "changed::update-delay" , ( ) => {
232216 updateDelay = settings . get_int ( "update-delay" ) ;
Original file line number Diff line number Diff line change 33 "description" : " Show controls for the current playing media in the panel" ,
44 "uuid" : " mediacontrols@cliffniff.github.com" ,
55 "url" : " https://github.com/cliffniff/media-controls.git" ,
6+ "settings-schema" : " org.gnome.shell.extensions.mediacontrols" ,
7+ "version" : 0.3 ,
68 "shell-version" : [" 3.38" , " 40" ]
79}
Original file line number Diff line number Diff line change @@ -14,24 +14,7 @@ const shellVersion = Number.parseInt(major);
1414function init ( ) { }
1515
1616function buildPrefsWidget ( ) {
17- let gschema ;
18- let schemaDir = Me . dir . get_child ( "schemas" ) ;
19- if ( schemaDir . query_exists ( null ) ) {
20- gschema = Gio . SettingsSchemaSource . new_from_directory (
21- schemaDir . get_path ( ) ,
22- Gio . SettingsSchemaSource . get_default ( ) ,
23- false
24- ) ;
25- } else {
26- gschema = Gio . SettingsSchemaSource . get_default ( ) ;
27- }
28-
29- let settings = new Gio . Settings ( {
30- settings_schema : gschema . lookup (
31- "org.gnome.shell.extensions.mediacontrols" ,
32- true
33- ) ,
34- } ) ;
17+ let settings = ExtensionUtils . getSettings ( ) ;
3518
3619 let prefsWidget ;
3720 if ( shellVersion < 40 ) {
File renamed without changes.
You can’t perform that action at this time.
0 commit comments