Enlightenment CVS committal

Author  : leviathan
Project : e17
Module  : proto

Dir     : e17/proto/etk-perl/lib/Etk/Menu/Item


Modified Files:
        Image.pm 


Log Message:
- todo--
- some more simplifactions and cleanups
- start of test suite

===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/lib/Etk/Menu/Item/Image.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Image.pm    7 Jun 2006 11:58:34 -0000       1.1
+++ Image.pm    17 Jul 2006 23:26:17 -0000      1.2
@@ -7,24 +7,14 @@
 {
     my $class = shift;
     my $self = $class->SUPER::new();
-    if(@_ == 1)
-    {
-       $self->{WIDGET} = Etk::etk_menu_item_image_new_with_label(shift);
-    }
-    else
-    {
+    if(@_ == 1) {
+       my $arg = shift;
+       $self->{WIDGET} = $arg + 0 eq $arg ?
+               Etk::etk_menu_item_image_new_from_stock($arg):
+               Etk::etk_menu_item_image_new_with_label($arg);
+    } else {
        $self->{WIDGET} = Etk::etk_menu_item_image_new();
     }
-    bless($self, $class);
-    return $self;
-}
-
-sub new_from_stock
-{
-    my $class = shift;
-    my $self = $class->SUPER::new();
-    my $stock_id = shift;
-    $self->{WIDGET} = Etk::etk_menu_item_image_new_from_stock($stock_id);
     bless($self, $class);
     return $self;
 }



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to