@@ -127,7 +127,7 @@ const PersianCalendar = GObject.registerClass(
127127 // remember to remove it within the disable function
128128 // Main.sessionMode.connect('updated', () => this._genActionButtonsPart());
129129
130- this . _hooks ( [ this . menu , this . menu . connect ( 'open-state-changed' , isOpen => {
130+ this . _hooks . push ( [ this . menu , this . menu . connect ( 'open-state-changed' , isOpen => {
131131 if ( isOpen ) {
132132 let now = new Date ( ) ;
133133 now = PersianDate . fromGregorian ( now . getFullYear ( ) , now . getMonth ( ) + 1 , now . getDate ( ) ) ;
@@ -331,7 +331,7 @@ const PersianCalendar = GObject.registerClass(
331331 x_expand : true ,
332332 style_class : 'pcalendar-converter-entry' ,
333333 } ) ;
334- this . _hooks ( [ this . converterYear . clutter_text , this . converterYear . clutter_text . connect ( 'text-changed' , this . _onModifyConverter . bind ( this ) ) ] ) ;
334+ this . _hooks . push ( [ this . converterYear . clutter_text , this . converterYear . clutter_text . connect ( 'text-changed' , this . _onModifyConverter . bind ( this ) ) ] ) ;
335335
336336 this . converterMonth = new St . Entry ( {
337337 name : 'month' ,
@@ -340,7 +340,7 @@ const PersianCalendar = GObject.registerClass(
340340 x_expand : true ,
341341 style_class : 'pcalendar-converter-entry' ,
342342 } ) ;
343- this . _hooks ( [ this . converterMonth . clutter_text , this . converterMonth . clutter_text . connect ( 'text-changed' , this . _onModifyConverter . bind ( this ) ) ] ) ;
343+ this . _hooks . push ( [ this . converterMonth . clutter_text , this . converterMonth . clutter_text . connect ( 'text-changed' , this . _onModifyConverter . bind ( this ) ) ] ) ;
344344
345345 this . converterDay = new St . Entry ( {
346346 name : 'day' ,
@@ -360,7 +360,7 @@ const PersianCalendar = GObject.registerClass(
360360 converterHbox . add_child ( this . converterDay ) ;
361361 }
362362
363- this . _hooks ( [ this . converterDay . clutter_text , this . converterDay . clutter_text . connect ( 'text-changed' , this . _onModifyConverter . bind ( this ) ) ] ) ;
363+ this . _hooks . push ( [ this . converterDay . clutter_text , this . converterDay . clutter_text . connect ( 'text-changed' , this . _onModifyConverter . bind ( this ) ) ] ) ;
364364
365365 this . converterVbox . add_child ( converterHbox ) ;
366366
0 commit comments