How do I get the gnome theme colours from C or C++ (GTK+ and gtkmm) - Linux

This is a discussion on How do I get the gnome theme colours from C or C++ (GTK+ and gtkmm) - Linux ; How do I programatically query the gnome desktop theme? For example, how do I find the current background colour/image/ gradient, or the titlebar colour? (I'm learning gtk+ & gtkmm on Ubuntu 7.04.) Thanks! Stéphane Charette...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How do I get the gnome theme colours from C or C++ (GTK+ and gtkmm)

  1. How do I get the gnome theme colours from C or C++ (GTK+ and gtkmm)

    How do I programatically query the gnome desktop theme?

    For example, how do I find the current background colour/image/
    gradient, or the titlebar colour?

    (I'm learning gtk+ & gtkmm on Ubuntu 7.04.)

    Thanks!

    Stéphane Charette


  2. Re: How do I get the gnome theme colours from C or C++ (GTK+ and gtkmm)

    On Jul 8, 12:32 am, Stephane Charette
    wrote:
    > How do I programatically query the gnome desktop theme?
    >
    > For example, how do I find the current background colour/image/
    > gradient, or the titlebar colour?
    >
    > (I'm learning gtk+ & gtkmm on Ubuntu 7.04.)
    >
    > Thanks!
    >
    > Stéphane Charette


    Answering my own post:

    #include
    [...]
    Gdk::Color bgColour;
    GConfEngine *engine = gconf_engine_get_default();
    const char * bgColourString = gconf_engine_get_string(engine, "/
    desktop/gnome/background/primary_color", NULL);
    gconf_engine_unref(engine);
    if (bgColourString)
    {
    bgColour.set(bgColourString);
    }

    Stéphane Charette


+ Reply to Thread