r32088 - in /branches/upstream/libconfig-model-tkui-perl/current: ./ lib/Config/Model/ lib/Config/Model/Tk/

ddumont-guest at users.alioth.debian.org ddumont-guest at users.alioth.debian.org
Sun Mar 15 12:52:33 UTC 2009


Author: ddumont-guest
Date: Sun Mar 15 12:52:28 2009
New Revision: 32088

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=32088
Log:
[svn-upgrade] Integrating new upstream version, libconfig-model-tkui-perl (1.207)

Modified:
    branches/upstream/libconfig-model-tkui-perl/current/ChangeLog
    branches/upstream/libconfig-model-tkui-perl/current/META.yml
    branches/upstream/libconfig-model-tkui-perl/current/README
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/AnyViewer.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListEditor.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListViewer.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashEditor.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashViewer.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafEditor.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafViewer.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListEditor.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListViewer.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/NodeViewer.pm
    branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/TkUI.pm

Modified: branches/upstream/libconfig-model-tkui-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/ChangeLog?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/ChangeLog (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/ChangeLog Sun Mar 15 12:52:28 2009
@@ -1,3 +1,10 @@
+2009-03-12  Dominique Dumont  <dominique.dumont at hp.com> v1.207
+
+	* lib/Config/Model/Tk/LeafEditor.pm (cleanup): new method (and
+	Text editor button) to normalize white space in a string. Useful
+	when filling configuration parameter description from a man page
+	with cut'n'paste.
+
 2008-12-22  Dominique Dumont  <dominique.dumont at hp.com> v1.204
 
 	* *.pm: replaced Tango icons with Crystal icons (LGPL) to comply

Modified: branches/upstream/libconfig-model-tkui-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/META.yml?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/META.yml (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/META.yml Sun Mar 15 12:52:28 2009
@@ -1,6 +1,6 @@
 ---
 name: Config-Model-TkUI
-version: 1.204
+version: 1.207
 author:
   - Dominique Dumont (ddumont at cpan dot org)
 abstract: Tk GUI to edit config data through Config::Model
@@ -19,37 +19,37 @@
 provides:
   Config::Model::Tk::AnyViewer:
     file: lib/Config/Model/Tk/AnyViewer.pm
-    version: 1.0818
+    version: 1.0893
   Config::Model::Tk::CheckListEditor:
     file: lib/Config/Model/Tk/CheckListEditor.pm
-    version: 1.0818
+    version: 1.0893
   Config::Model::Tk::CheckListViewer:
     file: lib/Config/Model/Tk/CheckListViewer.pm
-    version: 1.0815
+    version: 1.0893
   Config::Model::Tk::HashEditor:
     file: lib/Config/Model/Tk/HashEditor.pm
-    version: 1.0805
+    version: 1.0893
   Config::Model::Tk::HashViewer:
     file: lib/Config/Model/Tk/HashViewer.pm
-    version: 1.0815
+    version: 1.0893
   Config::Model::Tk::LeafEditor:
     file: lib/Config/Model/Tk/LeafEditor.pm
-    version: 1.0815
+    version: 1.0893
   Config::Model::Tk::LeafViewer:
     file: lib/Config/Model/Tk/LeafViewer.pm
-    version: 1.0815
+    version: 1.0893
   Config::Model::Tk::ListEditor:
     file: lib/Config/Model/Tk/ListEditor.pm
-    version: 1.0815
+    version: 1.0893
   Config::Model::Tk::ListViewer:
     file: lib/Config/Model/Tk/ListViewer.pm
-    version: 1.0815
+    version: 1.0893
   Config::Model::Tk::NodeViewer:
     file: lib/Config/Model/Tk/NodeViewer.pm
-    version: 1.0815
+    version: 1.0893
   Config::Model::TkUI:
     file: lib/Config/Model/TkUI.pm
-    version: 1.204
+    version: 1.207
 generated_by: Module::Build version 0.3
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html

Modified: branches/upstream/libconfig-model-tkui-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/README?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/README (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/README Sun Mar 15 12:52:28 2009
@@ -5,8 +5,9 @@
 - the configuration editor provided by Config::Model.
 - the configuration model editor provided by Config::Model::Itself
 
-For instance, with this module, Config::Model and Config::Model::Xorg,
-you get a graphical configuration editor for Xorg.
+For instance, with this module, Config::Model and
+Config::Model::OpenSsh, you get a graphical configuration editor for
+sshd_config.
 
 All icons used in this application were created by Crystal Project.
 They are licensed under LGPL. http://www.everaldo.com/crystal/
@@ -39,7 +40,7 @@
 Legalese:
 
 
-    Copyright (c) 2008 Dominique Dumont.
+    Copyright (c) 2008-2009 Dominique Dumont.
 
     This file is part of Config-Model-TkUI.
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/AnyViewer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/AnyViewer.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/AnyViewer.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/AnyViewer.pm Sun Mar 15 12:52:28 2009
@@ -1,6 +1,6 @@
 # $Author: ddumont $
-# $Date: 2008-12-22 14:36:03 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 818 $
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
 
 #    Copyright (c) 2008 Dominique Dumont.
 #
@@ -32,7 +32,7 @@
 
 use vars qw/$VERSION $icon_path/ ;
 
-$VERSION = sprintf "1.%04d", q$Revision: 818 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 my @fbe1 = qw/-fill both -expand 1/ ;
 my @fxe1 = qw/-fill x    -expand 1/ ;

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListEditor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListEditor.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListEditor.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListEditor.pm Sun Mar 15 12:52:28 2009
@@ -1,6 +1,6 @@
 # $Author: ddumont $
-# $Date: 2008-12-22 14:36:03 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 818 $
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
 
 #    Copyright (c) 2008 Dominique Dumont.
 #
@@ -32,7 +32,7 @@
 
 use Tk::NoteBook;
 
-$VERSION = sprintf "1.%04d", q$Revision: 818 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 Construct Tk::Widget 'ConfigModelCheckListEditor';
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListViewer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListViewer.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListViewer.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/CheckListViewer.pm Sun Mar 15 12:52:28 2009
@@ -1,8 +1,8 @@
 # $Author: ddumont $
-# $Date: 2008-12-22 13:19:00 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 815 $
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
 
-#    Copyright (c) 2008 Dominique Dumont.
+#    Copyright (c) 2008-2009 Dominique Dumont.
 #
 #    This file is part of Config-Model-TkUI.
 #
@@ -31,7 +31,7 @@
 use subs qw/menu_struct/ ;
 use Tk::ROText ;
 
-$VERSION = sprintf "1.%04d", q$Revision: 815 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 Construct Tk::Widget 'ConfigModelCheckListViewer';
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashEditor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashEditor.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashEditor.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashEditor.pm Sun Mar 15 12:52:28 2009
@@ -1,6 +1,6 @@
 # $Author: ddumont $
-# $Date: 2008-11-20 09:13:52 +0100 (Thu, 20 Nov 2008) $
-# $Revision: 805 $
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
 
 #    Copyright (c) 2008 Dominique Dumont.
 #
@@ -33,7 +33,7 @@
 use Tk::Dialog ;
 use Tk::Photo ;
 
-$VERSION = sprintf "1.%04d", q$Revision: 805 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 Construct Tk::Widget 'ConfigModelHashEditor';
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashViewer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashViewer.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashViewer.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/HashViewer.pm Sun Mar 15 12:52:28 2009
@@ -1,6 +1,6 @@
 # $Author: ddumont $
-# $Date: 2008-12-22 13:19:00 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 815 $
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
 
 #    Copyright (c) 2008 Dominique Dumont.
 #
@@ -30,7 +30,7 @@
 use vars qw/$VERSION/ ;
 use subs qw/menu_struct/ ;
 
-$VERSION = sprintf "1.%04d", q$Revision: 815 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 Construct Tk::Widget 'ConfigModelHashViewer';
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafEditor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafEditor.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafEditor.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafEditor.pm Sun Mar 15 12:52:28 2009
@@ -1,8 +1,8 @@
 # $Author: ddumont $
-# $Date: 2008-12-22 13:19:00 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 815 $
-
-#    Copyright (c) 2008 Dominique Dumont.
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
+
+#    Copyright (c) 2008-2009 Dominique Dumont.
 #
 #    This file is part of Config-Model-TkUI.
 #
@@ -30,7 +30,7 @@
 use base qw/Config::Model::Tk::LeafViewer/;
 use vars qw/$VERSION/ ;
 
-$VERSION = sprintf "1.%04d", q$Revision: 815 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 Construct Tk::Widget 'ConfigModelLeafEditor';
 
@@ -80,7 +80,10 @@
 					      )
                              ->pack(@fbe1);
 	$cw->reset_value ;
-	$cw->add_buttons($ed_frame) ;
+	my $bframe = $cw->add_buttons($ed_frame) ;
+	$bframe -> Button ( -text => 'Cleanup',
+			    -command => sub { $cw->cleanup},
+			  ) -> pack(-side => 'left') ;
     }
     elsif ($vt eq 'boolean') {
 	$ed_frame->Checkbutton(-text => $leaf->element_name,
@@ -108,6 +111,7 @@
 	map { $lb->selectionSet($idx) if $_ eq $$vref; $idx ++}  @choice;
 	$lb->bind('<Button-1>',sub {$cw->try($lb->get($lb->curselection()))});
 	$cw->add_buttons($ed_frame) ;
+
     }
 
     $inst->pop_no_value_check ;
@@ -129,6 +133,22 @@
 
     # don't call directly SUPER::Populate as it's LeafViewer's populate
     $cw->Tk::Frame::Populate($args) ;
+}
+
+sub cleanup {
+    my ($cw) = @_ ;
+    my $text_widget = $cw->{e_widget} || return ;
+    my $selected = $text_widget -> getSelected ;
+    my $text = $selected || $text_widget -> Contents ;
+    $text =~ s/^\s+//gm;
+    $text =~ s/\s+$//gm;
+    $text =~ s/\s+/ /g;
+
+    if ($selected) {
+	$text_widget -> Insert ($text) ;
+    } else {
+	$text_widget -> Contents($text) ;
+    }
 }
 
 sub add_buttons {
@@ -142,7 +162,8 @@
 		      ) -> pack(-side => 'left') ;
     $bframe -> Button ( -text => 'Store',
 			-command => sub { $cw->store},
-		      ) -> pack(-side => 'left') ;
+		      ) -> pack(-side => 'right') ;
+    return $bframe ;
 }
 
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafViewer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafViewer.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafViewer.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/LeafViewer.pm Sun Mar 15 12:52:28 2009
@@ -1,6 +1,6 @@
 # $Author: ddumont $
