[perl-Gtk3] Document some more differences between Gtk3 and Gtk2
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk3] Document some more differences between Gtk3 and Gtk2
- Date: Fri, 25 Jan 2013 19:29:22 +0000 (UTC)
commit 610330f857076f5e3536f801a256304a3aae7dfb
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Fri Jan 25 19:50:04 2013 +0100
Document some more differences between Gtk3 and Gtk2
lib/Gtk3.pm | 29 +++++++++++++++++++++++------
t/zz-GtkTreeModelIface.t | 5 -----
2 files changed, 23 insertions(+), 11 deletions(-)
---
diff --git a/lib/Gtk3.pm b/lib/Gtk3.pm
index 74c2b34..5697cbb 100644
--- a/lib/Gtk3.pm
+++ b/lib/Gtk3.pm
@@ -1362,18 +1362,35 @@ Gtk2::Gdk::Keysyms{XYZ} >>, use C<< Gtk3::Gdk::KEY_XYZ >>.
the namespace "Pango" everywhere. It gets set up automatically when loading
L<Gtk3>.
-=item * The types Gtk2::Allocation and Gtk2::Gdk::Rectangle are now aliases for
+=item * The types Gtk3::Allocation and Gtk3::Gdk::Rectangle are now aliases for
Cairo::RectangleInt, and as such they are represented as plain hashes with
keys 'width', 'height', 'x' and 'y'.
-=item * The Gtk3::Menu menu position callback passed to popup() does not
-receive x and y parameters anymore.
-
-=item * Callbacks connected to Gtk3::Editable's "insert-text" signal do not
+=item * Gtk3::Editable: Callbacks connected the "insert-text" signal do not
have as many options anymore as they had in Gtk2. Changes to arguments will
not be propagated to the next signal handler, and only the updated position can
and must be returned.
+=item * Gtk3::Menu: The position callback passed to popup() does not receive x
+and y parameters anymore.
+
+=item * Gtk3::TreeModel: iter_next() and iter_previous() are now methods that
+modify the iter directly, instead of returning a new one. rows_reordered() and
+the "rows-reordered" signal are currently unusable.
+
+=item * Gtk3::TreeSortable: get_sort_column_id() has an additional boolean
+return value.
+
+=item * Implementations of Gtk3::TreeModel: Gtk3::TreeIter now has a
+constructor called new() expecting C<< key => value >> pairs;
+new_from_arrayref() does not exist anymore. To access the contents of
+Gtk3::TreeIter, use stamp(), user_data(), user_data2() and user_data3();
+to_arrayref() does not exist anymore. GET_ITER(), ITER_CHILDREN(),
+ITER_NTH_CHILD() and ITER_PARENT() must return an additional boolean value.
+ITER_NEXT() must modify the iter and return a boolean rather than return a new
+iter. GET_VALUE() must return the value wrapped with C<<
+Glib::Object::Introspection::GValueWrapper->new >>.
+
=back
Note also that Gtk3::CHECK_VERSION will always fail when passed 2.y.z, so if
@@ -1402,7 +1419,7 @@ remove them.
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2011-2012 by Torsten Schoenfeld <kaffeetisch gmx de>
+Copyright (C) 2011-2013 by Torsten Schoenfeld <kaffeetisch gmx de>
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
diff --git a/t/zz-GtkTreeModelIface.t b/t/zz-GtkTreeModelIface.t
index b87be86..062a3a4 100644
--- a/t/zz-GtkTreeModelIface.t
+++ b/t/zz-GtkTreeModelIface.t
@@ -104,7 +104,6 @@ plan tests => 171;
ok (defined ($record), "GET_ITER: record defined");
ok ($record->{pos} == $n, "GET_ITER: record has the correct index");
- # FIXME3: return [ $list->{stamp}, $n, $record, undef ];
return (TRUE, Gtk3::TreeIter->new (stamp => $list->{stamp}, user_data => $record));
}
@@ -136,7 +135,6 @@ plan tests => 171;
ok ($record->{pos} < @{$list->{data}}, "GET_VALUE: record within bounds");
- # FIXME3: return $record->{value};
return Glib::Object::Introspection::GValueWrapper->new (
Glib::String::, $record->{value});
}
@@ -158,7 +156,6 @@ plan tests => 171;
ok ($nextrecord->{pos} == ($record->{pos} + 1), "ITER_NEXT: next record's pos OK");
- # FIXME3: return [ $list->{stamp}, $nextrecord->{pos}, $nextrecord, undef ];
$iter->user_data ($nextrecord);
return TRUE;
}
@@ -177,7 +174,6 @@ plan tests => 171;
return (FALSE, undef) unless @{ $list->{data} };
# Set iter to first item in list
- # FIXME3: return [ $list->{stamp}, 0, $list->{data}[0] ];
return (TRUE, Gtk3::TreeIter->new (stamp => $list->{stamp}, user_data => $list->{data}[0]));
}
@@ -218,7 +214,6 @@ plan tests => 171;
ok (defined ($record), "ITER_NTH_CHILD: record defined");
ok ($record->{pos} == $n, "ITER_NTH_CHILD: record's pos correct");
- # FIXME3: return [ $list->{stamp}, $n, $record, undef ];
return (TRUE, Gtk3::TreeIter->new (stamp => $list->{stamp}, user_data => $record));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]