diff options
-rwxr-xr-x | control-center3 | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/control-center3 b/control-center3 index 891d0a13..0d6744ab 100755 --- a/control-center3 +++ b/control-center3 @@ -184,13 +184,15 @@ map { ['Menudrake' , 'item.xpm',1] , ['Drakfont', 'item.xpm', 0]); -@tree_exec = ("drakboot", "drakfloppy", "DrakeLogo" , "XFDrake" , "harddrake-auth" , "mousedrake" , "printerdrake" , "keyboarddrake" , "userdrake", "draknet" , - "drakgw", "menudrake" , "drakfont"); - -$treeitem_sub[1]->select_item(2); -exec_treeitem(@tree_exec[4],1),; - - +%tree_exec = ("Drakboot" => "drakeboot", "Drakfloppy" => "drakfloppy", + "Drakelogo" => "DrakeLogo" , "xfdrake" => "XFDrake" , + "Hardrake" => "harddrake-auth" , "Mousedrake" => "mousedrake" , + "Printdrake" => "printerdrake" , "Kbddrake" => "keyboarddrake" , + "Userdrake" => "userdrake" , "Draknet" => "draknet" , + "Drakgw" => "drakgw" , "Menudrake" => "menudrake" , "Drakfont" => "drakfont" + ); + +#exec_treeitem("harddrake-auth",4); my $rc = "control-center.rc"; Gtk::Rc->parse($rc); $window_global->show_all; @@ -240,6 +242,9 @@ sub create_tree_item() $treebox = xpm_label_box($window_global,$pixmap,$label); $treeitem->add($treebox); $treebox->show(); + if ($tree_depth_max == 0) { + $treeitem->signal_connect('select', sub { exec_treeitem($tree_exec{$label},1);}); + } $parent_tree->append($treeitem); $treeitem->show(); @@ -290,6 +295,7 @@ sub xpm_label_box sub exec_treeitem { my ($exec_string,$num) = @_; + if ($exec_string) { my $socket = new Gtk::Socket; $socket->show; |