[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] discussion: new features in E. try 2.



On Sat, 10 Jun 2006 20:52:44 +0000 "Aleksej Struk" <astruk@gmail.com> babbled:

> Hey raster,
> 
> Hmmmm, actually, I already implemented all the things in
> e_modules/language module. Now it is standalone. It is able to manage
> actual input language for each window, and flip between keybord
> layouts on the fly. Moreover it hooks into E and defines 2 new actions
> and keybindings for them as it starts, and removes those actions and
> keybindings on unload.
> 
> I want to make one more hook into E. For now there exists a config
> dialog for the module. I'd like to hook it into the E main config
> panel. As far as I remmember there is a FIXME for
> this :)
> 
> Unfortunatelly, somehow I missed ur mail. But now, I'll review the
> module once again wrt to your comments.
> 
> Of course, I'd like to move some of the module's functionality
> directly to E. For
> example language settings per window. Consequently, this  will remove
> some expensive searches and management of the running windows, since
> the module will know everything as soon as it gets a pointer to a
> border in callback :).
> 
> But, if I move some of its functionality to E, then it will be
> dependent on E. And actually, the module will only flip the input
> keyboard layout and visualize the current language icon.
> So, then it cannot be standalone as now.
> 
> Ofcourse, since the module works now, at least for me :), because I
> did not hear any comments about it yet, there is no need to reinvent
> it, to reprogram it and to place some of its functionality into E.
> 
> Also, from my point of view, it would be nice to have it in the main E
> src tree, because, when non-english people starts a WM they'd like to
> have language tools immideately and without looking  for the 3rd party
> module. What do u think about this ?

i agree. it is definitely useful for people who need to change languages and
keymaps often and non-english speakers. the problem is goign to be making sure
the code is generic enough to handle all languages properly and that it is
clean. i will take a look at the language module at some point and see - either
the module might get sucked in - or parts of its code will be - either way -
your work becomes useful :)

