Skip to content

Commit 71ae5b4

Browse files
author
am1ir
committed
fix: add missing push to _hooks array and fix localization
1 parent 95c4fb1 commit 71ae5b4

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

PersianCalendar@oxygenws.com/extension.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

PersianCalendar@oxygenws.com/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"shell-version": ["48", "49", "50"],
77
"url": "https://github.com/omid/Persian-Calendar-for-Gnome-Shell",
88
"uuid": "PersianCalendar@oxygenws.com",
9-
"version": 127
9+
"version": 128
1010
}

PersianCalendar@oxygenws.com/utils/gettext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class GetText {
4040
let lang = settings.get_string('language');
4141
let localeJsonFile = Gio.File.new_for_path(`${path}/locale/${lang}.json`);
4242
try {
43-
let [_, localeJson] = localeJsonFile.load_contents_async(null);
43+
let [_, localeJson] = localeJsonFile.load_contents(null);
4444
let decoder = new TextDecoder('utf-8');
4545
this.locale = JSON.parse(decoder.decode(localeJson));
4646
} catch {

0 commit comments

Comments
 (0)