[SCM] Packaging of Gtk3 in Debian branch, master, updated. upstream/0.006-16-gc48aac7
intrigeri
intrigeri at boum.org
Sat Jun 23 21:19:07 UTC 2012
The following commit has been merged in the master branch:
commit f640ea6b314a47798b60f479adab020ae2343ecc
Author: intrigeri <intrigeri at boum.org>
Date: Sat Jun 23 23:12:50 2012 +0200
Cherry-pick upstream commit ffd7da017: Add an override for Gtk3::show_about_dialog.
diff --git a/debian/patches/0001-Add-an-override-for-Gtk3-show_about_dialog.patch b/debian/patches/0001-Add-an-override-for-Gtk3-show_about_dialog.patch
new file mode 100644
index 0000000..c83b3c4
--- /dev/null
+++ b/debian/patches/0001-Add-an-override-for-Gtk3-show_about_dialog.patch
@@ -0,0 +1,117 @@
+From: =?UTF-8?q?Torsten=20Sch=C3=B6nfeld?= <kaffeetisch at gmx.de>
+Date: Sat, 23 Jun 2012 18:44:53 +0200
+Subject: Add an override for Gtk3::show_about_dialog
+
+Cherry-picked from upstream Git commit ffd7da01.
+---
+ lib/Gtk3.pm | 39 +++++++++++++++++++++++++++++++++++++++
+ t/overrides.t | 32 +++++++++++++++++++++++---------
+ 2 files changed, 62 insertions(+), 9 deletions(-)
+
+diff --git a/lib/Gtk3.pm b/lib/Gtk3.pm
+index a9d0c45..d0b66fd 100644
+--- a/lib/Gtk3.pm
++++ b/lib/Gtk3.pm
+@@ -142,6 +142,45 @@ sub Gtk3::main_quit {
+ Glib::Object::Introspection->invoke ($_GTK_BASENAME, undef, 'main_quit');
+ }
+
++{
++ my $global_about_dialog = undef;
++ my $about_dialog_key = '__gtk3_about_dialog';
++
++ sub Gtk3::show_about_dialog {
++ # For backwards-compatibility, optionally accept and discard a class
++ # argument.
++ my $parent_or_class = shift;
++ my $parent = defined $parent_or_class && $parent_or_class eq 'Gtk3'
++ ? shift
++ : $parent_or_class;
++ my %props = @_;
++ my $dialog = defined $parent
++ ? $parent->{$about_dialog_key}
++ : $global_about_dialog;
++
++ if (!$dialog) {
++ $dialog = Gtk3::AboutDialog->new;
++ $dialog->signal_connect (delete_event => \&Gtk3::Widget::hide_on_delete);
++ # FIXME: We can't actually do this fully correctly, because the license
++ # and credits subdialogs are private.
++ $dialog->signal_connect (response => \&Gtk3::Widget::hide);
++ foreach my $prop (keys %props) {
++ $dialog->set ($prop => $props{$prop});
++ }
++ if ($parent) {
++ $dialog->set_modal (Glib::TRUE);
++ $dialog->set_transient_for ($parent);
++ $dialog->set_destroy_with_parent (Glib::TRUE);
++ $parent->{$about_dialog_key} = $dialog;
++ } else {
++ $global_about_dialog = $dialog;
++ }
++ }
++
++ $dialog->present;
++ }
++}
++
+ sub Gtk3::Builder::add_objects_from_file {
+ my ($builder, $filename, @rest) = @_;
+ my $ref = _rest_to_ref (\@rest);
+diff --git a/t/overrides.t b/t/overrides.t
+index 448be74..2f9f572 100644
+--- a/t/overrides.t
++++ b/t/overrides.t
+@@ -5,7 +5,7 @@ BEGIN { require './t/inc/setup.pl' };
+ use strict;
+ use warnings;
+
+-plan tests => 79;
++plan tests => 80;
+
+ # Gtk3::CHECK_VERSION and check_version
+ {
+@@ -22,6 +22,28 @@ plan tests => 79;
+ ok (defined Gtk3->check_version ($x, $y, $z));
+ }
+
++# Gtk3::Window::new and list_toplevels. This is at the top to avoid testing
++# against a polluted list of toplevels.
++{
++ my $window1 = Gtk3::Window->new ('toplevel');
++ my $window2 = Gtk3::Window->new;
++ is_deeply ([Gtk3::Window::list_toplevels ()], [$window1, $window2]);
++ is (scalar Gtk3::Window::list_toplevels (), $window2);
++}
++
++# Gtk3::show_about_dialog
++{
++ my %props = (program_name => 'Foo',
++ version => '42',
++ authors => [qw/me myself i/],
++ license_type => 'lgpl-2-1');
++ Gtk3::show_about_dialog (undef, %props);
++ Gtk3->show_about_dialog (undef, %props);
++ Gtk3::show_about_dialog (Gtk3::Window->new, %props);
++ Gtk3->show_about_dialog (Gtk3::Window->new, %props);
++ ok (1);
++}
++
+ # Gtk3::CellLayout::get_cells
+ {
+ my $cell = Gtk3::TreeViewColumn->new;
+@@ -213,14 +235,6 @@ SKIP: {
+ isa_ok ($sel_iter, 'Gtk3::TreeIter');
+ }
+
+-# Gtk3::Window::new and list_toplevels
+-{
+- my $window1 = Gtk3::Window->new ('toplevel');
+- my $window2 = Gtk3::Window->new;
+- is_deeply ([Gtk3::Window::list_toplevels ()], [$window1, $window2]);
+- is (scalar Gtk3::Window::list_toplevels (), $window2);
+-}
+-
+ # Gtk3::Gdk::Window::new
+ SKIP: {
+ # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=670369
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d5a3414
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Add-an-override-for-Gtk3-show_about_dialog.patch
--
Packaging of Gtk3 in Debian
More information about the Pkg-perl-cvs-commits
mailing list