Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No GUI elements in Actions Window #62

Closed
alyst opened this issue Jul 29, 2010 · 30 comments
Closed

No GUI elements in Actions Window #62

alyst opened this issue Jul 29, 2010 · 30 comments

Comments

@alyst
Copy link

alyst commented Jul 29, 2010

At some point git-cola stopped showing buttons in actions window. Now it's just empty dockable/resizable window. Already tried reinstalling.

git: 1.7.2.1
git-cola: 1.4.2.2
py-qt: 4.7.4
python: 2.6.5
qt: 4.6.3
ArchLinux

@nbigaouette
Copy link

Same thing happening here.

ArchLinux x86_64
git 1.7.2-1
git-cola 1.4.1.2-1
qt 4.6.3-1
pyqt 4.7.4-2
python 2.6.5-3

@nbigaouette
Copy link

Also tried compiling from git (901a8a2), same problem.

@davvid
Copy link
Member

davvid commented Jul 30, 2010

Hmm.  Have you tried resizing the actions widget to be larger?

One thing we recently did was to have all of those actions available in the "Actions" menu. The latest code on github has this.  This should let you work without needing that widget.

That widget hasn't changed much recently; the most recent change was to make it so that it automatically switched between a vertical and horizontal layout.  I wonder if that code is tickling a Qt bug.

That feature is not super important so we could change it to always be vertical like it was in the past.

I can push out a test branch later tonight to test this theory. If that turns out to be the case then we'll have a new release soon with that feature reverted.

@nbigaouette
Copy link

I played with the widget without success. I resized it, moved it, put it elsewhere on the window, on a new tab (shared with the other widgets) and so on. When you say "horizontal layout" do you mean when the resize option is vertical only, and vice-versa?

Thanx, I would try that branch if you push it :)

@alyst
Copy link
Author

alyst commented Jul 31, 2010

Yeah, I've also tried resizing/docking around Actions widget without success.

@davvid
Copy link
Member

davvid commented Jul 31, 2010

mainwindow: Simplify the 'Actions' widget

PyQt4 4.7.4 loses its bearings when a widget modifies the
direction of its QBoxLayout in a resize event.

We depended on this behavior to allow the actions widget to
automatically switch between vertical and horizontal layouts.

Simplify the code by just sticking to a vertical layout.
All of the actions on the 'Actions' widget are also
available in the menus these days.

Closed by 73acd20

Reported-by: alyst via github.com
Signed-off-by: David Aguilar davvid@gmail.com

@nbigaouette
Copy link

Actually, I'm not sure it is really fixed...
I've just compiled it and see the same problem. The about page reports 1.4.2.3.
I still see no actions in the action widget...

@alyst
Copy link
Author

alyst commented Jul 31, 2010

The same with me, I've rebuild git-cola package with 'yaout git-cola-git', the actions.py is using QVBoxLayout, but still no buttons.

@davvid maybe some debugging output would be useful ?

@davvid
Copy link
Member

davvid commented Aug 2, 2010

Hmm, this is pretty weird. There's nothing particularly special about that widget.

My desktop machine has:

$ dpkg-query --show python-qt4
python-qt4  4.7.3-1+b1

I wonder if this is a regression in PyQt 4.7.4. I have fc12 on my work laptop so I could try upgrading to fc13 and see if that brings along 4.7.4. It's either that or try installing Arch linux in a VM.

Is there a specific version of Arch I should grab?

I'm not sure there's much debugging output can help here. The code is about as straightforward as it gets -- we're just creating QPushButtons and adding them to a QVBoxLayout.

I've seen weird stuff happen in the past where Python garbage collections PyQt object prematurely, so I just pushed a commit that ensures that we keep a reference to the actions widget's layout. I'm shooting in the dark until I can get a newer version of PyQt4 to test with, but it doesn't hurt to try it nonetheless.

@davvid
Copy link
Member

davvid commented Aug 2, 2010

cmds: Remove reference to non-existent utils.shell_quote()

utils.shell_quote() was removed in favor of commands.mkarg().

Closed by 760a6a7

Signed-off-by: David Aguilar davvid@gmail.com

@davvid
Copy link
Member

davvid commented Aug 2, 2010

Hmm, I was totally confused. You guys kept saying "actions dialog" and I kept thinking that you were talking about the "actions widget". I found a bug that was preventing the actions dialog from appearing. Doh.

@alyst
Copy link
Author

alyst commented Aug 2, 2010

Just to get it right -- I'm talking about a dockable window with the array of buttons 'Push...', 'Pull...' etc, which sits in the right part of cola window. Not about dialogs, that are shown on button click (from menu they work ok).
Unfortunately, in a5756bf I still couldn't see 'Actions' window contents.

Maybe we can have debugging output of the button or layout coordinates/visibility flags. Or you can suggest us some PyQt window structure viewing utility to narrow the problem?

@davvid
Copy link
Member

davvid commented Aug 2, 2010

