Skip to content

Commit

Permalink
Merge pull request #251 from ryonakano/fix-indentation
Browse files Browse the repository at this point in the history
Use spaces indentation instead of a tab
  • Loading branch information
dsheeler committed Sep 6, 2024
2 parents 4d3b902 + 2650fe9 commit a134f47
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
10 changes: 5 additions & 5 deletions src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export function debug(message) {
* @return {void}
*/
export function __ABSTRACT_METHOD__(object, method) {
throw new Error(
"Abstract method " +
object.constructor.name + "." + method.name + "()" +
" not implemented"
);
throw new Error(
"Abstract method " +
object.constructor.name + "." + method.name + "()" +
" not implemented"
);
}
18 changes: 9 additions & 9 deletions src/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,29 +184,29 @@ export const Manager = class Manager {
isApplicationSwitcher = !this.platform.getSettings().switch_application_behaves_like_switch_windows
default:
let currentOnly = this.platform.getSettings().current_workspace_only;
if (currentOnly === 'all-currentfirst') {
if (currentOnly === 'all-currentfirst') {
// Switch between windows of all workspaces, prefer
// those from current workspace
let wins1 = windows.filter(matchWorkspace, currentWorkspace);
let wins2 = windows.filter(matchOtherWorkspace, currentWorkspace);
// those from current workspace
let wins1 = windows.filter(matchWorkspace, currentWorkspace);
let wins2 = windows.filter(matchOtherWorkspace, currentWorkspace);
// Sort by user time
wins1.sort(sortWindowsByUserTime);
wins2.sort(sortWindowsByUserTime);
windows = wins1.concat(wins2);
wins1 = [];
wins2 = [];
} else {
let filter = currentOnly === 'current' ? matchWorkspace :
} else {
let filter = currentOnly === 'current' ? matchWorkspace :
matchSkipTaskbar;
// Switch between windows of current workspace
windows = windows.filter(filter, currentWorkspace);
// Switch between windows of current workspace
windows = windows.filter(filter, currentWorkspace);
windows.sort(sortWindowsByUserTime);
}
break;
}

// filter by windows existing on the active monitor
if(this.platform.getSettings().switch_per_monitor)
if (this.platform.getSettings().switch_per_monitor)
{
windows = windows.filter ( (win) =>
win.get_monitor() == Main.layoutManager.currentMonitor.index );
Expand Down
14 changes: 7 additions & 7 deletions src/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ class AbstractPlatform {
}

initBackground() {
this._background = Meta.BackgroundActor.new_for_screen(global.screen);
this._background.hide();
this._background = Meta.BackgroundActor.new_for_screen(global.screen);
this._background.hide();
global.overlay_group.add_child(this._background);
}

Expand All @@ -162,7 +162,7 @@ class AbstractPlatform {
}

removeBackground() {
global.overlay_group.remove_child(this._background);
global.overlay_group.remove_child(this._background);
}
}

Expand Down Expand Up @@ -531,13 +531,13 @@ export class PlatformGnomeShell extends AbstractPlatform {
}

initBackground() {
this._backgroundGroup = new Meta.BackgroundGroup();
this._backgroundGroup = new Meta.BackgroundGroup();
this._backgroundGroup.set_name("coverflow-alt-tab-background-group");
Main.layoutManager.uiGroup.add_child(this._backgroundGroup);
if (this._backgroundGroup.lower_bottom) {
this._backgroundGroup.lower_bottom();
if (this._backgroundGroup.lower_bottom) {
this._backgroundGroup.lower_bottom();
} else {
Main.uiGroup.set_child_below_sibling(this._backgroundGroup, null);
Main.uiGroup.set_child_below_sibling(this._backgroundGroup, null);
}

this._backgroundShade = new Clutter.Actor({
Expand Down
46 changes: 23 additions & 23 deletions src/prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,27 +136,27 @@ export default class CoverflowAltTabPreferences extends ExtensionPreferences {
return _('Version %d').format(this.metadata.version);
}

fillPreferencesWindow(window) {
let settings = this.getSettings();
let switcher_page = new Adw.PreferencesPage({
title: _('General'),
icon_name: 'general-symbolic',
});

let switcher_pref_group = new Adw.PreferencesGroup({
title: _('Switcher Properties'),
});
let switcher_looping_method_buttons = new Map([ [_("Flip Stack"), [[],[]]], [_("Carousel"), [[],[]]]]);

let switcher_looping_method_row = buildRadioAdw(settings, "switcher-looping-method", switcher_looping_method_buttons, _("Looping Method"), _("How to cycle through windows."));
switcher_pref_group.add(buildRadioAdw(settings, "switcher-style", new Map([ [_("Coverflow"), [[switcher_looping_method_row], []]], [_("Timeline"), [[],[switcher_looping_method_row]] ]]), _("Style"), _("Pick the type of switcher.")))
switcher_pref_group.add(buildSpinAdw(settings, "offset", [-500, 500, 1, 10], _("Vertical Offset"), _("Positive value moves everything down, negative up.")));
switcher_pref_group.add(buildRadioAdw(settings, "position", new Map([ [_("Bottom"), [[], []]], [_("Top"), [[],[]]]]), _("Window Title Position"), _("Place window title above or below the switcher.")));
switcher_pref_group.add(buildSwitcherAdw(settings, "enforce-primary-monitor", [], [], _("Enforce Primary Monitor"), _("Always show on the primary monitor, otherwise, show on the active monitor.")));

switcher_pref_group.add(switcher_looping_method_row);
switcher_pref_group.add(buildSwitcherAdw(settings, "hide-panel", [], [], _("Hide Panel"), _("Hide panel when switching windows.")));
switcher_pref_group.add(buildSwitcherAdw(settings, "invert-swipes", [], [], _("Invert Swipes"), _("Invert system scroll direction setting.")));
fillPreferencesWindow(window) {
let settings = this.getSettings();
let switcher_page = new Adw.PreferencesPage({
title: _('General'),
icon_name: 'general-symbolic',
});

let switcher_pref_group = new Adw.PreferencesGroup({
title: _('Switcher Properties'),
});
let switcher_looping_method_buttons = new Map([ [_("Flip Stack"), [[],[]]], [_("Carousel"), [[],[]]]]);

let switcher_looping_method_row = buildRadioAdw(settings, "switcher-looping-method", switcher_looping_method_buttons, _("Looping Method"), _("How to cycle through windows."));
switcher_pref_group.add(buildRadioAdw(settings, "switcher-style", new Map([ [_("Coverflow"), [[switcher_looping_method_row], []]], [_("Timeline"), [[],[switcher_looping_method_row]] ]]), _("Style"), _("Pick the type of switcher.")))
switcher_pref_group.add(buildSpinAdw(settings, "offset", [-500, 500, 1, 10], _("Vertical Offset"), _("Positive value moves everything down, negative up.")));
switcher_pref_group.add(buildRadioAdw(settings, "position", new Map([ [_("Bottom"), [[], []]], [_("Top"), [[],[]]]]), _("Window Title Position"), _("Place window title above or below the switcher.")));
switcher_pref_group.add(buildSwitcherAdw(settings, "enforce-primary-monitor", [], [], _("Enforce Primary Monitor"), _("Always show on the primary monitor, otherwise, show on the active monitor.")));

switcher_pref_group.add(switcher_looping_method_row);
switcher_pref_group.add(buildSwitcherAdw(settings, "hide-panel", [], [], _("Hide Panel"), _("Hide panel when switching windows.")));
switcher_pref_group.add(buildSwitcherAdw(settings, "invert-swipes", [], [], _("Invert Swipes"), _("Invert system scroll direction setting.")));
switcher_page.add(switcher_pref_group);

let background_pref_group = new Adw.PreferencesGroup({
Expand Down Expand Up @@ -207,7 +207,7 @@ export default class CoverflowAltTabPreferences extends ExtensionPreferences {
let style_row = buildRadioAdw(settings, "icon-style", buttons, _("Application Icon Style"));
let add_remove_effects_buttons = new Map([ [_("Fade Only"), [[],[]]], [_("Scale Only"), [[],[]]], [_("Fade and Scale"), [[],[]]]]);

let add_remove_effects_row = buildRadioAdw(settings, "icon-add-remove-effects", add_remove_effects_buttons, _("Add / Remove Effects"), _("How Icons and Labels ease in and out."));
let add_remove_effects_row = buildRadioAdw(settings, "icon-add-remove-effects", add_remove_effects_buttons, _("Add / Remove Effects"), _("How Icons and Labels ease in and out."));
icon_pref_group.add(style_row);
icon_pref_group.add(size_row);
icon_pref_group.add(opacity_row);
Expand Down Expand Up @@ -619,7 +619,7 @@ function buildRangeAdw(settings, key, values, title, subtitle="", draw_value=fal
let [min, max, step, defvs] = values;

let pref = new Adw.ActionRow({
title: title,
title: title,
});
if (subtitle !== null && subtitle !== "") {
pref.set_subtitle(subtitle);
Expand Down
2 changes: 1 addition & 1 deletion src/switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ export class Switcher {
return true;
}
_windowDestroyed(wm, actor) {
this._removeDestroyedWindow(actor.meta_window);
this._removeDestroyedWindow(actor.meta_window);
}

_checkDestroyed(window) {
Expand Down

0 comments on commit a134f47

Please sign in to comment.