> sndev
> 
> On 6/6/06, The Rasterman Carsten Haitzler <raster@rasterman.com> wrote:
> > On Mon, 10 Apr 2006 12:18:20 +0000 "Aleksej Struk" <astruk@gmail.com>
> > babbled:
> >
> > > Hi all devs,
> > >
> > > I just repost my previous mail, since I did not get any comments on it
> > > yet :(
> >
> > and here come my comments (finally!) :)
> >
> > > I would like to start a new discussion regarding E features.
> > >
> > > During the past time I usually use 2 different languages for input in
> > > my work.  This languages are  english and russian. So, in order to be
> > > able to switch between them I use setxkbmap program of the X11. I wrote
> > > a script which does language switching for me. This scrip, actually,
> > > looks as follows:
> > >
> > > #!/bin/sh
> > >
> > > f=`setxkbmap -print | grep xkb_symbols | awk '{printf $4}' | cut -d '+'
> > > -f 2`
> > >
> > > if [ $f = "us" ]; then
> > >  setxkbmap -model compaqik13 -layout ru -variant basic
> > > elif [ $f = "us(basic)" ]; then
> > >  setxkbmap -model compaqik13 -layout ru -variant basic
> > > elif [ $f = "ru(basic)" ]; then
> > >  setxkbmap -model compaqik13 -layout us -variant basic
> > > fi
> >
> > ok - so basically u want to flip keymap on the fly and maybe have e flip
> > keymap for you automatically as focus changes to different windows.
> > definitely makes sense.
> >
> > > However, it is not comfortable enought. First of all, I do not have
> > > any visual representation of my current language selection. Second,
> >
> > i think something in the titlebar of windows and/or in the window menu
> > displaying some little flag for the keymap (the idea behind gadcon is to be
> > able to add module output (gadcon clients) to things like borders, menus
> > etc.) for example is what you want (and maybe a menu to select which keymap
> > to use when that window is focused (if it's not the default), set up a
> > default keymap, another temporary keymap to choose etc. might be what you
> > want - right? there will nee to be a way to remember which windows use what
> > keymaps (put it into the remember settings?)
> >
> > > such a way of switching language is global. So, if I turn, for example,
> > > russian language, I will have it everywhere and in every application I
> > > currently use, but it would be nice to have some local language selection
> > > per application. Finally, I already had some troubles with non-english :)
> > > language and desktop locking. If I turn, for example, russian language
> > > and then lock the screen from the menu, or by using shortcut, for
> > > example ctrl+F12, I'm not able to unlock my desktop, since the ASCII
> > > code values of russian letters are greater that 128 and E, basically,
> > > do not accept them. Please do not refere to locale settings in this
> > > situation :) since I prefer to work in C locale or en_US.
> > >
> > > I would like to propose to implement such a language switchin mechanism
> > > in E, which is similar to the script I use. Also, such a technich is
> > > used in KDE for example. However, I'm able to implement it of course
> > > :), but I'd like to hear different opinions on that. Moreover, I'd
> > > like to hear some comments from devs, what should be done.
> > >
> > > The things I want to do are the following:
> > >
> > > a) implement a new configuration dialog that allows to select perfered
> > > languages, to set the default input language, and to select the language
> > > switching policy. For example such policies can be: (i) global - the
> > > language is selected for all applications, (ii) local - the language
> > > is selected for the specific application or a window, (iii) maybe
> > > something else.
> >
> > sounds great. set actual language for e, keyboard map (the default keymap to
> > set to if it isn't set up in x) and be able to change this easily and
> > remember it. and then set it per window and remember it (flip on focus)
> > sounds good. useful.
> >
> > > b) implement 2 new actions that allows to switch between selected
> > > languages in two ways - forward and backword. For example if I have
> > > selected 3 languages EN-RU-IT, then I want to be able to switch
> > > between them in the 2 following ways: (i) EN->RU->IT->EN->... (ii)
> > > IT->RU->EN->IT... Of course here I assume that default language is EN.
> >
> > sounds good - you also want some popup like winlist or exebuf that displays
> > an indication of what keymap you flip to. doing it like the winlist would
> > probably be a good thing.
> >
> > > c) implement an E module which will monitor the current language
> > > selection. Moreover it would be nice if it would allow to switch languages
> > > as well. For example if one click on it.
> >
> > i think we need some of this built in and some as modules. the actions and
> > popup and ability to change keymap using keybindings and a dialog and
> > remember per window imho should be built in. having modules DISPLAY the
> > current keymap for a window in its title or the current default and/or
> > active keymap on the shelf as a gadget (and possibly clicking on it
> > provides a popup menu list of available keymaps to change that window or
> > the current default to - would be the job of a module.
> >
> > > I think the option a) is the most easiest from the implementation point
> > > of view.
> > >
> > > For the option b) I think the following actions whould be taken. The
> > > main E config should store the information what langs are selected,
> > > which is default one, and what lang switching policy is used. Also,
> > > the current language selection should be stored in main config, probably
> > > just temporarly, if the global language switching policy is used.
> >
> > definitely. agreed.
> >
> > > Also, I think, that the data structure representing the window border
> > > should have a field that will show the current language selection for
> > > this particular window, if the local language policy is selected. Then,
> > > the language for this window should be switched automatically, when it
> > > gets the focus.
> >
> > actually you need language AND keymap AND input method. there is a problem -
> > actual LANGUAGE of a window (the language it displays in) is an environment
> > variable inherited when the program runs. but keymap is able to be changed
> > on the fly runtime later. you can only set LANGUAGE when the app is
> > executed - which means you need to put it in the .eap.
> >
> > > I think, that some sort of IPC also should be implemented in order to
> > > have a possibility to assign shortcuts. Of course, default shortcuts
> > > should be defined as well ::))
> >
> > just add actions and then it can be bound any time (and by default bind some
> > keys).
> >
> > > The option c) is the most mistirious for me, since I never worked with
> > > modules. I guess, that in order to monitor the current lang selection,
> > > some IPC actions should exist. Also, I think, they should exist if we
> > > want module to be able to switch languages. It would be nice if somebody
> > > referenced me to an existing example, or briefly explain how things
> > > should be done.
> >
> > well a module lives inside of e - if there are api hooks - you can do
> > anything. i think the first steps of this should be done inside e without
> > modules and then add modules with gadgets later than make it easier to
> > access some things.
> >
> > > Well, I think thats all what I wanted to write and ask opinions about.
> > > :) Waiting for comments, suggestions and etc.
> >
> > well there you go - this is what i think :)
> >
> > > sn
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > language that extends applications into web and mobile media. Attend the
> > > live webcast and join the prime developer group breaking into this new
> > > coding territory!
> > > http://sel.as-us.falkag.net/sel?cmd_______________________________________________
> > > enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >
> >
> >
> > --
> > ------------- Codito, ergo sum - "I code, therefore I am" --------------
> > The Rasterman (Carsten Haitzler)    raster@rasterman.com
> > 裸好多
> > Tokyo, Japan (東京 日本)
> >
> 
> 
> -- 
> Aleksej Struk
> Master Degree Student
> Free University of Bozen-Bolzano
> Faculty of Computer Science
> phone: +39-0471-061749
> cell phone: +39-3204627049
> astruk@gmail.com alstruk@unibz.it - http://www.
> 
> 
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)