Author Topic: Man page viewer issue  (Read 9654 times)

Offline libfab

  • Multiple posting newcomer
  • *
  • Posts: 45
Man page viewer issue
« on: June 14, 2008, 04:15:41 pm »
For some reason, Man page viewer  does not work on my Ubuntu 8.04 platform (full upgrade to-date), svr rev 5095 compiled by gcc 4.3.1.

For those who experience the same issue, there's an easy turnaround however:

1) Add a man entry in Environment settings>Help file>Add
reply no to the window dialog (no browsing of help files)

2) fill-in the ... edit windows just below with:
(under gnome)
/usr/bin/gnome-terminal -x /usr/lib/man-db/man  $(keyword)
(under kde)
/usr/bin/konsole -e  /usr/lib/man-db/man  $(keyword)

Another option is to install a man pages directory /dir  containing each entry as a file in .chm or html format:

- for html I use:
/usr/bin/firefox  /dir/$(keyword).html
- for chm I use:
/usr/bin/gnochm  /dir/$(keyword).html

or alternatively:

/usr/bin/kchmviewer /dir/$(keyword).chm

3) Check box "This line ... executed"

Hope this helps, but it would be even sweeter to have it fixed in hard code!
Fab

« Last Edit: June 14, 2008, 04:18:40 pm by libfab »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Man page viewer issue
« Reply #1 on: June 14, 2008, 06:36:06 pm »
OK, so it just doesn't work. Any more information about it? It's a bit too much for me to install Ubuntu 8.04 only to see what's going on :P

Offline libfab

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Man page viewer issue
« Reply #2 on: June 14, 2008, 09:14:56 pm »
Here's a screenshot. What kind of info would you like? my man pages are in the usual location (/usr/share/man/man3/ for fopen) and  I also have an .html copy in the same location (made with man2html).

[attachment deleted by admin]

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Man page viewer issue
« Reply #3 on: June 15, 2008, 06:54:05 am »
Could you check in /usr/share/man/man3/ for any files that start by fopen? In my Linux I have one called fopen.3.bz2

Actually, I have /usr/share/man as the path for my man files. Searching fopen returned two matches: fopen.3 and fopen.3p. Just clicked fopen.3 and it works.

What's a bit strange is that your dockable says Man/Html pages viewer, mine only says Man pages viewer. SVN 5081 here.

Maybe someone broke something in revisions 5082 to 5095? I don't see any changes made in that plugin in any of those revisions. Pretty weird stuff indeed.

Offline libfab

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Man page viewer issue
« Reply #4 on: June 15, 2008, 01:10:59 pm »
Yes Ceniza, you're right, I have a fopen.3 man file under /usr/share/man/man3
Perhaps it's the recursive algorithm that needs a bit of tweaking?
(Same issue with the fopen.3.html converted page)
Fab

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Man page viewer issue
« Reply #5 on: June 15, 2008, 06:02:55 pm »
I'm clueless. Could anyone else running *ubuntu 8.04 please check this, including the name of the dockable?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Man page viewer issue
« Reply #6 on: June 15, 2008, 09:15:20 pm »
I'm clueless. Could anyone else running *ubuntu 8.04 please check this, including the name of the dockable?

The title is hardcoded in line 214 in "help_plugin.cpp" :
Code
    evt.title = _("Man/Html pages viewer");

I had the same problem on debian sid/experimental svn r5095.

After removing all entries and renew the entry for man it seems to be gone, but I really don't know why.
Search a man-page from the textbox in the dockable also did not work before.

I found another bug in the help-plugin, while testing it.
If I delete the first entry, and it was not the only one, C::B reliably crashes for me.
This happens because an UpdateEntry is done on the deleted item.

I created a patch that seems to fix this problem.
It wolud be nice if you can test it.

I will not post it at berlios (at least not at the moment), because I cannot test it enough ( I will be without Internet the next week, but I perhaps find the time in the evenings after work to test some more).

Here's the patch:
Code
--- codeblocks-1.0svn.orig/src/plugins/contrib/help_plugin/HelpConfigDialog.cpp 2008-03-10 14:08:47.000000000 +0100
+++ codeblocks-1.0svn.work/src/plugins/contrib/help_plugin/HelpConfigDialog.cpp 2008-06-15 20:57:53.000000000 +0200
@@ -143,7 +143,7 @@
 {
   wxListBox *lst = XRCCTRL(*this, "lstHelp", wxListBox);

-  if (lst->GetSelection() != m_LastSel)
+  if (lst->GetSelection() != -1 && lst->GetSelection() != m_LastSel)
   {
     UpdateEntry(m_LastSel);
   }

Offline libfab

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Man page viewer issue
« Reply #7 on: June 16, 2008, 01:02:15 am »
Hi
tested Jens' patch and works fine on Ubuntu hardy.
Now the man page viewer is back in working condition! I experienced the same issue as Jens and the solution was identical: deleting all entries in Settings > Environment > Help files and renewing man entry.
(Or maybe it's the new patch that improved things?)
Fab

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Man page viewer issue
« Reply #8 on: June 16, 2008, 05:20:01 am »
The Don is the one who modified the title of that dockable. Funnily enough it still has the old name here. Maybe it's stored in the config file or something.

Anyway, nice to see it works now, and thanks for pointing out that bug. I thought that bug, or a similar one, had been removed before. I just applied the patch and it seems to solve the crash. Thanks :)

I tried to commit the change, but I'm getting a "Permission denied" error. I'll have to try later.

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Man page viewer issue
« Reply #9 on: June 19, 2008, 02:37:03 am »
I have the same problem.
Debian Lenny.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Man page viewer issue
« Reply #10 on: June 19, 2008, 04:59:22 am »
Just like jens said: remove all entries and add them again.