Skip to content
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

Migration request from IBusConfig to GSettings #3

Closed
fujiwarat opened this issue Dec 21, 2017 · 7 comments
Closed

Migration request from IBusConfig to GSettings #3

fujiwarat opened this issue Dec 21, 2017 · 7 comments

Comments

@fujiwarat
Copy link
Member

ibus-m17n uses IBusConfig and I'd ask to migrate it to GSettings and delete IBusConfig.

E.g. src/setup.c

    dialog->section = g_strdup_printf ("org.freedesktop.ibus.engine.m17n.%s.%s",
                                       msymbol_name (lang),
                                       msymbol_name (name));
    dialog->settings = g_settings_new (dialog->section);


static void
load_color (GSettings *settings,
                   GtkToggleButton *togglebutton,
                   GtkColorButton *colorbutton,
                   const gchar       *name,
                   guint                   defcol)
{
    value = g_settings_get_value (settings, name);
...
...
}

https://groups.google.com/forum/#!topic/ibus-devel/Mu1IoFX-bKE

@pnemade
Copy link

pnemade commented Mar 12, 2018

Do I need to create schema files for all the input methods?

@fujiwarat
Copy link
Member Author

My understanding is, the differences in IME are MIM files only and I think all IME can refer the same schema file.
E.g. ibus-anthy has one schem file which includes several schemas; org.freedesktop.ibus.engine.anthy.common, org.freedesktop.ibus.engine.anthy.romaji-typing-rule, org.freedesktop.ibus.engine.anthy.shortcut.
I guess you can create all schemas of org.freedesktop.ibus.engine.m17n.$lang.$name in org.freedesktop.ibus.engine.m17n.gschema.xml file.

or you can rewrite the current structure. E.g.

GSettings *settings = g_settings_new ("org.freedesktop.ibus.engine.m17n");
gchar *key = "preedit-foreground";
gchar *engine_key = g_strdup_printf ("%s:%s", $lang, $name);
GVariantBuilder dict;
g_variant_builder_init (&dict, G_VARIANT_TYPE ("a{ss}"));
g_variant_builder_add (&dict, "ss", engine_key, "yellow");
g_settings_set_value (setting, key, g_variant_builder_end (&dict));

I think this way one key "preedit-foreground" can save all IME's values.
ibus-anthy has the dict format schemas.

@fujiwarat
Copy link
Member Author

Do you have any status?

@pnemade
Copy link

pnemade commented May 16, 2018

I tried asking help you on IRC but I could not get your reply.

@fujiwarat
Copy link
Member Author

I'm not sure what you asked but I'm in ibus@freenode

@fujiwarat
Copy link
Member Author

ping

@fujiwarat
Copy link
Member Author

@mike-fabian Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants