Re: [gtk-osx-users] Change icon theme and theme





On Aug 21, 2018, at 6:23 AM, Timo via Gtk-osx-users-list <gtk-osx-users-list gnome org> wrote:

Hello all,

I have a PyGTK/GTK2 application that builds, bundles and runs pretty good on macOS for a while now. It was always using the Clearlooks theme and the default (Tango?) icon theme.

Now I was thinking to make it look a bit more native and found some macOS icon themes[1][2][3] and a GTK2 theme[4]. Starting with the icon themes, I'm unable to get them loaded. They are in {$prefix}/share/icons/ and this was added to my bundle file:

    <icon-theme icons="all">
        OneOfTheIconThemes
    </icon-theme>

I can see they are bundled correctly in the app bundle. Also added the following line in /etc/gtkrc:

    gtk-icon-theme-name = "OneOfTheIconThemes"

But as said, the application starts with the default icons and don't know how to debug. The application uses the normal gtk.STOCK_* icons.

About the custom theme, it states that it requires the Murrine engine. Seeing it's listed in the modulesets, I ran:

    $ jhbuild build murrine-engine

But fails during make with:

    Undefined symbols for architecture x86_64:
      "_pixman_image_composite", referenced from:
          __blur_image_surface in gaussian-blur.o
      "_pixman_image_create_bits", referenced from:
          __blur_image_surface in gaussian-blur.o
      "_pixman_image_set_filter", referenced from:
          __blur_image_surface in gaussian-blur.o
      "_pixman_image_unref", referenced from:
          __blur_image_surface in gaussian-blur.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [libmurrine.la] Error 1
    make: *** [all-recursive] Error 1
    *** Error during phase build of murrine-engine: ########## Error running make -j 5  *** [1/1]

Is this a 64-bit error in the Murrine engine (it's built for that arch on Linux) or a problem with Pixman? The entire GTK stack is built with the following setup_sdk without errors:

    setup_sdk(target="10.12", sdk_version=None, architectures=["x86_64"])

Any help with this or if it's even possible is appreciated.

I’ll preface this by saying that every time I tried to use a theme to make Gramps or GnuCash look more mac-like I wound up with instability that I wasn’t willing to inflict on users.

I trust that you meant <bundle>/Contents/Resources/etc/gtkrc. IIRC that should be .../etc/gtkrc-2.0. Make sure that you don’t have ~/.gtkrc-2.0 or ~/.config/gtkrc-2.0/gtkrc overriding it.

Those symbols are all present in the build of libpixman I have here, so the first thing to check is that they’re present in your build: 
  nm <prefix>/lib/libpixman-1.0.dylib | grep pxman_image
will list everything.
But since the linker will usually say “expected in libpixman.dylib” if it knows where they should be it’s more likely that murine has had some bitrot and isn’t linking the right library. Not overly surprising since it was last released in 2012. You’ll have to take over maintenance and bring it up to date so that you can build it.

 It wasn’t migrated to gitlab (no surprise) and git.gnome.org is shut down, so its only public repository  is https://github.com/Gnome/murrine. I recommend that you clone it while you still can before a Gnome admin gets around to clearing out all of the obsolete packages from there, too.

You’d better get PyGtk too while you’re at it, that also hasn’t been maintained for a long time and wasn’t migrated to gitlab.

But frankly your time would be better spent upgrading your app to PyGObject and Gtk3. The css theming introduced in gtk+-3.10 is vastly more stable than the engine-based theming from Gtk2 and the basic Adwaita theme is better looking than the old, heavy, Motif look as well.

Regards,
John Ralls


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