Sfoglia il codice sorgente

add explicit (non-)overlapping support to Curses::UI

Ralf S. Engelschall 23 anni fa
parent
commit
1d0226c8b6
2 ha cambiato i file con 60 aggiunte e 2 eliminazioni
  1. 56 0
      perl-curses/perl-curses.patch
  2. 4 2
      perl-curses/perl-curses.spec

+ 56 - 0
perl-curses/perl-curses.patch

@@ -0,0 +1,56 @@
+Index: lib/Curses/UI.pm
+===================================================================
+RCS file: /u/rse/wrk/cui/cvs/cui/lib/Curses/UI.pm,v
+retrieving revision 1.1.1.1
+diff -u -d -u -d -r1.1.1.1 UI.pm
+--- lib/Curses/UI.pm	2002/11/20 15:00:33	1.1.1.1
++++ lib/Curses/UI.pm	2002/11/20 15:12:54
+@@ -65,6 +65,7 @@
+         -cursor_mode   => 0,     # What is the current cursor_mode?
+ 	-debug         => undef, # Turn on debugging mode?
+ 	-language      => undef, # Which language to use?
++        -overlapping   => 1,     # Whether overlapping widgets are supported
+ 
+         %userargs,
+ 
+@@ -118,6 +119,7 @@
+ sub clear_on_exit(;$) { shift()->accessor('-clear_on_exit',   shift()) }
+ sub cursor_mode(;$)   { shift()->accessor('-cursor_mode',     shift()) }
+ sub lang(;$)          { shift()->accessor('-language_object', shift()) }
++sub overlapping(;$)   { shift()->accessor('-overlapping',     shift()) }
+ 
+ # TODO: document
+ sub debug(;$)         
+Index: lib/Curses/UI/Widget.pm
+===================================================================
+RCS file: /u/rse/wrk/cui/cvs/cui/lib/Curses/UI/Widget.pm,v
+retrieving revision 1.1.1.1
+diff -u -d -u -d -r1.1.1.1 Widget.pm
+--- lib/Curses/UI/Widget.pm	2002/11/20 15:00:33	1.1.1.1
++++ lib/Curses/UI/Widget.pm	2002/11/20 15:41:37
+@@ -460,7 +460,7 @@
+     my $parent = $this->parent;
+     $parent->focus($this) if defined $parent;
+ 
+-    $this->draw(1);
++    $this->draw(1) if ($this->root->overlapping);
+     return $this;
+ }
+ 
+@@ -943,6 +943,8 @@
+     my $show_cursor = $this->{-nocursor} ? 0 : 1;
+     $this->root->cursor_mode($show_cursor);
+ 
++    $this->draw(1) if (not $this->root->overlapping);
++
+     return $this;
+ }
+ 
+@@ -951,6 +953,7 @@
+     my $this = shift;
+     $this->{-focus} = 0;
+     $this->run_event('-onblur');
++    $this->draw(1) if (not $this->root->overlapping);
+     return $this;
+ }
+ 

+ 4 - 2
perl-curses/perl-curses.spec

@@ -40,8 +40,8 @@ Packager:     The OpenPKG Project
 Distribution: OpenPKG [BASE]
 Group:        Language
 License:      GPL/Artistic
-Version:      20021119
-Release:      20021119
+Version:      20021120
+Release:      20021120
 
 #   list of sources
 Source0:      http://www.cpan.org/modules/by-module/Curses/Curses-%{V_curses}.tar.gz
@@ -50,6 +50,7 @@ Source2:      http://www.cpan.org/modules/by-module/Curses/Curses-UI-DelimitedTe
 Source3:      http://www.cpan.org/modules/by-module/Curses/CursesWidgets-%{V_curses_widgets}.tar.gz
 Source4:      http://www.cpan.org/modules/by-module/Curses/CursesForms-%{V_curses_forms}.tar.gz
 Source5:      ftp://invisible-island.net/cdk/cdk-perl-%{V_cdk_perl}.tgz
+Patch0:       perl-curses.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -76,6 +77,7 @@ AutoReqProv:  no
     %setup3 -q -T -D -a 3
     %setup4 -q -T -D -a 4
     %setup5 -q -T -D -a 5
+    (cd Curses-UI-%{V_curses_ui} && %{l_patch} -p0 <%{SOURCE perl-curses.patch})
 
 %build