Skip to content
Snippets Groups Projects
Commit 7a588460 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

setup: Connect ui to the state manager

This ensures that the layout type information is accessible to the state manager when new layout information arrive.

The should be thought of as a stopgap measure. A proper solution would be to separate the state properly, and probably turn layout information coming from random places into messages that some object (thread?) collects and displays.
parent 63d68c00
No related branches found
No related tags found
No related merge requests found
......@@ -316,9 +316,14 @@ EekboardContextService *eekboard_context_service_new(void)
{
return g_object_new (EEKBOARD_TYPE_CONTEXT_SERVICE, NULL);
}
void eekboard_context_service_set_submission(EekboardContextService *context, struct submission *submission) {
context->priv->submission = submission;
if (context->priv->submission) {
submission_set_keyboard(context->priv->submission, context->priv->keyboard);
}
}
void eekboard_context_service_set_ui(EekboardContextService *context, ServerContextService *ui) {
context->priv->ui = ui;
}
......@@ -87,6 +87,7 @@ GType eekboard_context_service_get_type
(void) G_GNUC_CONST;
EekboardContextService *eekboard_context_service_new(void);
void eekboard_context_service_set_submission(EekboardContextService *context, struct submission *submission);
void eekboard_context_service_set_ui(EekboardContextService *context, ServerContextService *ui);
void eekboard_context_service_destroy (EekboardContextService *context);
LevelKeyboard *eekboard_context_service_get_keyboard(EekboardContextService *context);
......
......@@ -201,7 +201,10 @@ fn load_layout_data_with_fallback(
source, e
),
},
Ok(layout) => return (kind, layout),
Ok(layout) => {
log_print!(logging::Level::Info, "Loaded layout {}", source);
return (kind, layout);
}
}
}
......
......@@ -288,6 +288,7 @@ main (int argc, char **argv)
if (instance.dbus_handler) {
dbus_handler_set_ui_context(instance.dbus_handler, instance.ui_context);
}
eekboard_context_service_set_ui(instance.settings_context, instance.ui_context);
session_register();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment