[FOSS-GPS] FoxtrotGPS GUI customizations

Joshua Judson Rosen rozzin at geekspace.com
Mon Dec 13 23:18:21 EST 2010


Brian Wilson <brian at wildsong.biz> writes:
>
> I am putting foxtrotgps onto a car computer with a 7" 800x480 screen.
> The computer runs Debian + Matchbox on a Via C7 Mini-ITX board.
> FoxtrotGPS runs fine on it already but I want to be able to tune it
> for the small screen.
> 
> I can see that there is an openmoko version done for its very small screen.

There's actually only one version, as far as I know; there are *some* smarts
in the program that make it behave a *little* differently in different
circumstances, but not much:

> How is the variant managed for Openmoko? I have a vague idea that
> there is support for this in GTK+ but I have not dug into it yet.
> 
> Is there an external file that is part of the Openmoko project that
> defines the small screen layout?

There's a `foxtrotgps.glade' file that defines the whole GUI; if you open it
with Glade, you'll see that there are two toolbars defined--a vertical one
and a horizontal one; and there's a small bit of code in main()
that decides which toolbar to use based upon the orientation of the screen,
so that it occupies as little valuable real estate as possible:

        if (screen_height > screen_width)
        {
                toolbar = lookup_widget(window1, "toolbar1");
                global_landscape = FALSE;
        }
        else {
                toolbar = lookup_widget(window1, "toolbar4");
                global_landscape = TRUE;
        }
        gtk_widget_show(toolbar);


(there may be a better way of doing this--I know that GTK+ actually has
 dynamically-reorientable toolbars, for example).

It should be usable in either orientation down to at least 800x480, though
and even smaller; unless, maybe, your GTK+ theme is using very large icons?

The screenshot on <http://www.foxtrotgps.org/> was generated on my desktop
with the window at 482x333 pixels :)

Though, some of the informational panels may be a little more usable
if you have the screen in `portrait' (tall) orientation rather than landscape.

> I also notice my Debian/Matchbox computer has flat boring buttons and
> my Ubuntu machine gets fancy shaded ones. I assume that's done by
> Matchbox and Gnome respectively.

Different GTK+ themes. In GNOME, you can change that with
gnome-appearance-properties and/or gnome-color-chooser;
or you can edit it in GConf under /desktop/gnome/interface;
alternately, I think you can still edit ~/.gtkrc (or .gtkrc-2.0?).

If you do need to change the GUI for some reason, it's pretty much all
defined in the .glade file (I say "pretty much" because some of the labels
are automatically generated by the application code and not all of them
pay any attention to the default label-content defined in Glade).

-- 
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."


More information about the FOSS-GPS mailing list