diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-01-27 19:33:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-01-27 19:33:00 +0000 |
commit | ae427550a1ab5528bd033d4b7cc2ed738a5c776a (patch) | |
tree | 69e9b6f2d702dce1b8e9d9f0b4bdafa54d8bc5ca /perl-install/diskdrake/removable_gtk.pm | |
parent | 258b4c29d59ce9d701a46c98f663c2ea961288ba (diff) | |
download | drakx-backup-do-not-use-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.tar drakx-backup-do-not-use-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.tar.gz drakx-backup-do-not-use-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.tar.bz2 drakx-backup-do-not-use-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.tar.xz drakx-backup-do-not-use-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.zip |
new diskdrake modules (diskdrake_interactive is now diskdrake::interactive, diskdrake is now diskdrake::hd_gtk, others created from diskdrake.pm)
Diffstat (limited to 'perl-install/diskdrake/removable_gtk.pm')
-rw-r--r-- | perl-install/diskdrake/removable_gtk.pm | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/perl-install/diskdrake/removable_gtk.pm b/perl-install/diskdrake/removable_gtk.pm new file mode 100644 index 000000000..ee61fa5b8 --- /dev/null +++ b/perl-install/diskdrake/removable_gtk.pm @@ -0,0 +1,31 @@ +package diskdrake::removable_gtk; # $Id$ + +use diagnostics; +use strict; + +use my_gtk qw(:helpers :wrappers :ask); + + +sub per_entry_action_box { + my ($box, $kind, $entry) = @_; + $_->widget->destroy foreach $box->children; + + if ($entry) { + my @l = ( + _("Mount point") => \&raw_hd_mount_point, + _("Options") => \&raw_hd_options, + _("Type") => \&removable_type, + ); + @buttons = map_each { + my ($txt, $f) = @_; + gtksignal_connect(new Gtk::Button($txt), clicked => sub { try_('', $f, $entry) }); + } group_by2 @l; + + gtkadd($box, gtkadd(new Gtk::Frame(_("Choose action")), + createScrolledWindow(gtkpack__(new Gtk::VBox(0,0), @buttons)))) if @buttons; + + } else { + my $txt = _("Please click on a media"); + gtkpack($box, gtktext_insert(new Gtk::Text, $txt)); + } +} |