[Bug 800561] Re: No way to add other keymap than english on Live CD

Bug Watch Updater 800561 at bugs.launchpad.net
Sun Jan 8 17:46:01 UTC 2012


Launchpad has imported 11 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=44581.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2012-01-08T16:52:29+00:00 Martin Pitt wrote:

There are static xklavier bindings for Python, but as it uses gobject,
you can't use it in Python projects which use GI modules such as Gtk or
Gobject. Thus it would be nice if xklavier would be introspectable.

I have worked on a set of patches for this and got it almost working
(the train ride was half an hour too short :) ). I'm filing this for now
to avoid duplicate work by other people. I expect to have it fully
working within the next days.

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/17

------------------------------------------------------------------------
On 2012-01-08T17:08:01+00:00 Sergey V. Udaltsov wrote:

There is one problem here. I would not want libxklavier to become too
dependent on G* stack. It already depends on glib/gobject (that was a
hard move to make - and it caused some tension when KDE used
libxklavier). Introducing introspection would make libxklaver even more
G-ish.

So, here is the question - would it be possible to make introspection
optional, so people would be able to build libxklavier without it?

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/18

------------------------------------------------------------------------
On 2012-01-08T17:10:36+00:00 Martin Pitt wrote:

Created attachment 55295
[1/6] Build introspection typelib

Hah, turned out that there was only a tiny bit missing, it's working
quite nicely now.

This patch adds the necessary autoconf magic to build a .gir/.typelib,
as per https://live.gnome.org/GObjectIntrospection/AutotoolsIntegration

The library needs some annotation fixes and API extensions to make this
actually work, though. I'll send these in separate patches, to make it
easier to review the individual ones.

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/19

------------------------------------------------------------------------
On 2012-01-08T17:11:53+00:00 Martin Pitt wrote:

