After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572357 - Use gtk.show_uri for help
Use gtk.show_uri for help
Status: RESOLVED FIXED
Product: pessulus
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Pessulus Maintainer(s)
Pessulus Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-02-19 00:50 UTC by Thomas Andersen
Modified: 2009-08-31 20:39 UTC
See Also:
GNOME target: 2.28.x
GNOME version: ---


Attachments
Use gtk.show_uri for opening help (2.46 KB, patch)
2009-02-19 00:52 UTC, Thomas Andersen
none Details | Review
also remove gnome.program_init() and PKG_CHECK_MODULES for python-gnome/python-gnome-desktop (2.97 KB, patch)
2009-02-19 01:34 UTC, Thomas Andersen
none Details | Review
Updated patch (4.84 KB, patch)
2009-02-26 04:52 UTC, Vincent Untz
accepted-commit_after_freeze Details | Review
Updated patch, better :-) (4.06 KB, patch)
2009-03-03 18:23 UTC, Vincent Untz
committed Details | Review

Description Thomas Andersen 2009-02-19 00:50:52 UTC
Patch replaces gnome.help_display_desktop with gtk.show_uri. Also checks for errors on help and prints a (translated) string.

Bumps pygtk dependency to 2.13.0
Comment 1 Thomas Andersen 2009-02-19 00:52:22 UTC
Created attachment 129024 [details] [review]
Use gtk.show_uri for opening help
Comment 2 Vincent Untz 2009-02-19 01:18:19 UTC
Thomas: can you try also removing gnome.program_init() in main.py and see if there's any side-effect? Hopefully no and we can remove that.
Comment 3 Thomas Andersen 2009-02-19 01:34:37 UTC
Created attachment 129025 [details] [review]
also remove gnome.program_init() and PKG_CHECK_MODULES for python-gnome/python-gnome-desktop

Seems to work fine. I also removed the PKG_CHECK_MODULES for python-gnome/python-gnome-desktop. I assumed they were only for import gnome?

New patch includes all changes.
Comment 4 Vincent Untz 2009-02-26 04:52:02 UTC
Created attachment 129544 [details] [review]
Updated patch

This fixes a few issues with your patch. We can't commit because of string freeze, though.
Comment 5 Thomas Andersen 2009-02-26 11:35:44 UTC
What I love about code reviews is that is it a chance to learn and grow. So may I ask a few questions?

The changes you made over my patch seems to be:
1) Making it optional to show the help button. But I am confused since this is only called from one place and there it is hardcoded to be true. What purpose does this serve?

2) Add a dialog to show if an error occurred when showing the help. When will gtk.show_uri() even fail? Yelp seems to handle errors it encounters itself so this will seems to mainly be if yelp is not working?. Is that case worth all the extra code? And if it is only for when yelp is broken/missing then perhaps the text could be more helpful?

3) An unrelated code style fixup and variable name change from 'flags' to 'type'. Seemingly unrelated to the patch in general?
Comment 6 Vincent Untz 2009-02-26 15:09:47 UTC
(In reply to comment #5)
> What I love about code reviews is that is it a chance to learn and grow. So may
> I ask a few questions?

Sure, I actually wanted to explain what I changed, but it was late ;-)

> The changes you made over my patch seems to be:
> 1) Making it optional to show the help button. But I am confused since this is
> only called from one place and there it is hardcoded to be true. What purpose
> does this serve?

Actually, pessulus code can also be used from sabayon. This was done for the sabayon case. Except that, hrm, this is stupid. I'll change this again.

> 2) Add a dialog to show if an error occurred when showing the help. When will
> gtk.show_uri() even fail? Yelp seems to handle errors it encounters itself so
> this will seems to mainly be if yelp is not working?. Is that case worth all
> the extra code? And if it is only for when yelp is broken/missing then perhaps
> the text could be more helpful?

That's not that much code, and it's actually some generic error dialog code, so I think it's worth it. It can happen if yelp is not installed, I guess.

> 3) An unrelated code style fixup and variable name change from 'flags' to
> 'type'. Seemingly unrelated to the patch in general?

Yep. I should commit this part separately.
Comment 7 Vincent Untz 2009-03-03 18:23:42 UTC
Created attachment 129960 [details] [review]
Updated patch, better :-)
Comment 8 Thomas Andersen 2009-03-03 19:15:15 UTC
I'm curious. What is gnome-python-desktop-2.0 dep for?
Comment 9 Vincent Untz 2009-03-03 19:21:34 UTC
bug-buddy integration
Comment 10 Thomas Andersen 2009-03-03 19:26:11 UTC
Ah. Thought that was handled in gtk now. Sorry about the noise
Comment 11 Vincent Untz 2009-07-28 15:42:23 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 12 Thomas Andersen 2009-08-31 20:16:44 UTC
Hey vuntz,

Kind of surprised to see you take full credit for the patch for adding an error handling dialog, but whatever.

http://git.gnome.org/cgit/pessulus/tree/NEWS#n47
http://git.gnome.org/cgit/pessulus/commit/?id=8bff1c4a58eae9add62cf17b44dea859b8299565
Comment 13 Vincent Untz 2009-08-31 20:33:27 UTC
For NEWS, I just take the information from the commit logs, and I guess I forgot to pass --author when committing this one. Just a simple mistake...

(you can check that I usually pass --author for patches by looking at my modules)
Comment 14 Thomas Andersen 2009-08-31 20:39:16 UTC
fair enough, no problem then :)