Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   Initialize X layouts ASAP if given in kickstart or on command line (http://www.linux-archive.org/centos/669741-initialize-x-layouts-asap-if-given-kickstart-command-line.html)

Chris Lumens 05-22-2012 04:55 PM

Initialize X layouts ASAP if given in kickstart or on command line
 
> # function to handle X startup special issues for anaconda
> -def doStartupX11Actions():
> +def doStartupX11Actions(anaconda):
> global wm_pid # pid of the anaconda fork where the window manager is running
>
> # now start up the window manager
> wm_pid = startMetacityWM()
> log.info("Starting window manager, pid %s." % (wm_pid,))
>
> + # setup layouts
> + if anaconda.ksdata.keyboard.layouts_list:
> + from pyanaconda.xklavier import XklWrapper, XklWrapperError
> +
> + layouts = anaconda.ksdata.keyboard.layouts_list
> + xklwrapper = XklWrapper.get_instance()
> +
> + try:
> + xklwrapper.replace_layouts(layouts)
> +
> + except XklWrapperError as xklerr:
> + msg = "Failed to activate layouts %s" % ",".join(layouts)
> + log.error(msg)
> +

I'm trying to get rid of the practice of passing an anaconda object
everywhere. doStartupX11Actions could make do with just getting
keyboard data, so that's what should be passed to it.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

Vratislav Podzimek 05-23-2012 08:35 AM

Initialize X layouts ASAP if given in kickstart or on command line
 
On Tue, 2012-05-22 at 12:55 -0400, Chris Lumens wrote:
> > # function to handle X startup special issues for anaconda
> > -def doStartupX11Actions():
> > +def doStartupX11Actions(anaconda):
> > global wm_pid # pid of the anaconda fork where the window manager is running
> >
> > # now start up the window manager
> > wm_pid = startMetacityWM()
> > log.info("Starting window manager, pid %s." % (wm_pid,))
> >
> > + # setup layouts
> > + if anaconda.ksdata.keyboard.layouts_list:
> > + from pyanaconda.xklavier import XklWrapper, XklWrapperError
> > +
> > + layouts = anaconda.ksdata.keyboard.layouts_list
> > + xklwrapper = XklWrapper.get_instance()
> > +
> > + try:
> > + xklwrapper.replace_layouts(layouts)
> > +
> > + except XklWrapperError as xklerr:
> > + msg = "Failed to activate layouts %s" % ",".join(layouts)
> > + log.error(msg)
> > +
>
> I'm trying to get rid of the practice of passing an anaconda object
> everywhere. doStartupX11Actions could make do with just getting
> keyboard data, so that's what should be passed to it.
I will gladly change this. I just wanted the changes to fit in the rest
of the code.

--
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 02:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.