Package: gman
Version: 0.9.3-5.1
Severity: normal
Tags: patch
Since yelp does not work any more for manpage, we need some love for
gman. I made attached patches to make this a bit better.
* mozilla -> sensible-browser
* gv -> evince is another option
* manpath -> use current values
I will make NMU using these while updating script in debian directory.
I hope this is OK.
Osamu
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages gman depends on:
ii gnome-terminal [x-terminal-emulator] 3.2.1-2
ii libatk1.0-0 2.2.0-2
ii libc6 2.13-24
ii libcairo2 1.10.2-6.2
ii libfontconfig1 2.8.0-3
ii libfreetype6 2.4.8-1
ii libgcc1 1:4.6.2-9
ii libgdk-pixbuf2.0-0 2.24.0-2
ii libglib2.0-0 2.30.2-4
ii libgtk2.0-0 2.24.8-2
ii libpango1.0-0 1.29.4-2
ii libstdc++6 4.6.2-9
ii man-db 2.6.0.2-3
ii xfce4-terminal [x-terminal-emulator] 0.4.8-1+b1
ii xterm [x-terminal-emulator] 276-2
gman recommends no packages.
Versions of packages gman suggests:
pn apache2-mpm-worker [httpd] 2.2.21-5
pn evince 3.2.1-1
pn gv 1:3.7.3-1
pn man2html 1.6g-6
pn sensible-browser <none>
^^^^^^^ OOps -) fixing control.
-- no debconf information
Author: Osamu Aoki <[email protected]>
Description: Use Evince
--- a/gman.1x
+++ b/gman.1x
@@ -40,6 +40,12 @@
.sp
This requires GhostView (command "gv") to be available on your system.
.TP
+.B Evince
+gman will present man pages in an Evince window for you to view and print
+the man page.
+.sp
+This requires GNOME Evince (command "evince") to be available on your system.
+.TP
.B LocalBrowse
gman will launch a web browser window to show you the man page.
.sp
--- a/gman.c
+++ b/gman.c
@@ -91,6 +91,7 @@
context->set_default_value("show_mode","int",(void*)0); // 0 = xterm, 1 = ghostview
context->set_default_value("xterm_command","char*",(void*)"x-terminal-emulator");
context->set_default_value("gv_command","char*",(void*)"gv");
+ context->set_default_value("evince_command","char*",(void*)"evince");
context->set_default_value("browser_command","char*",(void*)"sensible-browser"); // kfm also works
context->set_default_value("cgi_host","char*",(void*)"localhost");
context->set_default_value("cgi_location","char*",(void*)"/cgi-bin/gman.pl");
--- a/mandata.c
+++ b/mandata.c
@@ -275,6 +275,26 @@
_exit(0);
}
break;
+ case 2:
+ sprintf(loc_name," ~/.gman.%s.ps ",get_display_name(buffer1));
+ sprintf(buffer,"man -t ");
+ len = strlen(buffer);
+ attach(buffer+len,man_path->GetPath(),file_name);
+ strcat(buffer," >> ");
+ strcat(buffer,loc_name);
+ strcat(buffer," ; ");
+ strcat(buffer,(char*)context->get_value("evince_command"));
+ strcat(buffer,loc_name);
+ strcat(buffer," ; rm ");
+ strcat(buffer,loc_name);
+ //g_warning(buffer);
+ if(!fork())
+ {
+ //printf(buffer);
+ system(buffer);
+ _exit(0);
+ }
+ break;
/*
case 2:
sprintf(loc_name," ~/.gman.%s.html ",get_display_name(buffer1));
@@ -304,7 +324,7 @@
}
break;
*/
- case 2:
+ case 3:
sprintf(loc_name," ~/.gman.%s.html ",get_display_name(buffer1));
//g_warning(loc_name);
strcpy(buffer,"/usr/lib/cgi-bin/gman.pl ");
@@ -329,7 +349,7 @@
_exit(0);
}
break;
- case 3:
+ case 4:
sprintf(buffer,(char*)context->get_value("browser_command"));
len = strlen(buffer);
strcat(buffer," \"http://");
--- a/menu.c
+++ b/menu.c
@@ -78,8 +78,9 @@
{"/_View", NULL, NULL, 0, "<Branch>"},
{"/View/x_Term", "<control>T", (void (*)())show_mode_callback, 0, "<RadioItem>"},
{"/View/_GhostView", "<control>G", (void (*)())show_mode_callback, 1, "/View/xTerm"},
- {"/View/_LocalBrowse", "<control>L", (void (*)())show_mode_callback, 2, "/View/xTerm"},
- {"/View/_NetBrowse", "<control>N", (void (*)())show_mode_callback, 3, "/View/xTerm"},
+ {"/View/_Evince", "<control>E", (void (*)())show_mode_callback, 2, "/View/xTerm"},
+ {"/View/_LocalBrowse", "<control>L", (void (*)())show_mode_callback, 3, "/View/xTerm"},
+ {"/View/_NetBrowse", "<control>N", (void (*)())show_mode_callback, 4, "/View/xTerm"},
{"/_Options", NULL, NULL, 0, "<Branch>"},
{"/Options/Status bar", NULL, (void (*)())status_bar_callback, 0, "<CheckItem>"},
{"/Options/sep1", NULL, NULL, 0, "<Separator>"},
@@ -164,8 +165,9 @@
searching_mode_buttons[1] = gtk_item_factory_get_widget(item_factory, "/Options/Key word search");
show_mode_buttons[0] = gtk_item_factory_get_widget(item_factory, "/View/xTerm");
show_mode_buttons[1] = gtk_item_factory_get_widget(item_factory, "/View/GhostView");
- show_mode_buttons[2] = gtk_item_factory_get_widget(item_factory, "/View/LocalBrowse");
- show_mode_buttons[3] = gtk_item_factory_get_widget(item_factory, "/View/NetBrowse");
+ show_mode_buttons[2] = gtk_item_factory_get_widget(item_factory, "/View/Evince");
+ show_mode_buttons[3] = gtk_item_factory_get_widget(item_factory, "/View/LocalBrowse");
+ show_mode_buttons[4] = gtk_item_factory_get_widget(item_factory, "/View/NetBrowse");
status_bar_button = gtk_item_factory_get_widget(item_factory, "/Options/Status bar");
// gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(section_buttons[4]),1);
updata_menu_buttons(0);
Author: Osamu Aoki <[email protected]>
Description: Adjust manpath to current values
--- a/gman.1x
+++ b/gman.1x
@@ -74,7 +74,7 @@
.br
show_warning = 0
.br
-man_paths = /usr/man:/usr/local/man:/usr/X11R6/man
+man_paths = /usr/local/man:/usr/local/share/man:/usr/share/man
.sp
For more information, see init_context() function in gman.c for all the
options avialiable.
--- a/gman.c
+++ b/gman.c
@@ -82,7 +82,7 @@
context = new AppContext();
// context->set_default_value("v_size",(void*)400);
context->set_default_value("debuging","int",(void*)0);
- context->set_default_value("man_paths","char*",(void*)"/usr/share/man:/usr/X11R6/man:/usr/man:/usr/local/man");
+ context->set_default_value("man_paths","char*",(void*)"/usr/local/man:/usr/local/share/man:/usr/share/man");
context->set_default_value("display_section_policy","int",(void*)0);
context->set_default_value("display_section","int",(void*)3);
context->set_default_value("searching_mode","int",(void*)0);
--- a/t2.c
+++ b/t2.c
@@ -744,7 +744,7 @@
item_list_length = 0;
item_list_count = 0;
- man_paths = new ManPath("/usr/X11/man/");
+ man_paths = new ManPath("/usr/share/man/");
printf("GetSize = %d\n",man_paths->GetSize('a'));
item_list_length = item_list_count = man_paths->GetSize('a');
Author: Osamu Aoki <[email protected]>
Description: Use sensible-browser
--- a/gman.1x
+++ b/gman.1x
@@ -41,16 +41,16 @@
This requires GhostView (command "gv") to be available on your system.
.TP
.B LocalBrowse
-gman will launch a Mozilla window to show you the man page.
+gman will launch a web browser window to show you the man page.
.sp
-This requires man2html and Mozilla (command "mozilla") to be available on your
+This requires man2html and web browser (command "sensible-browser") to be available on your
system.
.TP
.B NetBrowse
-In this mode, you can view the pages with Mozilla and navigate from
+In this mode, you can view the pages with web browser and navigate from
one man page to another by clicking the links in the man pages.
.sp
-This requires man2html, Mozilla (command "mozilla") and a HTTP server
+This requires man2html, web browser (command "sensible-browser") and a HTTP server
running on localhost.
.SH FILES
--- a/gman.c
+++ b/gman.c
@@ -91,7 +91,7 @@
context->set_default_value("show_mode","int",(void*)0); // 0 = xterm, 1 = ghostview
context->set_default_value("xterm_command","char*",(void*)"x-terminal-emulator");
context->set_default_value("gv_command","char*",(void*)"gv");
- context->set_default_value("browser_command","char*",(void*)"mozilla"); // kfm also works
+ context->set_default_value("browser_command","char*",(void*)"sensible-browser"); // kfm also works
context->set_default_value("cgi_host","char*",(void*)"localhost");
context->set_default_value("cgi_location","char*",(void*)"/cgi-bin/gman.pl");
context->set_default_value("print_command","char*",(void*)"lpr"); // not in use