Enlightenment CVS committal

Author  : leviathan
Project : e17
Module  : proto

Dir     : e17/proto/etk-perl/etk_test


Modified Files:
        etk_test.pl 


Log Message:
- More stuff for RadioButton

===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/etk_test/etk_test.pl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- etk_test.pl 18 Jun 2006 15:33:44 -0000      1.18
+++ etk_test.pl 28 Jun 2006 00:19:48 -0000      1.19
@@ -3,6 +3,7 @@
 use Etk;
 use Etk::Button;
 use Etk::CheckButton;
+use Etk::RadioButton;
 use Etk::Colorpicker;
 use Etk::Combobox;
 use Etk::Combobox::Item;
@@ -285,15 +286,12 @@
     $button = Etk::CheckButton->new();
     $vbox->PackStart($button);
     
-    #######
-    # TODO: implement radio buttons!
-    # $button = Etk::RadioButton->new("Normal Button");
-    # $vbox->PackStart($button);
-    #
-    # $button = Etk::RadioButton->new();
-    # $vbox->PackStart($button);
-    #######
-    
+    $button = Etk::RadioButton->new("Radio button");
+    $vbox->PackStart($button);
+
+    my $button2 = Etk::RadioButton->new($button);
+    $vbox->PackStart($button2);
+
     $button = Etk::ToggleButton->new("Toggle Button");
     $vbox->PackStart($button);
     
@@ -712,10 +710,9 @@
     _menu_test_check_item_new("Item with check 2", $submenu1, $statusbar);
     _menu_seperator_new($submenu1);
     
-    # TODO pending Radio implementation
-    # radio_item = _etk_test_menu_radio_item_new(_("Radio 1"), NULL, 
ETK_MENU_SHELL(menu));
-    # radio_item = _etk_test_menu_radio_item_new(_("Radio 2"), 
ETK_MENU_ITEM_RADIO(radio_item), ETK_MENU_SHELL(menu));
-    # _etk_test_menu_radio_item_new(_("Radio 3"), 
ETK_MENU_ITEM_RADIO(radio_item), ETK_MENU_SHELL(menu));
+    my $radio = _menu_test_radio_item_new("Radio 1", undef, $submenu1, 
$statusbar);
+    _menu_test_radio_item_new("Radio 2", $radio, $submenu1, $statusbar);
+    _menu_test_radio_item_new("Radio 3", $radio, $submenu1, $statusbar);
 
     # Sub menu 2
     my $submenu2 = Etk::Menu->new();
@@ -772,9 +769,17 @@
 
 sub _menu_test_radio_item_new
 {
-    my ($label, $menubar, $statusbar) = @_;
+    my ($label, $radio, $menubar, $statusbar) = @_;
 
-    my $menu_item = Etk::Menu::Item::Radio->new($label);
+    my $menu_item;
+    if ($radio) 
+    {
+        $menu_item = Etk::Menu::Item::Radio->new($label, $radio);
+    }
+    else
+    {
+        $menu_item = Etk::Menu::Item::Radio->new($label);
+    }
     $menubar->Append($menu_item);
     $menu_item->SignalConnect("selected", 
        sub { $statusbar->Push($menu_item->LabelGet(), 0) });
@@ -1129,14 +1134,11 @@
     $button = Etk::CheckButton->new();
     $vbox2->PackStart($button);
     
-    #######
-    # TODO: implement radio buttons!
-    # $button = Etk::RadioButton->new("Normal Button");
-    # $vbox->PackStart($button);
-    #
-    # $button = Etk::RadioButton->new();
-    # $vbox->PackStart($button);
-    #######
+    $button = Etk::RadioButton->new("Radio button");
+    $vbox2->PackStart($button);
+
+    my $button2 = Etk::RadioButton->new($button);
+    $vbox2->PackStart($button2);
     
     $notebook->PageAppend("Tab 2 - Button test", $alignment);
 



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to