Changing the title in title bar
Ankur Khurana
ankur at seeta.in
Fri Aug 6 21:07:55 BST 2010
Hi,
i was working on to change the text in title bar of sugar-emulator from
Xephyr to Sugar. I needed some pointers in this direction and i will be ery
helpful for that.uptill now what i have noticed is that , sugar-emulator
script call the emulator.main() function which then uses the following code
to open up xepyhr and to run emulator:
def _run_xephyr(display, dpi, dimensions, fullscreen):
> cmd = [ 'Xephyr' ]
> cmd.append(':%d' % display)
> cmd.append('-ac')
>
> screen_size = (gtk.gdk.screen_width(), gtk.gdk.screen_height())
>
> if (not dimensions) and (fullscreen is None) and \
> (screen_size < default_dimensions) :
> # no forced settings, screen too small => fit screen
> fullscreen = True
> elif (not dimensions) :
> # screen is big enough or user has en/disabled fullscreen manually
> # => use default size (will get ignored for fullscreen)
> dimensions = '%dx%d' % default_dimensions
>
> if not dpi :
> dpi = gtk.settings_get_default().get_property('gtk-xft-dpi') / 1024
>
> if fullscreen :
> cmd.append('-fullscreen')
>
> if dimensions :
> cmd.append('-screen')
> cmd.append(dimensions)
>
> if dpi :
> cmd.append('-dpi')
> cmd.append('%d' % dpi)
>
> cmd.append('-noreset')
>
> try:
> pipe = subprocess.Popen(cmd)
>
> except OSError, exc:
> sys.stderr.write('Error executing server: %s\n' % (exc, ))
> return None
>
> return pipe
>
just in case: The title bar in sugar-emulator shows "Xephyr on:30.0
(ctrl+shift grabs mouse and keyboard)" and instead of that we would like
to have Sugar.
now the problem is that i am not able to find the script responsible for
writing title on top of the xephyr window .Can we edit that to get sugar's
name? and if so , can you provide me some pointer to get started in right
direction?
Regards,
Ankur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-sugarteam/attachments/20100807/cc13361e/attachment.htm
More information about the Ubuntu-sugarteam
mailing list