diff options
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 931f377a7..a8e50d319 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -212,7 +212,7 @@ sub gtkpowerpack { #- attr value directly in the arg list (avoiding confusion between value 0 and Gtk::Label("0"). That can simplify some writings but #- this arg(s) MUST then be present... my (%attr, $attrs); - ref($_[0]) eq 'HASH' || ref($_[0]) eq 'ARRAY' and $attrs = shift; + member(ref($_[0]), qw(HASH ARRAY)) and $attrs = shift; foreach (@attributes_list) { if (($default_attrs->{$_} || '') eq 'arg') { ref($_[0]) and internal_error "error in packing definition\n"; @@ -527,7 +527,7 @@ sub create_okcancel { if (!defined $wm_is_kde) { require any; my $wm = any::running_window_manager(); - $wm_is_kde = !$::isInstall && ($wm eq "kwin" || $wm eq "compiz" && fuzzy_pidofs(qr/\bkde-window-decorator\b/)) || 0; + $wm_is_kde = !$::isInstall && (member($wm, qw(kwin compiz)) && fuzzy_pidofs(qr/\bkde-window-decorator\b/)) || 0; } my $f = sub { $w->{buttons}{$_[0][0]} = ref($_[0][0]) =~ /Gtk2::Button/ ? $_[0][0] : @@ -1145,7 +1145,7 @@ sub ask_browse_tree_info_given_widgets { $w->{tree}->signal_connect(key_press_event => sub { my $c = chr($_[1]->keyval & 0xff); - if ($_[1]->keyval >= 0x100 ? $c eq "\r" || $c eq "\x8d" : $c eq ' ') { + if ($_[1]->keyval >= 0x100 ? member($c, "\r", "\x8d") : $c eq ' ') { $toggle->(0); } 0; |