diff -Nru gtk2-ex-formfactory-0.66/Changes gtk2-ex-formfactory-0.67/Changes
--- gtk2-ex-formfactory-0.66/Changes 2009-11-08 12:12:43.000000000 +0000
+++ gtk2-ex-formfactory-0.67/Changes 2011-08-11 10:38:17.000000000 +0000
@@ -1,7 +1,14 @@
-$Id: Changes,v 1.29 2009-11-08 12:12:43 joern Exp $
+$Id: Changes,v 1.30 2011-08-11 10:38:17 joern Exp $
Revision history and release notes for Gtk2::Ex::FormFactory:
+0.67 Thu Aug 11, 2011, joern
+ Features:
+ - Added parse_tags option to TextView. This way you
+ can easily create tagged text by using a simple
+ HTML based markup syntax: Tagged text.
+ - Added HPaned widget
+
0.66 Sun Nov 11, 2009, joern
Features:
- image attribute for Button and ToggleButton; set a
diff -Nru gtk2-ex-formfactory-0.66/MANIFEST gtk2-ex-formfactory-0.67/MANIFEST
--- gtk2-ex-formfactory-0.66/MANIFEST 2006-02-27 14:24:03.000000000 +0000
+++ gtk2-ex-formfactory-0.67/MANIFEST 2011-08-11 10:34:40.000000000 +0000
@@ -12,6 +12,7 @@
lib/Gtk2/Ex/FormFactory/Form.pm
lib/Gtk2/Ex/FormFactory/GtkWidget.pm
lib/Gtk2/Ex/FormFactory/HBox.pm
+lib/Gtk2/Ex/FormFactory/HPaned.pm
lib/Gtk2/Ex/FormFactory/HSeparator.pm
lib/Gtk2/Ex/FormFactory/Image.pm
lib/Gtk2/Ex/FormFactory/Intro.pm
diff -Nru gtk2-ex-formfactory-0.66/META.yml gtk2-ex-formfactory-0.67/META.yml
--- gtk2-ex-formfactory-0.66/META.yml 2009-11-08 12:17:05.000000000 +0000
+++ gtk2-ex-formfactory-0.67/META.yml 2011-08-11 10:38:20.000000000 +0000
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Gtk2-Ex-FormFactory
-version: 0.66
+version: 0.67
abstract: ~
author: []
license: unknown
diff -Nru gtk2-ex-formfactory-0.66/README gtk2-ex-formfactory-0.67/README
--- gtk2-ex-formfactory-0.66/README 2009-11-08 12:17:05.000000000 +0000
+++ gtk2-ex-formfactory-0.67/README 2011-08-11 10:38:20.000000000 +0000
@@ -96,13 +96,3 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
USA.
-POD ERRORS
- Hey! The above document had some coding errors, which are explained
- below:
-
- Around line 190:
- =cut found outside a pod block. Skipping to next block.
-
- Around line 203:
- =cut found outside a pod block. Skipping to next block.
-
diff -Nru gtk2-ex-formfactory-0.66/debian/changelog gtk2-ex-formfactory-0.67/debian/changelog
--- gtk2-ex-formfactory-0.66/debian/changelog 2012-11-09 10:12:13.000000000 +0000
+++ gtk2-ex-formfactory-0.67/debian/changelog 2012-11-09 10:12:13.000000000 +0000
@@ -1,3 +1,9 @@
+gtk2-ex-formfactory (0.67-0ubuntu1) raring; urgency=low
+
+ * New upstream release.
+
+ -- Logan Rosen Thu, 08 Nov 2012 18:31:38 -0500
+
gtk2-ex-formfactory (0.66-0ubuntu2) lucid; urgency=low
* Rename gtk2-ex-formfactory-perl to libgtk2-ex-formfactory-perl as per
diff -Nru gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/HPaned.pm gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/HPaned.pm
--- gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/HPaned.pm 1970-01-01 00:00:00.000000000 +0000
+++ gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/HPaned.pm 2011-08-10 10:51:59.000000000 +0000
@@ -0,0 +1,114 @@
+package Gtk2::Ex::FormFactory::HPaned;
+
+use strict;
+
+use base qw( Gtk2::Ex::FormFactory::Container );
+
+sub get_type { "hpaned" }
+
+sub object_to_widget {
+ my $self = shift;
+
+ $self->get_gtk_widget->set_position ( $self->get_object_value );
+
+ 1;
+}
+
+sub widget_to_object {
+ my $self = shift;
+
+ $self->set_object_value ($self->get_gtk_widget->get("position"));
+
+ 1;
+}
+
+sub backup_widget_value {
+ my $self = shift;
+
+ $self->set_backup_widget_value (self->get_gtk_widget->get("position"));
+
+ 1;
+}
+
+sub restore_widget_value {
+ my $self = shift;
+
+ self->get_gtk_widget->set_position ($self->get_backup_widget_value);
+
+ 1;
+}
+
+sub connect_changed_signal {
+ my $self = shift;
+
+ $self->get_gtk_widget->signal_connect (
+ move_handle => sub {
+ $self->widget_value_changed;
+ 1;
+ },
+ );
+
+ 1;
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Gtk2::Ex::FormFactory::HPaned - A HPaned container in a FormFactory framework
+
+=head1 SYNOPSIS
+
+ Gtk2::Ex::FormFactory::HPaned->new (
+ ...
+ Gtk2::Ex::FormFactory::Widget attributes
+ );
+
+=head1 DESCRIPTION
+
+This class implements a HPaned container in a Gtk2::Ex::FormFactory
+framework.
+
+=head1 OBJECT HIERARCHY
+
+ Gtk2::Ex::FormFactory::Intro
+
+ Gtk2::Ex::FormFactory::Widget
+ +--- Gtk2::Ex::FormFactory::HPaned
+
+ Gtk2::Ex::FormFactory::Layout
+ Gtk2::Ex::FormFactory::Rules
+ Gtk2::Ex::FormFactory::Context
+ Gtk2::Ex::FormFactory::Proxy
+
+=head1 ATTRIBUTES
+
+This module has no additional attributes over those derived
+from Gtk2::Ex::FormFactory::Widget.
+
+=head1 AUTHORS
+
+ Jörn Reder
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2004-2006 by Jörn Reder.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2.1 of the
+License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
+USA.
+
+=cut
diff -Nru gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/Layout.pm gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/Layout.pm
--- gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/Layout.pm 2009-11-08 11:39:36.000000000 +0000
+++ gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/Layout.pm 2011-08-10 10:53:42.000000000 +0000
@@ -344,6 +344,17 @@
1;
}
+sub build_hpaned {
+ my $self = shift;
+ my ($hpaned) = @_;
+
+ my $gtk_hpaned = Gtk2::HPaned->new;
+ $gtk_hpaned->set ( position_set => 1 );
+ $hpaned->set_gtk_widget($gtk_hpaned);
+
+ 1;
+}
+
sub build_vbox {
my $self = shift;
my ($vbox) = @_;
@@ -980,6 +991,12 @@
1;
}
+sub add_widget_to_hpaned {
+ my $self = shift;
+ my ($widget, $hpaned) = @_;
+ return $self->add_widget_to_vpaned($widget, $hpaned);
+}
+
sub add_widget_to_vbox {
my $self = shift;
my ($widget, $vbox) = @_;
diff -Nru gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/Loader.pm gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/Loader.pm
--- gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/Loader.pm 2006-02-27 14:26:40.000000000 +0000
+++ gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/Loader.pm 2011-08-10 10:54:11.000000000 +0000
@@ -29,6 +29,7 @@
@Gtk2::Ex::FormFactory::VBox::ISA = qw( Gtk2::Ex::FormFactory::Loader );
@Gtk2::Ex::FormFactory::VSeparator::ISA = qw( Gtk2::Ex::FormFactory::Loader );
@Gtk2::Ex::FormFactory::VPaned::ISA = qw( Gtk2::Ex::FormFactory::Loader );
+@Gtk2::Ex::FormFactory::HPaned::ISA = qw( Gtk2::Ex::FormFactory::Loader );
@Gtk2::Ex::FormFactory::Window::ISA = qw( Gtk2::Ex::FormFactory::Loader );
@Gtk2::Ex::FormFactory::YesNo::ISA = qw( Gtk2::Ex::FormFactory::Loader );
diff -Nru gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/TextView.pm gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/TextView.pm
--- gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/TextView.pm 2006-02-27 14:26:40.000000000 +0000
+++ gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/TextView.pm 2011-08-11 10:24:50.000000000 +0000
@@ -6,10 +6,14 @@
sub get_type { "text_view" }
+sub get_parse_tags { shift->{parse_tags} }
+sub set_parse_tags { shift->{parse_tags} = $_[1] }
+
sub new {
my $class = shift;
my %par = @_;
- my ($scrollbars, $properties) = @par{'scrollbars','properties'};
+ my ($scrollbars, $properties, $parse_tags) =
+ @par{'scrollbars','properties','parse_tags'};
my $self = $class->SUPER::new(@_);
@@ -21,6 +25,7 @@
$self->set_scrollbars ($scrollbars);
$self->set_properties ($properties);
+ $self->set_parse_tags ($parse_tags);
return $self;
}
@@ -28,7 +33,29 @@
sub object_to_widget {
my $self = shift;
- $self->get_gtk_widget->get_buffer->set_text($self->get_object_value);
+ if ( not $self->get_parse_tags ) {
+ $self->get_gtk_widget->get_buffer->set_text($self->get_object_value);
+ return;
+ }
+
+ my $buffer = $self->get_gtk_widget->get_buffer;
+ $buffer->set_text("");
+ my $iter = $buffer->get_end_iter;
+
+ my $text = $self->get_object_value;
+
+ my $processed = 0;
+ while ( $text =~ m!(.*?)()(.*?)()!sg ) {
+ my ($pre, $tag_open, $tag_name, $tag_rest, $content, $tag_close) =
+ ($1, $2, $3, $4, $5, $6);
+ $processed += length($1.$2.$3.$4.$5.$6);
+ $buffer->insert($iter, $pre);
+ $buffer->insert_with_tags_by_name($iter, $content, $tag_name);
+ }
+
+ my $rest = substr($text, $processed);
+
+ $buffer->insert($iter, $rest);
1;
}
@@ -108,6 +135,7 @@
=head1 SYNOPSIS
Gtk2::Ex::FormFactory::TextView->new (
+ parse_tags => Boolean to indicate tag markup in value,
...
Gtk2::Ex::FormFactory::Widget attributes
);
@@ -136,8 +164,28 @@
=head1 ATTRIBUTES
-This module has no additional attributes over those derived
-from Gtk2::Ex::FormFactory::Widget.
+Attributes are handled through the common get_ATTR(), set_ATTR()
+style accessors, but they are mostly passed once to the object
+constructor and must not be altered after the associated FormFactory
+was built.
+
+=over 4
+
+=item B = Boolean [optional]
+
+Set this to a true value to indicate the value of this widget
+contains tag markup. The syntax of tag markup is as follows:
+
+ Some text
+ Some text
+
+Text with this markup will get the correspondent GtkTextView tag
+applied. Please refer to the Gtk2 documentation of GtkTextTagTable
+to learn more about tags. Use a B of your
+Gtk2::Ex::FormFactory::TextView objekt to attach a custom tag table
+to this widget.
+
+=back
=head1 AUTHORS
diff -Nru gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/Widget.pm gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/Widget.pm
--- gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory/Widget.pm 2009-11-08 10:34:10.000000000 +0000
+++ gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory/Widget.pm 2011-08-11 10:34:04.000000000 +0000
@@ -915,6 +915,7 @@
+--- Gtk2::Ex::FormFactory::Expander
+--- Gtk2::Ex::FormFactory::ExecFlow
+--- Gtk2::Ex::FormFactory::GtkWidget
+ +--- Gtk2::Ex::FormFactory::HPaned
+--- Gtk2::Ex::FormFactory::HSeparator
+--- Gtk2::Ex::FormFactory::Image
+--- Gtk2::Ex::FormFactory::Label
diff -Nru gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory.pm gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory.pm
--- gtk2-ex-formfactory-0.66/lib/Gtk2/Ex/FormFactory.pm 2009-11-08 11:42:25.000000000 +0000
+++ gtk2-ex-formfactory-0.67/lib/Gtk2/Ex/FormFactory.pm 2011-08-11 10:29:06.000000000 +0000
@@ -1,6 +1,6 @@
package Gtk2::Ex::FormFactory;
-$VERSION = "0.66";
+$VERSION = "0.67";
use strict;
@@ -187,21 +187,6 @@
$self->get_widgets_by_name->{$widget->get_name} = $widget;
-=cut
-
-print "UNBUFFERED: widget=".$widget->get_name." object=".$widget->get_object."\n"
-if $widget->get_object &&
- !$self->get_context
- ->get_proxy($widget->get_object)
- ->get_buffered;
-print "BUFFERED: widget=".$widget->get_name." object=".$widget->get_object."\n"
-if $widget->get_object &&
- $self->get_context
- ->get_proxy($widget->get_object)
- ->get_buffered;
-
-=cut
-
$self->set_buffered(0) if $widget->get_object &&
!$self->get_context
->get_proxy($widget->get_object)