TiZ-HugLife / xfce4-dockbarx-plugin

A plugin that embeds DockbarX into Xfce4-panel
MIT License
70 stars 14 forks source link

compatibility with gtk3 dockbarx #38

Open chaosmonk1 opened 5 years ago

chaosmonk1 commented 5 years ago

I am trying to get the gtk 3 branch of dockbarx to work with xfce4-dockbar-plugin by porting /xfce4-dockbarx-plug.py to gtk3. To clarify, this is a different issue from #35, which requires dockbarx.vala to be ported to gtk3.

@TiZ-EX1, I understand that you don't maintain this project any more, but since I'm stuck and you're more familiar with the code I thought I'd reach out and see if you can provide some guidance.

So far all I've really done is update the syntax using the information on these two pages. The plugin builds and installs, and is added to xfce4-panel. When I run xfce4-panel I get no errors (though one warning), but the dock does not appear on the panel. The full output is

/usr/lib/python2.7/dist-packages/gi/overrides/__init__.py:326: Warning: value "((GtkWindowType) 56623140)" of type 'GtkWindowType' is invalid or out of range for property 'type' of type 'GtkWindowType'
  return super_init_func(self, **new_kwargs)
DockbarX 0.93-gtk3
DockbarX init
DockbarX reload

I think the problem is that the do_draw function (the "draw" signal replaces "expose" in gtk3) is never getting called, even when I make sure that queue_draw() is. (I reached this conclusion by scattering print statements and seeing what code does/doesn't get reached.)

I've not worked with gtk (2 or 3) before and am learning as I go. I'd appreciate any feedback or guidance you can provide. Thanks.

M7S commented 4 years ago

I have the new gtk3/python3 branch of dockbarx working in this branch. I can't get the background color right when using "blend with panel" but everything else should be working.

chaosmonk1 commented 4 years ago

@M7S Great! Thanks for doing that work. In order to get the python3 branch of dockbarx to build I needed to change lines 93-94 of msgfmt.py to

    output += ids.encode()
    output += strs.encode()

but after that it built and is running fine as a standalone dock. I'm going to build xfce4-dockbar-plugin next.

M7S commented 4 years ago

After lots of banging my head against the wall while trying to figure out why the background was wrong when using "blend with background", I realized that it was the gtk theme I was using that lacked support for xfce-panel gtk3 theming (sadly quite a few gtk themes seems to have this problem). The gtk3 version of the plug should in other words be fully functional without any known bugs, but that's probably because it hasn't been tested enough yet.

M7S commented 4 years ago

Scratch that. It's the other way around. Only themes that doesn't specify a background color for xfce4-panel did get the same background color. But the bug is finally fixed now.