diff options
-rwxr-xr-x | control-center | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/control-center b/control-center index 216f00f2..8a4c570e 100755 --- a/control-center +++ b/control-center @@ -743,9 +743,7 @@ sub quit_global { sub splash_warning { my ($label, $cancel_button) = @_; my $ret; - my $window = Gtk2::Dialog->new; - $window->set_position('center-on-parent'); - $window->set_border_width(10); + my $window = new_dialog(N("Warning"), 1); gtkpack__($window->action_area, gtkadd(Gtk2::HButtonBox->new, @@ -758,21 +756,20 @@ sub splash_warning { Gtk2::Label->new($label), ); $window->show_all; - $window->set_modal(1); Gtk2->main; $window->destroy; $ret; } sub new_dialog { - my ($title) = @_; + my ($title, $no_button) = @_; my $dialog = Gtk2::Dialog->new; $dialog->set_transient_for($window_global); $dialog->set_position('center-on-parent'); $dialog->set_border_width(10); $dialog->set_title($title); $dialog->action_area->pack_start(gtkadd(Gtk2::HButtonBox->new, - gtksignal_connect(Gtk2::Button->new(N("Close")), clicked => sub { $dialog->destroy })),0,0,0); + gtksignal_connect(Gtk2::Button->new(N("Close")), clicked => sub { $dialog->destroy })),0,0,0) unless $no_button; gtkset_modal($dialog, 1); } |