11// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
22
33const Gio = imports . gi . Gio ;
4- const Lang = imports . lang ;
54const Meta = imports . gi . Meta ;
65
76const LOGGING = false ;
@@ -15,23 +14,23 @@ var BackgroundManager = class {
1514 this . _gnomeSettings = new Gio . Settings ( { schema_id : "org.gnome.desktop.background" } ) ;
1615 this . _cinnamonSettings = new Gio . Settings ( { schema_id : "org.cinnamon.desktop.background" } ) ;
1716
18- this . color_shading_type = this . _gnomeSettings . get_string ( "color-shading-type" ) ;
19- this . _gnomeSettings . connect ( "changed::color-shading-type" , Lang . bind ( this , this . _onColorShadingTypeChanged ) ) ;
17+ this . colorShadingType = this . _gnomeSettings . get_string ( "color-shading-type" ) ;
18+ this . _gnomeSettings . connect ( "changed::color-shading-type" , this . _onColorShadingTypeChanged . bind ( this ) ) ;
2019
21- this . picture_options = this . _gnomeSettings . get_string ( "picture-options" ) ;
22- this . _gnomeSettings . connect ( "changed::picture-options" , Lang . bind ( this , this . _onPictureOptionsChanged ) ) ;
20+ this . pictureOptions = this . _gnomeSettings . get_string ( "picture-options" ) ;
21+ this . _gnomeSettings . connect ( "changed::picture-options" , this . _onPictureOptionsChanged . bind ( this ) ) ;
2322
24- this . picture_uri = this . _gnomeSettings . get_string ( "picture-uri" ) ;
25- this . _gnomeSettings . connect ( "changed::picture-uri" , Lang . bind ( this , this . _onPictureURIChanged ) ) ;
23+ this . pictureUri = this . _gnomeSettings . get_string ( "picture-uri" ) ;
24+ this . _gnomeSettings . connect ( "changed::picture-uri" , this . _onPictureURIChanged . bind ( this ) ) ;
2625
27- this . primary_color = this . _gnomeSettings . get_string ( "primary-color" ) ;
28- this . _gnomeSettings . connect ( "changed::primary-color" , Lang . bind ( this , this . _onPrimaryColorChanged ) ) ;
26+ this . primaryColor = this . _gnomeSettings . get_string ( "primary-color" ) ;
27+ this . _gnomeSettings . connect ( "changed::primary-color" , this . _onPrimaryColorChanged . bind ( this ) ) ;
2928
30- this . secondary_color = this . _gnomeSettings . get_string ( "secondary-color" ) ;
31- this . _gnomeSettings . connect ( "changed::secondary-color" , Lang . bind ( this , this . _onSecondaryColorChanged ) ) ;
29+ this . secondaryColor = this . _gnomeSettings . get_string ( "secondary-color" ) ;
30+ this . _gnomeSettings . connect ( "changed::secondary-color" , this . _onSecondaryColorChanged . bind ( this ) ) ;
3231
33- this . picture_opacity = this . _gnomeSettings . get_int ( "picture-opacity" ) ;
34- this . _gnomeSettings . connect ( "changed::picture-opacity" , Lang . bind ( this , this . _onPictureOpacityChanged ) ) ;
32+ this . pictureOpacity = this . _gnomeSettings . get_int ( "picture-opacity" ) ;
33+ this . _gnomeSettings . connect ( "changed::picture-opacity" , this . _onPictureOpacityChanged . bind ( this ) ) ;
3534 }
3635
3736 showBackground ( ) {
@@ -53,80 +52,80 @@ var BackgroundManager = class {
5352 }
5453
5554 _onColorShadingTypeChanged ( schema , key ) {
56- let oldValue = this . color_shading_type
55+ let oldValue = this . colorShadingType
5756 let newValue = this . _gnomeSettings . get_string ( key ) ;
5857 if ( oldValue != newValue ) {
5958 let cinnamonValue = this . _cinnamonSettings . get_string ( key ) ;
6059 if ( cinnamonValue != newValue ) {
6160 if ( LOGGING ) global . log ( "BackgroundManager: %s changed (%s --> %s)" . format ( key , oldValue , newValue ) ) ;
6261 this . _cinnamonSettings . set_string ( key , newValue ) ;
6362 }
64- this . color_shading_type = newValue ;
63+ this . colorShadingType = newValue ;
6564 }
6665 }
6766
6867 _onPictureOptionsChanged ( schema , key ) {
69- let oldValue = this . picture_options
68+ let oldValue = this . pictureOptions
7069 let newValue = this . _gnomeSettings . get_string ( key ) ;
7170 if ( oldValue != newValue ) {
7271 let cinnamonValue = this . _cinnamonSettings . get_string ( key ) ;
7372 if ( cinnamonValue != newValue ) {
7473 if ( LOGGING ) global . log ( "BackgroundManager: %s changed (%s --> %s)" . format ( key , oldValue , newValue ) ) ;
7574 this . _cinnamonSettings . set_string ( key , newValue ) ;
7675 }
77- this . picture_options = newValue ;
76+ this . pictureOptions = newValue ;
7877 }
7978 }
8079
8180 _onPictureURIChanged ( schema , key ) {
82- let oldValue = this . picture_uri
81+ let oldValue = this . pictureUri
8382 let newValue = this . _gnomeSettings . get_string ( key ) ;
8483 if ( oldValue != newValue ) {
8584 let cinnamonValue = this . _cinnamonSettings . get_string ( key ) ;
8685 if ( cinnamonValue != newValue ) {
8786 if ( LOGGING ) global . log ( "BackgroundManager: %s changed (%s --> %s)" . format ( key , oldValue , newValue ) ) ;
8887 this . _cinnamonSettings . set_string ( key , newValue ) ;
8988 }
90- this . picture_uri = newValue ;
89+ this . pictureUri = newValue ;
9190 }
9291 }
9392
9493 _onPrimaryColorChanged ( schema , key ) {
95- let oldValue = this . primary_color
94+ let oldValue = this . primaryColor
9695 let newValue = this . _gnomeSettings . get_string ( key ) ;
9796 if ( oldValue != newValue ) {
9897 let cinnamonValue = this . _cinnamonSettings . get_string ( key ) ;
9998 if ( cinnamonValue != newValue ) {
10099 if ( LOGGING ) global . log ( "BackgroundManager: %s changed (%s --> %s)" . format ( key , oldValue , newValue ) ) ;
101100 this . _cinnamonSettings . set_string ( key , newValue ) ;
102101 }
103- this . primary_color = newValue ;
102+ this . primaryColor = newValue ;
104103 }
105104 }
106105
107106 _onSecondaryColorChanged ( schema , key ) {
108- let oldValue = this . secondary_color
107+ let oldValue = this . secondaryColor
109108 let newValue = this . _gnomeSettings . get_string ( key ) ;
110109 if ( oldValue != newValue ) {
111110 let cinnamonValue = this . _cinnamonSettings . get_string ( key ) ;
112111 if ( cinnamonValue != newValue ) {
113112 if ( LOGGING ) global . log ( "BackgroundManager: %s changed (%s --> %s)" . format ( key , oldValue , newValue ) ) ;
114113 this . _cinnamonSettings . set_string ( key , newValue ) ;
115114 }
116- this . secondary_color = newValue ;
115+ this . secondaryColor = newValue ;
117116 }
118117 }
119118
120119 _onPictureOpacityChanged ( schema , key ) {
121- let oldValue = this . picture_opacity
120+ let oldValue = this . pictureOpacity
122121 let newValue = this . _gnomeSettings . get_int ( key ) ;
123122 if ( oldValue != newValue ) {
124123 let cinnamonValue = this . _cinnamonSettings . get_int ( key ) ;
125124 if ( cinnamonValue != newValue ) {
126125 if ( LOGGING ) global . log ( "BackgroundManager: %s changed (%s --> %s)" . format ( key , oldValue , newValue ) ) ;
127126 this . _cinnamonSettings . set_int ( key , newValue ) ;
128127 }
129- this . picture_opacity = newValue ;
128+ this . pictureOpacity = newValue ;
130129 }
131130 }
132131} ;
0 commit comments