-# $Date: 2008-12-22 13:19:00 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 815 $
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
 
 #    Copyright (c) 2008 Dominique Dumont.
 #
@@ -30,7 +30,7 @@
 use base qw/Tk::Frame Config::Model::Tk::AnyViewer/;
 use vars qw/$VERSION/ ;
 
-$VERSION = sprintf "1.%04d", q$Revision: 815 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 Construct Tk::Widget 'ConfigModelLeafViewer';
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListEditor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListEditor.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListEditor.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListEditor.pm Sun Mar 15 12:52:28 2009
@@ -1,6 +1,6 @@
 # $Author: ddumont $
-# $Date: 2008-12-22 13:19:00 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 815 $
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
 
 #    Copyright (c) 2008 Dominique Dumont.
 #
@@ -32,7 +32,7 @@
 use subs qw/menu_struct/ ;
 use Tk::Dialog ;
 
-$VERSION = sprintf "1.%04d", q$Revision: 815 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 Construct Tk::Widget 'ConfigModelListEditor';
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListViewer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListViewer.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListViewer.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/ListViewer.pm Sun Mar 15 12:52:28 2009
@@ -1,6 +1,6 @@
 # $Author: ddumont $
-# $Date: 2008-12-22 13:19:00 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 815 $
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
 
 #    Copyright (c) 2008 Dominique Dumont.
 #
