Hi,

I think it is time to think about integrating your patch.

On Sun, Jan 05, 2014 at 02:14:18PM +0100, Gunnar Hjalmarsson wrote:
> Hi guys and sorry for not getting back sooner...
> 
> On 2013-05-19 01:29, Osamu Aoki wrote:
> > Hi,
> > 
> > Now that freeze is over, let's think this change of "-l" option.
> Please let us talk about the third variant I submitted:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=45;filename=im-config-installed-IMs-3.patch;att=1;bug=694941

I think this is fine as the basic functionality.

> It does the same thing, but the code is slightly neater.

Now it is very clean.  But It could be better :-)  
(I did some reorganizing here.)

> > But before applying this, let's discuss the use case of this patch.
> > 
> > Is this output used by external script? 
> >  -> some gui tools which try to set im-config via 
> >     non interactive -n option.
> 
> Yes, that's what the Language Support GUI in Ubuntu does.
> 
> This is the function in the Language Support source that makes use of
> the -l option:
> 
> def getAvailableInputMethods(self):
>     inputMethods = subprocess.check_output(['im-config',
> '-l']).decode().split()
>     return ['default'] + sorted(inputMethods)

So basically, this is shell commandline/pipe based API.
Good.

> So the list presented to the user consists of:
> - default (i.e. auto mode)

Don't you need to have API to get what is used for auto mode? (-

> - xim (but it's labelled 'none' in the GUI)
> - the installed input method systems

Don't you need to have API to get which IM is active? (-m)

> > Maybe we need to expose priority, install state of required package, ...
> 
> Not sure what you mean by that.

I meant numbers associated with each IM in /usr/share/im-config/data/
as priority.  I guess not.
 
> But I can say that I think the current -l option serves the needs of Ubuntu.

OK but why not to have API for current active mode and current
auto-selection. (-M)  That makes thing complete and you can keep your code as
is for now.

(with -a -l, my hacked code can list all possible IMs)

I am also thinking to add another API to get localized text for each IM:

For example: for ibus, we should be able to ge as

$ im-config -N ibus
Intelligent Input Bus (IBus)
 * Required for all: ibus
 * Language specific input conversion support:
   * Japanese: ibus-mozc (best) or ibus-anthy or ibus-skk
   * Korean: ibus-hangul
   * Simplified Chinese: ibus-pinyin or ibus-sunpinyin or ibus-googlepinyin
   * Traditional Chinese: ibus-chewing
   * Thai: ibus-table-thai
   * Vietnamese: ibus-unikey or ibus-table-viqr
   * X Keyboard emulation: ibus-xkbc
   * Generic keyboard translation table: ibus-m17n or ibus-table* packages
 * Application platform support:
   * GNOME/GTK+: ibus-gtk and ibus-gtk3 (both)
   * KDE/Qt: ibus-qt4
   * Clutter: ibus-clutter
   * EMACS: ibus-el

I will consider other bugs to get ready for next release.

Osamu


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to