2010-06-02 Alan Coopersmith <
[email protected]>
* patches/xscreensaver-05-dont-bug-jwz.diff,
* patches/xscreensaver-13-trusted.diff:
Use gnome-help to display man pages in xscreensaver-demo instead
of opening a new terminal window and running man in it.
--- a/ChangeLog Wed Jun 02 13:11:32 2010 +0000
+++ b/ChangeLog Wed Jun 02 16:54:37 2010 +0000
@@ -1,3 +1,10 @@
+2010-06-02 Alan Coopersmith <[email protected]>
+
+ * patches/xscreensaver-05-dont-bug-jwz.diff,
+ * patches/xscreensaver-13-trusted.diff:
+ Use gnome-help to display man pages in xscreensaver-demo instead
+ of opening a new terminal window and running man in it.
+
2010-06-02 Dave Lin <[email protected]>
* specs/SUNWgnome-component.spec
--- a/patches/xscreensaver-05-dont-bug-jwz.diff Wed Jun 02 13:11:32 2010 +0000
+++ b/patches/xscreensaver-05-dont-bug-jwz.diff Wed Jun 02 16:54:37 2010 +0000
@@ -26,50 +26,43 @@
in the places we've chosen to differ and to avoid our users asking him to
fix things that aren't his fault.
+Backport note: this change relies on the gnome-help version delivered in
+Nevada that supports "man:xscreensaver" style URL's to display man pages.
+When backporting to older releases you will probably want to uncomment the
+lines shown for GNOME 2.4/2.6.
+
diff --git xscreensaver-5.11/driver/XScreenSaver.ad.in xscreensaver-5.11/driver/XScreenSaver.ad.in
--- xscreensaver-5.11/driver/XScreenSaver.ad.in
+++ xscreensaver-5.11/driver/XScreenSaver.ad.in
-@@ -85,7 +85,7 @@ GetViewPortIsFullOfLies: False
+@@ -86,18 +86,24 @@ GetViewPortIsFullOfLies: False
! This is the URL loaded by the "Help" button on the splash screen,
! and by the "Documentation" menu item in xscreensaver-demo.
-*helpURL: http://www.jwz.org/xscreensaver/man.html
-+*helpURL:
++*helpURL: man:xscreensaver
! loadURL -- how the "Help" buttons load the helpURL (/bin/sh syntax.)
! manualCommand -- how the "Documentation" buttons display man pages.
-diff --git xscreensaver-5.11/driver/demo-Gtk.c xscreensaver-5.11/driver/demo-Gtk.c
---- xscreensaver-5.11/driver/demo-Gtk.c
-+++ xscreensaver-5.11/driver/demo-Gtk.c
-@@ -891,6 +891,17 @@ about_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
- G_MODULE_EXPORT void
- doc_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
- {
-+ /* We do not want to point to jwz's website for help,
-+ so instead we open the man page in an xterm window */
-+ const char *sun_help_command =
-+ BINDIR "/xterm -T 'Screensaver Help' -e /bin/ksh -c"
-+ " 'export SHELL=\"/dev/null\"; "
-+ " /usr/bin/man xscreensaver || /usr/bin/read foo' &";
-+
-+ if (system (sun_help_command) < 0)
-+ fprintf (stderr, "%s: fork error\n", blurb());
-+
-+#ifdef JWZ_HELP
- state *s = global_state_kludge; /* I hate C so much... */
- saver_preferences *p = &s->prefs;
- char *help_command;
-@@ -913,9 +924,9 @@ doc_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
- if (system (help_command) < 0)
- fprintf (stderr, "%s: fork error\n", blurb());
- free (help_command);
-+#endif /* JWZ_HELP */
- }
-
--
- G_MODULE_EXPORT void
- file_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
- {
+ !
+ ! And there are so very many options to choose from!
+ !
++! Modern GNOME:
++!
++*loadURL: gnome-help '%s'
++*manualCommand: gnome-help 'man:%s'
++!
+ ! Gnome 2.4, 2.6: (yelp can't display man pages, as of 2.6.3)
+ !
+-@GNOME24@*loadURL: @WITH_BROWSER@ '%s'
+-@GNOME24@*manualCommand: gnome-terminal --title '%s manual' \
+-@GNOME24@ --command '/bin/sh -c "man %s; read foo"'
++!*loadURL: gnome-terminal --title 'xscreensaver manual' \
++! --command '/bin/sh -c "man xscreensaver; read foo"'
++!*manualCommand: gnome-terminal --title '%s manual' \
++! --command '/bin/sh -c "man %s; read foo"'
+ !
+ ! Gnome 2.2:
+ !
diff --git xscreensaver-5.11/driver/xscreensaver.c xscreensaver-5.11/driver/xscreensaver.c
--- xscreensaver-5.11/driver/xscreensaver.c
+++ xscreensaver-5.11/driver/xscreensaver.c
--- a/patches/xscreensaver-13-trusted.diff Wed Jun 02 13:11:32 2010 +0000
+++ b/patches/xscreensaver-13-trusted.diff Wed Jun 02 16:54:37 2010 +0000
@@ -101,17 +101,7 @@
#ifdef HAVE_GTK2
enum {
COL_ENABLED,
-@@ -916,6 +924,9 @@ doc_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
- " 'export SHELL=\"/dev/null\"; "
- " /usr/bin/man xscreensaver || /usr/bin/read foo' &";
-
-+ if ( tsol_multi_label_session )
-+ return; /* See CR 6845488 */
-+
- if (system (sun_help_command) < 0)
- fprintf (stderr, "%s: fork error\n", blurb());
-
-@@ -2885,9 +2896,73 @@ populate_prefs_page (state *s)
+@@ -2874,9 +2882,73 @@ populate_prefs_page (state *s)
SENSITIZE ("pwd_spinbutton", p->pwd_p);
SENSITIZE ("pwd_mlabel", p->pwd_p);
@@ -185,7 +175,7 @@
/* DPMS
*/
-@@ -2917,6 +2992,7 @@ populate_prefs_page (state *s)
+@@ -2906,6 +2978,7 @@ populate_prefs_page (state *s)
# undef SENSITIZE
}
@@ -193,7 +183,7 @@
}
-@@ -3002,6 +3078,9 @@ sensitize_menu_items (state *s, Bool force_p)
+@@ -2991,6 +3064,9 @@ sensitize_menu_items (state *s, Bool force_p)
for (i = 0; i < countof(names); i++)
{
@@ -203,7 +193,7 @@
GtkWidget *w = name_to_widget (s, names[i]);
gtk_widget_set_sensitive (GTK_WIDGET(w), running_p);
}
-@@ -4968,7 +5047,7 @@ main (int argc, char **argv)
+@@ -4957,7 +5033,7 @@ main (int argc, char **argv)
applicationShellWidgetClass,
dpy, 0, 0);
--- a/specs/SUNWxscreensaver.spec Wed Jun 02 13:11:32 2010 +0000
+++ b/specs/SUNWxscreensaver.spec Wed Jun 02 16:54:37 2010 +0000
@@ -607,6 +607,8 @@
%endif
%changelog
+* Wed Jun 2 2010 - [email protected]
+- Use gnome-help to display man pages instead of running "man" in a terminal
* Tue Jun 1 2010 - [email protected]
- Fix XErrors from XRestackWindow calls by major overhaul of accessibility
and parent/child communication code.