diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-12-16 10:47:06 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-12-16 10:47:06 +0000 |
commit | 1fd5a7598e6dcf204b597af3cf5ec6fcc661315d (patch) | |
tree | f24055751da1073d0f1140d64d273caf0196b21a /perl-install | |
parent | 276fbc764b2a574a7a85f8deffb49e1763da4b8f (diff) | |
download | drakx-1fd5a7598e6dcf204b597af3cf5ec6fcc661315d.tar drakx-1fd5a7598e6dcf204b597af3cf5ec6fcc661315d.tar.gz drakx-1fd5a7598e6dcf204b597af3cf5ec6fcc661315d.tar.bz2 drakx-1fd5a7598e6dcf204b597af3cf5ec6fcc661315d.tar.xz drakx-1fd5a7598e6dcf204b597af3cf5ec6fcc661315d.zip |
add option allow_unknown_options for easy compatibility
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/mygtk2.pm | 4 | ||||
-rw-r--r-- | perl-install/ugtk2.pm | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index ff7cb9d85..84307c900 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -111,7 +111,7 @@ sub _gtk { } delete $opts{$_} foreach @known_opts; - if (%opts) { + if (%opts && !$opts{allow_unknown_options}) { internal_error("$action $class: unknown option(s) " . join(', ', keys %opts)); } $w; @@ -404,6 +404,8 @@ sub _gtk__Dialog { $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}; } + $w->set_title(delete $opts->{title}) if exists $opts->{title}; + $w; } diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index d5e8ce449..ff23796a1 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -376,7 +376,7 @@ sub _create_dialog { my $dialog = gtknew('Dialog', title => $title, position_policy => 'center-on-parent', # center-on-parent does not work modal => 1, - %$options, + %$options, allow_unknown_options => 1, ); may_set_icon($dialog, $wm_icon || $::Wizard_pix_up || "wiz_default_up.png"); $dialog; |