(In reply to comment #1)
> So, here is the question - would it be possible to make introspection optional,
> so people would be able to build libxklavier without it?

Yes, GI support is optional. configure detects whether gobject-
introspection is available, and if not, just skips it. You can also
explicitly disable it with --disable-introspection.

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/20

------------------------------------------------------------------------
On 2012-01-08T17:13:18+00:00 Martin Pitt wrote:

Created attachment 55296
[2/6] Add GI annotations

This just fixes missing annotations, pretty straightforward. This is
also relevant for the gtk-doc documentation.

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/21

------------------------------------------------------------------------
On 2012-01-08T17:15:26+00:00 Martin Pitt wrote:

Created attachment 55297
[3/6] Add xkl_config_item_new_with_data() constructor

This and the next two patches add some API to provide methods for record
member access, which can't be done through GI (at least not right now).

These might be debatable, I'm happy to discuss these with you. But I
tried pretty hard to do without these, I'm fairly convinced that we need
them.

The git log descriptions should have all the necessary details.

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/22

------------------------------------------------------------------------
On 2012-01-08T17:15:57+00:00 Martin Pitt wrote:

Created attachment 55298
[4/6] Add Xkl prefix to callback types

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/23

------------------------------------------------------------------------
On 2012-01-08T17:16:43+00:00 Martin Pitt wrote:

Created attachment 55299
[5/6] Add setters for XklConfigRec string arrays

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/24

------------------------------------------------------------------------
On 2012-01-08T17:18:51+00:00 Martin Pitt wrote:

Created attachment 55300
[6/6] Add Python test script for GI binding

And finally, this adds a tests/test_gi.py which demonstrates reading
various objects (Engine, ConfigItem, ConfigRec, ConfigRegistry), appends
a new layout, and removes it again:

$ LD_LIBRARY_PATH=libxklavier/.libs/ tests/test_gi.py == Engine ==
indicator names: ['Caps Lock', 'Num Lock', 'Scroll Lock', 'Compose', 'Kana', 'Sleep', 'Suspend', 'Mute', 'Misc', 'Mail', 'Charging', 'Shift Lock', 'Group 2', 'Mouse Keys', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']
group names: ['English (US)', 'German (eliminate dead keys)']
default layout: German (eliminate dead keys)
features: 2F

== Available Layouts ==
[us] English (US), [ad] Catalan, [af] Afghani, [ara] Arabic, [al] Albanian, [am] Armenian, [at] German (Austria), [az] Azerbaijani, [by] Belarusian, [be] Belgian, [bd] Bengali, [in] Indian, [ba] Bosnian, [br] Portuguese (Brazil), [bg] Bulgarian, [ma] Arabic (Morocco), [cm] English (Cameroon), [mm] Burmese, [ca] French (Canada), [cd] French (Democratic Republic of the Congo), [cn] Chinese, [hr] Croatian, [cz] Czech, [dk] Danish, [nl] Dutch, [bt] Dzongkha, [ee] Estonian, [ir] Persian, [iq] Iraqi, [fo] Faroese, [fi] Finnish, [fr] French, [gh] English (Ghana), [gn] French (Guinea), [ge] Georgian, [de] German, [gr] Greek, [hu] Hungarian, [is] Icelandic, [il] Hebrew, [it] Italian, [jp] Japanese, [kg] Kyrgyz, [kh] Khmer (Cambodia), [kz] Kazakh, [la] Lao, [latam] Spanish (Latin American), [lt] Lithuanian, [lv] Latvian, [mao] Maori, [me] Montenegrin, [mk] Macedonian, [mt] Maltese, [mn] Mongolian, [no] Norwegian, [pl] Polish, [pt] Portuguese, [ro] Romanian, [ru] Russian, [rs] Serbian, [si] Slovenian, [sk] Slovak, [es] Spanish, [se] Swedish, [ch] German (Switzerland), [sy] Arabic (Syria), [tj] Tajik, [lk] Sinhala, [th] Thai, [tr] Turkish, [tw] Taiwanese, [ua] Ukrainian, [gb] English (UK), [uz] Uzbek, [vn] Vietnamese, [kr] Korean, [nec_vndr/jp] Japanese (PC-98xx Series), [ie] Irish, [pk] Urdu (Pakistan), [mv] Dhivehi, [za] English (South Africa), [epo] Esperanto, [np] Nepali, [ng] English (Nigeria), [et] Amharic, [sn] Wolof, [brai] Braille, [tm] Turkmen, [ml] Bambara, [tz] Swahili (Tanzania), [ke] Swahili (Kenya), [bw] Tswana, [ph] Filipino, 

== ConfigRec ==
Curent configuration:
  Model: pc105
  Layouts: ['us', 'de']
  Variants: ['', 'nodeadkeys']
  Options: ['terminate:ctrl_alt_bksp', 'grp:shifts_toggle']
Adding Danish layout...
Curent configuration:
  Model: pc105
  Layouts: ['us', 'de', 'dk']
  Variants: ['', 'nodeadkeys', '']
  Options: ['terminate:ctrl_alt_bksp', 'grp:shifts_toggle']
Removing Danish layout...
Curent configuration:
  Model: pc105
  Layouts: ['us', 'de']
  Variants: ['', 'nodeadkeys']
  Options: ['terminate:ctrl_alt_bksp', 'grp:shifts_toggle']

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/25

------------------------------------------------------------------------
On 2012-01-08T17:30:34+00:00 Martin Pitt wrote:

Note that there are still a bunch of warnings from g-ir-scanner about
constants without an XKL_* prefix, but I think they are relatively
uninteresting to use from bindings.

There are still a few unintrospectable symbols which are harder to fix:

   xklavier.h:97: Warning: Xkl: xkl_set_log_appender: argument fun:
Missing (scope) annotation for callback without GDestroyNotify (valid:
call, async)

The actual scope of that argument would be "(forever)", or "until you
call that function again", but that doesn't exist right now. A clean
solution would be to provide a GDestroyNotify, but that would change
API. I don't need that part of the API myself, so I'm not particularly
interested in it, but if you are, I can work on this, too (perhaps with
skipping this one and adding a new function with a GDestroyNotify).

  xkl_engine.h:329: Warning: Xkl: xkl_engine_get_current_state: return
value: Invalid non-constant return of bare structure or union; register
as boxed type or (skip)

Error message speaks for itself. Interpreters need to know how to
copy/create/free objects, which you can't reliably do with bare structs.

  default_log_appender() (because GI cannot support varargs)

But as the test script shows, the majority of the API can be used, so I
think it's "good enough" for now.

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/27

------------------------------------------------------------------------
On 2012-01-08T17:36:40+00:00 Sergey V. Udaltsov wrote:

Ok, some comments:
1. You did not change VERSION_INFO in configure.ac. I guess it was just overlooked, right? The API is changed, even though in the compatible way.
2. The xkl_config_item_new_with_data - I do not have strong objection, but why are just plain setters/getters not sufficient?
3. Why is that in Makefile.am?
-xklavier_headers = xklavier.h xkl_config_registry.h xkl_engine.h \
-	xkl_config_rec.h xkl_config_item.h xkl_engine_marshal.h
+xklavier_headers = xkl_engine.h xkl_config_item.h xkl_config_registry.h \
+	xkl_config_rec.h xkl_engine_marshal.h xklavier.h
4. set_log_appender is mostly for debugging, so for now let's ignore it
5. I will check around get_current_state. Perhaps making it const would be affordable...

Reply at: https://bugs.launchpad.net/libxklavier/+bug/800561/comments/28


** Changed in: libxklavier
       Status: Unknown => In Progress

** Changed in: libxklavier
   Importance: Unknown => Wishlist

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/800561

Title:
  No way to add other keymap than english on Live CD

Status in libxklavier - XKB foundation libary:
  In Progress
Status in “libxklavier” package in Ubuntu:
  In Progress
Status in “ubiquity” package in Ubuntu:
  Triaged
Status in “ubiquity” source package in Oneiric:
  Won't Fix
Status in “libxklavier” source package in Precise:
  In Progress
Status in “ubiquity” source package in Precise:
  Triaged

Bug description:
  TEST CASE:
  1. Boot a live cd
  2. Select "Try Ubuntu" and start the live session
  3. Click on the Keyboard indicator
    -> Verify that there is no French, Spanish or German keymap on the list (nothing else than US keymaps actually)
  4. At the bottom of the list click on "Keyboard Preferences".
    -> It opens the "Region and Language" configuration panel
  5. Click on the "Layout" tab to add a new layout

  Result:
  The list only contains english/us layouts
  The "+" button below the list is disabled and no new layout can be added

  WORKAROUND
   * On the "Layouts" tab click on "Reset to defaults"
   * All the existing layouts are removed and the "+" button is enabled, the user can then add a new layout.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: gnome-control-center 1:3.0.2-1ubuntu4
  ProcVersionSignature: Ubuntu 3.0-1.2-generic 3.0.0-rc3
  Uname: Linux 3.0-1-generic x86_64
  Architecture: amd64
  Date: Wed Jun 22 08:29:28 2011
  LiveMediaBuild: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110621)
  ProcEnviron:
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: gnome-control-center
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/libxklavier/+bug/800561/+subscriptions




More information about the foundations-bugs mailing list