Skip to content

Commit

Permalink
Fix attempt final
Browse files Browse the repository at this point in the history
  • Loading branch information
sakithb committed Aug 29, 2021
1 parent 277e4e7 commit 0c323d5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ function buildPrefsWidget() {
row_spacing: 8,
visible: true,
column_homogeneous: true,
vexpand: true,
});
} else {
widgetPrefs = new Gtk.Grid({
Expand All @@ -61,7 +60,6 @@ function buildPrefsWidget() {
row_spacing: 8,
visible: true,
column_homogeneous: true,
vexpand: true,
});
}

Expand Down Expand Up @@ -228,7 +226,7 @@ function buildPrefsWidget() {
});

let labelSepCharCustom = new Gtk.Label({
label: "Custom:",
label: "Custom (Ex - '<...>'):",
halign: Gtk.Align.END,
visible: true,
});
Expand All @@ -242,6 +240,7 @@ function buildPrefsWidget() {
halign: Gtk.Align.END,
buffer: new Gtk.EntryBuffer(),
placeholder_text: "Ex - '<...>'",
max_length: 4,
visible: true,
});

Expand Down Expand Up @@ -472,6 +471,13 @@ function buildPrefsWidget() {
if (customValues[0] && customValues[1]) {
settings.set_string("seperator-char-start", customValues[0]);
settings.set_string("seperator-char-end", customValues[1]);
} else {
let presetValue = sepChars[comboboxSepCharPresets.get_active()];
settings.set_string("seperator-char-start", presetValue.charAt(0));
settings.set_string(
"seperator-char-end",
presetValue.charAt(presetValue.length - 1)
);
}
});

Expand Down

0 comments on commit 0c323d5

Please sign in to comment.