From 099fe3554fd99b00f0a3b95b3ebad3d676939f56 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 15 May 2003 15:28:56 +0000 Subject: (create_dialog) : - update caller list - add title parameter and update callers --- perl-install/standalone/drakfloppy | 8 ++++---- perl-install/standalone/drakfont | 4 ++-- perl-install/ugtk2.pm | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy index 57b288abc..c3a7575ef 100755 --- a/perl-install/standalone/drakfloppy +++ b/perl-install/standalone/drakfloppy @@ -294,22 +294,22 @@ sub build_it() { } $co .= " " . $kernel_combo->entry->get_text(); $co .= " 2>&1 |"; - create_dialog(N("Be sure a media is present for the device %s", $device_combo->entry->get_text()), 1) or return; + create_dialog(N("Warning"), N("Be sure a media is present for the device %s", $device_combo->entry->get_text()), 1) or return; # we test if the media is present test: my $a = "dd count=1 if=/dev/null of=" . $device_combo->entry->get_text() . " 2>&1"; my $b = `$a`; if ($b =~ /dd/) { - create_dialog(N("There is no medium or it is write-protected for device %s.\nPlease insert one.", $device_combo->entry->get_text()), 1) ? goto test : return 0; + create_dialog(N("Error"), N("There is no medium or it is write-protected for device %s.\nPlease insert one.", $device_combo->entry->get_text()), 1) ? goto test : return 0; } local *STATUS; - open STATUS, $co or do { create_dialog(N("Unable to fork: %s", $!), 0); return }; + open STATUS, $co or do { create_dialog(N("Error"), N("Unable to fork: %s", $!), 0); return }; local $_; while () { gtktext_append($output, [ [ $_ ] ]); } - close STATUS or create_dialog(N("Unable to properly close mkbootdisk: \n %s \n %s", $!, $?), 0); + close STATUS or create_dialog(N("Error"), N("Unable to properly close mkbootdisk: \n %s \n %s", $!, $?), 0); return (0); } diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index d1bb2ddcc..4efd6d815 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -605,7 +605,7 @@ sub text_view { } sub help() { - ugtk2::create_dialog(N(" + ugtk2::create_dialog(N("Help"), N(" Copyright (C) 2001-2002 by MandrakeSoft DUPONT Sebastien (original version) CHAUMETTE Damien @@ -723,7 +723,7 @@ sub file_ok_sel { my ($_widget, $file_selection) = @_; my $file_name = $file_selection->get_filename(); if ($file_name =~ /$select_font_msg/) { - create_dialog(N("You've not selected any font")); + create_dialog(N("Error"), N("You've not selected any font")); } else { print "-- @install\n"; if (!member($file_name, @install)) { diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 9a62e6c4e..42eea50ea 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -352,13 +352,13 @@ sub create_box_with_title { } } -# drakfloppy / logdrake +# drakfloppy / drakfont sub create_dialog { - my ($label, $o_c) = @_; + my ($title, $label, $o_c) = @_; my $ret = 0; my $dialog = Gtk2::Dialog->new; $dialog->signal_connect(delete_event => sub { Gtk2->main_quit }); -# $dialog->set_title(N("logdrake")); + $dialog->set_title($title); $dialog->set_border_width(10); $dialog->set_position('center-on-parent'); # center-on-parent doesn't work $dialog->vbox->pack_start(Gtk2::Label->new($label), 1, 1, 0); -- cgit v1.2.1