mutualise code sensitive
authorcasta <casta@78f58264-58f8-0310-be4b-c7ad7e3b7018>
Wed, 31 Aug 2005 13:10:49 +0000 (13:10 +0000)
committercasta <casta@78f58264-58f8-0310-be4b-c7ad7e3b7018>
Wed, 31 Aug 2005 13:10:49 +0000 (13:10 +0000)
git-svn-id: svn+ssh://svn.xwing.info/home/svn/gtk-fuser/trunk@491 78f58264-58f8-0310-be4b-c7ad7e3b7018

gtk-fuser

index 305ad3ff70a1bdf953dd82db766016086f35d97b..2c1eb13f483d61ba195186cbf059e125f935cd50 100755 (executable)
--- a/gtk-fuser
+++ b/gtk-fuser
@@ -388,20 +388,24 @@ sub selectFolder
 
 sub activate
 {
-    $pathEntry->set_sensitive (1);
-    $bKill->set_sensitive (1);
-    $bSearch->set_sensitive (1);
+    sensitiveWidgets (1);
     yield ();
 }
 
 sub deactivate
 {
-    $pathEntry->set_sensitive (0);
-    $bKill->set_sensitive (0);
-    $bSearch->set_sensitive (0);
+    sensitiveWidgets (0);
     yield ();
 }
 
+sub sensitiveWidgets
+{
+    my $value = shift;
+    $pathEntry->set_sensitive ($value);
+    $bKill->set_sensitive ($value);
+    $bSearch->set_sensitive ($value);
+}
+
 sub yield
 {
     while (Gtk2->events_pending ())