Nux

Merge lp:~brandontschaefer/nux/remove-gconf-ibus-1.5 into lp:nux

Proposed by Brandon Schaefer
Status: Rejected
Rejected by: Brandon Schaefer
Proposed branch: lp:~brandontschaefer/nux/remove-gconf-ibus-1.5
Merge into: lp:nux
Diff against target: 55 lines (+2/-23)
1 file modified
Nux/InputMethodIBus.cpp (+2/-23)
To merge this branch: bzr merge lp:~brandontschaefer/nux/remove-gconf-ibus-1.5
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Needs Fixing
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+177197@code.launchpad.net

Commit message

Get nux ready for ibus 1.5.

Description of the change

ibus 1.5 does not use gconf any more to store its settings. It uses gsettings, so we need to move over to using its scheme.

For now remove the gconf stuff, to be later added back in.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

I was looking at the new API, while the most things hould be the same, shoulnd't just be enough to call ibus_config_watch (to filter out the unwanted values) and connect to the "value-changed" signal?

I'd prefer to replace this code at the same time we remove the legacy one...

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

There's really no dependency on gconf here, just reading the new org.freedesktop.ibus.general.hotkey value should be enough now...

review: Needs Fixing
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Unmerged revisions

804. By Brandon Schaefer

* Remove ibus gconf usage. To get ready for ibus 1.5

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/InputMethodIBus.cpp'
2--- Nux/InputMethodIBus.cpp 2012-10-18 22:14:37 +0000
3+++ Nux/InputMethodIBus.cpp 2013-07-26 17:47:29 +0000
4@@ -163,23 +163,12 @@
5 ibus_input_context_focus_in(context_);
6
7 UpdateCursorLocation();
8-
9- IBusConfig* bus_conf = ibus_bus_get_config(bus_);
10- g_signal_handlers_disconnect_by_func(bus_conf, reinterpret_cast<gpointer>(OnConfigChanged_), this);
11- g_signal_connect(bus_conf, "value-changed", G_CALLBACK(OnConfigChanged_), this);
12- UpdateHotkeys();
13 }
14
15 void IBusIMEContext::DestroyContext()
16 {
17 //nuxDebugMsg("***IBusIMEContext::DestroyContext***");
18
19- if (ibus_bus_is_connected(bus_))
20- {
21- IBusConfig* bus_conf = ibus_bus_get_config(bus_);
22- g_signal_handlers_disconnect_by_func(bus_conf, reinterpret_cast<gpointer>(OnConfigChanged_), this);
23- }
24-
25 if (!context_)
26 return;
27
28@@ -232,11 +221,7 @@
29
30 void IBusIMEContext::OnConfigChanged(IBusConfig* /* config */, gchar* section, gchar* name, GVariant* /* value */)
31 {
32- if (g_strcmp0(section, "general/hotkey") == 0)
33- {
34- if (g_strcmp0(name, "trigger") == 0)
35- UpdateHotkeys();
36- }
37+ // FIXME Move over to gsettings as ibus 1.5 no longer uses gconf
38 }
39
40 void IBusIMEContext::OnCommitText(IBusInputContext * /* context */, IBusText* text)
41@@ -480,13 +465,7 @@
42
43 void IBusIMEContext::UpdateHotkeys()
44 {
45- IBusConfig* conf = ibus_bus_get_config(bus_);
46- GVariant* val = ibus_config_get_value(conf, "general", "hotkey/trigger");
47- const gchar** keybindings = g_variant_get_strv(val, NULL);
48-
49- hotkeys_ = ParseIBusHotkeys(keybindings);
50-
51- g_variant_unref(val);
52+ // FIXME Move over to use gsettings, as ibus 1.5 no longer uses gconf
53 }
54
55 bool IBusIMEContext::IsHotkeyEvent(EventType type, unsigned long keysym, unsigned long modifiers) const

Subscribers

People subscribed via source and target branches