canonical / lightdm

Display Manager
GNU General Public License v3.0
827 stars 138 forks source link

Set layout with xkl_config and default_layout #238

Closed JezerM closed 2 years ago

JezerM commented 2 years ago

Fixes #225

Changes

Behavior before and now

Examples made with node-gtk for Node.js

Before, lightdm_get_layout always returned the first catched layout:

❯ node
Welcome to Node.js v16.14.0.
> const gi = require("node-gtk");
> const LightDM = gi.require("LightDM", "1");
> LightDM.getLayout().name;
'latam'
> let layout = LightDM.getLayouts().find((v) => v.name == "us");
> LightDM.setLayout(layout);
> LightDM.getLayout().name;
'latam'

Now, lightdm_get_layout returns the new layout:

❯ node
Welcome to Node.js v16.14.0.
> const gi = require("node-gtk");
> const LightDM = gi.require("LightDM", "1");
> LightDM.getLayout().name;
'latam'
> let layout = LightDM.getLayouts().find((v) => v.name == "us");
> LightDM.setLayout(layout);
> LightDM.getLayout().name;
'us'
github-actions[bot] commented 2 years ago

Everyone contributing to this PR have now signed the CLA. Thanks!

JezerM commented 2 years ago

So, it seems the action cannot detect the signed CLA, though it's signed...

JezerM commented 2 years ago

CLA signed, finally :D

robert-ancell commented 2 years ago

Could you move some of the PR description into the commit message? I'm just worried the reasoning for this change might get lost in the future.

JezerM commented 2 years ago

Done~