Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions PersianCalendar@oxygenws.com/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const PersianCalendar = GObject.registerClass(
// remember to remove it within the disable function
// Main.sessionMode.connect('updated', () => this._genActionButtonsPart());

this._hooks([this.menu, this.menu.connect('open-state-changed', isOpen => {
this._hooks.push([this.menu, this.menu.connect('open-state-changed', isOpen => {
if (isOpen) {
let now = new Date();
now = PersianDate.fromGregorian(now.getFullYear(), now.getMonth() + 1, now.getDate());
Expand Down Expand Up @@ -331,7 +331,7 @@ const PersianCalendar = GObject.registerClass(
x_expand: true,
style_class: 'pcalendar-converter-entry',
});
this._hooks([this.converterYear.clutter_text, this.converterYear.clutter_text.connect('text-changed', this._onModifyConverter.bind(this))]);
this._hooks.push([this.converterYear.clutter_text, this.converterYear.clutter_text.connect('text-changed', this._onModifyConverter.bind(this))]);

this.converterMonth = new St.Entry({
name: 'month',
Expand All @@ -340,7 +340,7 @@ const PersianCalendar = GObject.registerClass(
x_expand: true,
style_class: 'pcalendar-converter-entry',
});
this._hooks([this.converterMonth.clutter_text, this.converterMonth.clutter_text.connect('text-changed', this._onModifyConverter.bind(this))]);
this._hooks.push([this.converterMonth.clutter_text, this.converterMonth.clutter_text.connect('text-changed', this._onModifyConverter.bind(this))]);

this.converterDay = new St.Entry({
name: 'day',
Expand All @@ -360,7 +360,7 @@ const PersianCalendar = GObject.registerClass(
converterHbox.add_child(this.converterDay);
}

this._hooks([this.converterDay.clutter_text, this.converterDay.clutter_text.connect('text-changed', this._onModifyConverter.bind(this))]);
this._hooks.push([this.converterDay.clutter_text, this.converterDay.clutter_text.connect('text-changed', this._onModifyConverter.bind(this))]);

this.converterVbox.add_child(converterHbox);

Expand Down
2 changes: 1 addition & 1 deletion PersianCalendar@oxygenws.com/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"shell-version": ["48", "49", "50"],
"url": "https://github.com/omid/Persian-Calendar-for-Gnome-Shell",
"uuid": "PersianCalendar@oxygenws.com",
"version": 127
"version": 128
}
2 changes: 1 addition & 1 deletion PersianCalendar@oxygenws.com/utils/gettext.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class GetText {
let lang = settings.get_string('language');
let localeJsonFile = Gio.File.new_for_path(`${path}/locale/${lang}.json`);
try {
let [_, localeJson] = localeJsonFile.load_contents_async(null);
let [_, localeJson] = localeJsonFile.load_contents(null);
Comment thread
omid marked this conversation as resolved.
let decoder = new TextDecoder('utf-8');
this.locale = JSON.parse(decoder.decode(localeJson));
} catch {
Expand Down
Loading