From a45c4e4ca33cc642f3dfac9d9b6652a0cb40485f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 8 Nov 2013 03:29:08 +0100 Subject: those setters no more accept undef --- perl-install/interactive/gtk.pm | 2 +- perl-install/mygtk3.pm | 4 ++-- perl-install/standalone/drakfloppy | 2 +- perl-install/standalone/drakfont | 8 ++++---- perl-install/standalone/harddrake2 | 2 +- perl-install/ugtk3.pm | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 357843f21..ac5653bd6 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -81,7 +81,7 @@ sub create_treeview_list { my $list_tv = Gtk3::TreeView->new_with_model($list); $list_tv->set_headers_visible(0); $list_tv->get_selection->set_mode('browse'); - my $textcolumn = Gtk3::TreeViewColumn->new_with_attributes(undef, my $renderer = Gtk3::CellRendererText->new, 'text' => 0); + my $textcolumn = Gtk3::TreeViewColumn->new_with_attributes("", my $renderer = Gtk3::CellRendererText->new, 'text' => 0); $list_tv->append_column($textcolumn); $renderer->set_property('ellipsize', 'end'); diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm index 56ee74117..084d0cedf 100644 --- a/perl-install/mygtk3.pm +++ b/perl-install/mygtk3.pm @@ -889,7 +889,7 @@ sub _gtk_any_Window { $w->set_type_hint('dialog'); # for matchbox window manager } - $w->set_modal(delete $opts->{modal}) if exists $opts->{modal}; + $w->set_modal(to_bool(delete $opts->{modal})) if exists $opts->{modal}; $opts->{transient_for} ||= $::main_window if $::main_window; $w->set_modal(1) if exists $opts->{transient_for}; $w->set_transient_for(delete $opts->{transient_for}) if exists $opts->{transient_for}; @@ -1038,7 +1038,7 @@ sub _gtk__AboutDialog { $w->set_documenters(delete $opts->{documenters}) if exists $opts->{documenters}; $w->set_translator_credits(delete $opts->{translator_credits}) if exists $opts->{translator_credits}; $w->set_artists(delete $opts->{artists}) if exists $opts->{artists}; - $w->set_modal(delete $opts->{modal}) if exists $opts->{modal}; + $w->set_modal(to_bool(delete $opts->{modal})) if exists $opts->{modal}; $w->set_transient_for(delete $opts->{transient_for}) if exists $opts->{transient_for}; $w->set_position(delete $opts->{position_policy}) if exists $opts->{position_policy}; } diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy index 74a9105ea..ec0542f14 100755 --- a/perl-install/standalone/drakfloppy +++ b/perl-install/standalone/drakfloppy @@ -122,7 +122,7 @@ sub pref_dialog() { $tree_model = Gtk3::TreeStore->new(("Glib::String") x 2, "Glib::Int"); $tree = Gtk3::TreeView->new_with_model($tree_model); $tree->set_headers_visible(0); - $tree->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0)); + $tree->append_column(Gtk3::TreeViewColumn->new_with_attributes("", Gtk3::CellRendererText->new, 'text' => 0)); $tree->signal_connect('row-expanded', \&expand_tree); $tree->get_selection->signal_connect('changed' => \&selected_tree); diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 14584c1a4..d5d6b3cf8 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -630,7 +630,7 @@ sub advanced_install() { my $button; $model = Gtk3::TreeStore->new("Glib::String"); $list = Gtk3::TreeView->new_with_model($model); - $list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0)); + $list->append_column(Gtk3::TreeViewColumn->new_with_attributes('', Gtk3::CellRendererText->new, 'text' => 0)); $list->set_headers_visible(0); $list->get_selection->set_mode('browse'); $list->set_rules_hint(1); @@ -672,7 +672,7 @@ sub list_to_remove() { sub show_list_to_remove() { my $model = Gtk3::TreeStore->new("Glib::String"); my $list = Gtk3::TreeView->new_with_model($model); - $list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0)); + $list->append_column(Gtk3::TreeViewColumn->new_with_attributes('', Gtk3::CellRendererText->new, 'text' => 0)); $list->set_headers_visible(0); $list->get_selection->set_mode('browse'); $list->set_rules_hint(1); @@ -703,7 +703,7 @@ sub uninstall() { #- TODO : add item to right list with gtksignal_connect #- left part $left_model = Gtk3::TreeStore->new("Glib::String"); $left_list = Gtk3::TreeView->new_with_model($left_model); - $left_list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0)); + $left_list->append_column(Gtk3::TreeViewColumn->new_with_attributes('', Gtk3::CellRendererText->new, 'text' => 0)); $left_list->set_headers_visible(0); $left_list->set_rules_hint(1); $left_list->get_selection->set_mode('multiple'); @@ -713,7 +713,7 @@ sub uninstall() { #- TODO : add item to right list with gtksignal_connect #- right part $right_model = Gtk3::TreeStore->new("Glib::String"); $right_list = Gtk3::TreeView->new_with_model($right_model); - $right_list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0)); + $right_list->append_column(Gtk3::TreeViewColumn->new_with_attributes('', Gtk3::CellRendererText->new, 'text' => 0)); $right_list->set_headers_visible(0); $right_list->get_selection->set_mode('multiple'); $right_list->set_rules_hint(1); diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2 index ac10bc3a1..feb07929d 100755 --- a/perl-install/standalone/harddrake2 +++ b/perl-install/standalone/harddrake2 @@ -255,7 +255,7 @@ $text->set_wrap_mode('word'); $frame->set_size_request(300, 450) unless $::isEmbedded; # $tree->set_column_auto_resize(0, 1); my (@data, @configurators); -$tree->append_column(my $textcolumn = Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::MDV::CellRendererPixWithLabel->new, 'pixbuf' => 0, label => 1)); +$tree->append_column(my $textcolumn = Gtk3::TreeViewColumn->new_with_attributes('', Gtk3::MDV::CellRendererPixWithLabel->new, 'pixbuf' => 0, label => 1)); $tree->set_headers_visible(0); sub fill_default_text { diff --git a/perl-install/ugtk3.pm b/perl-install/ugtk3.pm index 6f931a801..675c774db 100644 --- a/perl-install/ugtk3.pm +++ b/perl-install/ugtk3.pm @@ -559,7 +559,7 @@ sub create_okcancel { gtknew('HButtonBox', spacing => 5, layout => $_->[1], children_loose => [ map { - $_->set_can_default($::isWizard); + $_->set_can_default(to_bool($::isWizard)); $_; } grep { $_ } @{$_->[0]} ]); @@ -907,9 +907,9 @@ sub ask_browse_tree_info { my $tree_model = Gtk3::TreeStore->new("Glib::String", "Gtk3::Gdk::Pixbuf", "Glib::String"); my $tree = Gtk3::TreeView->new_with_model($tree_model); $tree->get_selection->set_mode('browse'); - $tree->append_column(my $textcolumn = Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0)); - $tree->append_column(my $pixcolumn = Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererPixbuf->new, 'pixbuf' => 1)); - $tree->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 2)); + $tree->append_column(my $textcolumn = Gtk3::TreeViewColumn->new_with_attributes("", Gtk3::CellRendererText->new, 'text' => 0)); + $tree->append_column(my $pixcolumn = Gtk3::TreeViewColumn->new_with_attributes("", Gtk3::CellRendererPixbuf->new, 'pixbuf' => 1)); + $tree->append_column(Gtk3::TreeViewColumn->new_with_attributes("", Gtk3::CellRendererText->new, 'text' => 2)); $tree->set_headers_visible(0); $tree->set_rules_hint(1); $textcolumn->set_min_width(200); -- cgit v1.2.1