@@ -30,7 +30,7 @@
 use vars qw/$VERSION/ ;
 use subs qw/menu_struct/ ;
 
-$VERSION = sprintf "1.%04d", q$Revision: 815 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 Construct Tk::Widget 'ConfigModelListViewer';
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/NodeViewer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/NodeViewer.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/NodeViewer.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/Tk/NodeViewer.pm Sun Mar 15 12:52:28 2009
@@ -1,6 +1,6 @@
 # $Author: ddumont $
-# $Date: 2008-12-22 13:19:00 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 815 $
+# $Date: 2009-03-12 13:33:03 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 893 $
 
 #    Copyright (c) 2008 Dominique Dumont.
 #
@@ -30,7 +30,7 @@
 use vars qw/$VERSION/ ;
 use subs qw/menu_struct/ ;
 
-$VERSION = sprintf "1.%04d", q$Revision: 815 $ =~ /(\d+)/;
+$VERSION = sprintf "1.%04d", q$Revision: 893 $ =~ /(\d+)/;
 
 Construct Tk::Widget 'ConfigModelNodeViewer';
 

Modified: branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/TkUI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/TkUI.pm?rev=32088&op=diff
==============================================================================
--- branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/TkUI.pm (original)
+++ branches/upstream/libconfig-model-tkui-perl/current/lib/Config/Model/TkUI.pm Sun Mar 15 12:52:28 2009
@@ -1,9 +1,8 @@
-
 # $Author: ddumont $
-# $Date: 2008-12-22 14:36:03 +0100 (Mon, 22 Dec 2008) $
-# $Revision: 818 $
-
-#    Copyright (c) 2007,2008 Dominique Dumont.
+# $Date: 2009-03-12 13:36:55 +0100 (Thu, 12 Mar 2009) $
+# $Revision: 894 $
+
+#    Copyright (c) 2007,2009 Dominique Dumont.
 #
 #    This file is part of Config-Model-TkUI.
 #
@@ -54,7 +53,7 @@
 use Config::Model::Tk::NodeViewer ;
 
 
-$VERSION = '1.204' ;
+$VERSION = '1.207' ;
 
 Construct Tk::Widget 'ConfigModelUI';
 
@@ -315,8 +314,10 @@
 
 sub save_in_dir {
     my $cw = shift ;
-    require Tk::DirSelect ;
+    require Tk::DirSelect ; 
     $cw->{save_dir} = $cw->DirSelect()->Show ;
+    # chooseDirectory does not work correctly.
+    #$cw->{save_dir} = $cw->chooseDirectory(-mustexist => 'no') ;
     $cw->save() ;
 }
 




More information about the Pkg-perl-cvs-commits mailing list