Are things any better in 760a6a7 ?
I reverted stuff later, so it'd be good to know if that snapshot did anything better.

Also, is there any chance you can try PyQt 4.7.3? I've seen PyQt bugs in the past and I'm not prepared to rule it out.

@alyst
Copy link
Author

alyst commented Aug 2, 2010

@davvid
You're right, downgrading to 4.7.3 solved the problem! Thank you and sorry for troubles!
I've also tried 4.7.5-snapshot -- without success. Should we report this bug to PyQT developers (although I don't know how to report it correctly)?
@nbigaouette
You can find old pyqt package here: http://schlunix.org/archlinux/extra/os/x86_64/

@nbigaouette
Copy link

Thanx. I've tried pyqt 4.7.3 on i686 and the widgets are back ;)

@davvid
Copy link
Member

davvid commented Aug 4, 2010

Thanks for trying out the older version of PyQt4.

This is a little concerning. I think there are two things left to do.

The first thing would be to contact the ArchLinux PyQt4 package maintainer and let them know about this regression. The 2nd thing is to let riverbank (PyQt4 authors) know about it as well.

You guys are the first ones to report this problem with 4.7.4. I now have the fear that this problem will resurface as soon as other distributions start going to 4.7.4+. That means that getting this fixed upstream is very important.

I did add code to the latest 'master' that holds a reference to the widget's layout, but that may not be related to this problem. I honestly wish I knew what exactly is triggering the bug. The weird thing is that the other widgets work just fine.

Is it possible that moving the ~/.cola file aside could also fix it? We load the saved window state from that file so perhaps that could be tickling the bug?

Thanks for your help. I'm going to keep this bug open until you guys have a chance to talk with either the Arch or PyQt4 maintainers.

@nbigaouette
Copy link

Deleting ~/.cola had no effect here...

@alyst
Copy link
Author

alyst commented Aug 4, 2010

reported pyqt bug to ArchLinux: http://bugs.archlinux.org/task/20370

@alyst
Copy link
Author

alyst commented Aug 5, 2010

ArchLinux bug is closed, with 'Upstream' resolution.
@davvid
I think it's better if you write to pyqt developers directly, as the obvious first questions from them would be: "Where/what is the code that creates a window under question?"
As I understand, the only way to report a bug in PyQt is via mailing list
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

@gbishop
Copy link

gbishop commented Oct 19, 2010

I'm seeing this problem in Ubuntu 10.10 Meerkat and Cola 1.4.2.1

@davvid
Copy link
Member

davvid commented Oct 19, 2010

Hmm okay I just pushed something to test. I'm going to install ubuntu in a vm and see if I get a firsthand look. For now, can you let me know if this makes any difference?

git fetch
git checkout origin/qtdebug
cd $there
$cola/bin/git-cola

pyqt has some sharp edges. it's unfortunate that this behavior changed post-4.7.3. hopefully we can find the right workaround.

@gbishop
Copy link

gbishop commented Oct 19, 2010

Actions still shows up empty.

@davvid
Copy link
Member

davvid commented Oct 20, 2010

qt: Check layouts against None instead of assuming bool(layout) is True

PyQt 4.7.3 no longer evaluates bool(layout) to True.
Thanks to the patient Ubuntu and Arch users who reported this problem.

Closed by dd6bb1a

Signed-off-by: David Aguilar davvid@gmail.com

@davvid
Copy link
Member

davvid commented Oct 20, 2010

Thanks everyone for your help. Today I learned to never assume that bool(some_qt_object) evaluates to True. There'll be a new release soon.

@mrunwal
Copy link

mrunwal commented Dec 21, 2010

For Fedora14 this problem still exist. @davvid what are the steps to follow to overcome this issue. We have given full updates till the date still problem is not rectified. Please assist me.

@davvid
Copy link
Member

davvid commented Dec 23, 2010

I would talk to the git-cola fedora 14 package maintainer. This problem was fixed and released in 1.4.2.5.

koji doesn't have that version packaged yet:
http://koji.fedoraproject.org/koji/packageinfo?packageID=7660

The latest they have is 1.4.1.2. You can verify this by cloning the cola repo and running:

bin/git-cola

The problem shouldn't exist there. If it does, please let me know.

@mrunwal
Copy link

mrunwal commented Dec 23, 2010

@davvid Please talk with Fedora14 Package maintainer as we are still not getting your latest update 1.4.2.5 from regular update.

@mrunwal
Copy link

mrunwal commented Dec 23, 2010

latest which they have given 1.4.1.2 which doesn't have pull and push in action menu neither widget is showing anything.

@davvid
Copy link
Member

davvid commented Jan 13, 2011

A newer build of cola is now available in koji for fedora:
http://koji.fedoraproject.org/koji/packageinfo?packageID=7660

I'm pretty sure you should be able to install that RPM on any version of fedora.

@mrunwal
Copy link

mrunwal commented Jan 13, 2011

In recent update for Fedora14 i can see button. Thanks you for your help.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants