-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wire shortcuts to gsettings #27
Comments
@isantop Basically, you can achieve this by doing:
Might look something like this: let (sender, receiver) = glib::MainContext::channel();
let schema1 = gio::Settings::new(schema_string);
let mut schemas = vec![schema1, schema2];
let mut shortcut_widgets = Vec::new();
// Program UI and store all keybinding widgets
// And connect schema change events
schemas[idx].connect_changed(key, {
let sender = sender.clone();
move || sender.send(UiEvent::Update(0, 0, key)
});
// At the very bottom of the application, receiver takes ownership of all widgets and schemas
receiver.attach(None, move |event| {
match event {
UiEvent::Update(schema_index, widget_index, key) => {
let widget = shortcut_widgets[widget_index];
let shortcuts = schemas[schema_index].get_strv(key);
.. update GTK widget
}
}); |
The This raises some questions. To begin with, consider this in the current interface: How should this be mapped to gsettings? Fundamentally, "Swap Windows" here is four The current prototype doesn't handle these bindings yet, but here's another part: Are we fine with adding |
|
Yeah, perhaps. It does seem suboptimal to expand 1 row into 8 (4 shortcuts with 2 bindings each). I guess expanding it to 4 rows may be alright.
Maybe. I suppose we could have something like a @maria-komarova Any thoughts on this? |
Sorry, catching up to your conversation. What interface are we talking about? The dialog for Pop Shell shortcuts? |
Yes, it would be fine to align the styling here to the usual GtkShortcutLabel, as much as everyone wants to get away from that plus. That way there is more consistency.
How would that look like? Would it be the information cloud that shows on hover? |
Yep, the window with the title "Pop!_Shell Keyboard Shortcuts". Currently the shortcuts it displays are just hardcoded and it doesn't show if one has been changed.
I'm imagining a I'm not sure that's a particularly good solution. |
Looks like we need an updated design for that window. Give me till tomorrow, I'll try to give you the mockup. |
To keep them aligned if users change defaults.
The text was updated successfully, but these errors were encountered: