[xscreensaver/f14/master] - Warn (not say "Error") about missing image directory, and warn only once (bug 648304)
Mamoru Tasaka
mtasaka at fedoraproject.org
Wed Nov 10 16:32:06 UTC 2010
commit ef3a88a15730bf77b94631e5a536b3a3acbd7bf0
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Thu Nov 11 01:32:03 2010 +0900
- Warn (not say "Error") about missing image directory, and warn
only once (bug 648304)
....12-warn-only-once-with-missing-image-dir.patch | 67 ++++++++++++++++++++
xscreensaver.spec | 14 +++-
2 files changed, 78 insertions(+), 3 deletions(-)
---
diff --git a/xscreensaver-5.12-warn-only-once-with-missing-image-dir.patch b/xscreensaver-5.12-warn-only-once-with-missing-image-dir.patch
new file mode 100644
index 0000000..5a31618
--- /dev/null
+++ b/xscreensaver-5.12-warn-only-once-with-missing-image-dir.patch
@@ -0,0 +1,67 @@
+--- xscreensaver-5.12/driver/demo-Gtk.c.debug 2010-06-26 20:38:38.000000000 +0900
++++ xscreensaver-5.12/driver/demo-Gtk.c 2010-11-01 16:08:53.000000000 +0900
+@@ -535,7 +535,7 @@
+
+ typedef enum { D_NONE, D_LAUNCH, D_GNOME, D_KDE } dialog_button;
+
+-static void
++static Bool
+ warning_dialog (GtkWidget *parent, const char *message,
+ dialog_button button_type, int center)
+ {
+@@ -555,7 +555,7 @@
+ !GET_WINDOW (parent)) /* too early to pop up transient dialogs */
+ {
+ fprintf (stderr, "%s: too early for dialog?\n", progname);
+- return;
++ return False;
+ }
+
+ head = msg;
+@@ -680,6 +680,7 @@
+ #endif /* !HAVE_GTK2 */
+
+ free (msg);
++ return True;
+ }
+
+
+@@ -1485,6 +1486,7 @@
+ GList *kids = gtk_container_children (GTK_CONTAINER (list_widget));
+ int i;
+ #endif /* !HAVE_GTK2 */
++ static Bool already_warned_about_missing_image_directory = False; /* very long name... */
+
+ Bool changed = False;
+ GtkWidget *w;
+@@ -1587,16 +1589,26 @@
+ # undef PATHNAME
+ # undef TEXT
+
+- /* Warn if the image directory doesn't exist.
++ /* Warn if the image directory doesn't exist, when:
++ - not being warned before
++ - image directory is changed and the directory doesn't exist
+ */
+ if (p2->image_directory &&
+ *p2->image_directory &&
+- !directory_p (p2->image_directory))
++ !directory_p (p2->image_directory) &&
++ ( !already_warned_about_missing_image_directory ||
++ ( p->image_directory &&
++ *p->image_directory &&
++ strcmp(p->image_directory, p2->image_directory)
++ )
++ )
++ )
+ {
+ char b[255];
+- sprintf (b, "Error:\n\n" "Directory does not exist: \"%s\"\n",
++ sprintf (b, "Warning:\n\n" "Directory does not exist: \"%s\"\n",
+ p2->image_directory);
+- warning_dialog (s->toplevel_widget, b, D_NONE, 100);
++ if (warning_dialog (s->toplevel_widget, b, D_NONE, 100))
++ already_warned_about_missing_image_directory = True;
+ }
+
+
diff --git a/xscreensaver.spec b/xscreensaver.spec
index e9d6963..67dacc4 100644
--- a/xscreensaver.spec
+++ b/xscreensaver.spec
@@ -5,7 +5,7 @@
%define modular_conf 1
-%define fedora_rel 6
+%define fedora_rel 7
%undefine extrarel
@@ -59,7 +59,7 @@ Patch30: xscreensaver-5.11-conf264.patch
# on passwd prompt
Patch31: xscreensaver-5.12-for-now-set-lang-on-daemon-to-C.patch
#
-# Patch32, 33, 34, 35: already sent to the upstream
+# Patch32, 33, 34, 35, 36: already sent to the upstream
#
# Kill memleak on gltext (bug 638600)
Patch32: xscreensaver-5.12-gltext-memleak.patch
@@ -70,6 +70,9 @@ Patch34: xscreensaver-5.12-flame-completely-blank.patch
# Remove Gtk-warning
# "GtkSpinButton: setting an adjustment with non-zero page size is deprecated"
Patch35: xscreensaver-5.12-gtkspinbox-page-size-to-zero.patch
+# Warn (not say "Error") about missing image directory, and warn
+# only once (bug 648304)
+Patch36: xscreensaver-5.12-warn-only-once-with-missing-image-dir.patch
# Patches end
Requires: xscreensaver-base = %{epoch}:%{version}-%{release}
Requires: xscreensaver-extras = %{epoch}:%{version}-%{release}
@@ -245,6 +248,7 @@ This package contains some test programs to debug XScreenSaver.
%patch33 -p1 -b .xmllist
%patch34 -p1 -b .flame_blank
%patch35 -p1 -b .spin_warn
+%patch36 -p1 -b .warn_once
change_option(){
set +x
@@ -750,11 +754,15 @@ exit 0
%defattr(-,root,root,-)
%changelog
+* Thu Nov 11 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.12-7
+- Warn (not say "Error") about missing image directory, and warn
+ only once (bug 648304)
+
* Thu Oct 28 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.12-6
- Remove GTK warning about non-zero page-size on GtkSpinButton
* Wed Oct 13 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.12-5
-- Fix the issue that xflame is completely blank (bug 642651)
+- Fix the issue that flame is completely blank (bug 642651)
* Wed Oct 13 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.12-4
- Enable libgle dependent hacks on F-13+
More information about the scm-commits
mailing list