[Tkabber-dev] r98 - trunk/plugins/green

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Feb 12 17:13:09 MSK 2008


Author: kostix
Date: 2008-02-12 17:13:08 +0300 (Tue, 12 Feb 2008)
New Revision: 98

Added:
   trunk/plugins/green/swsusp-tkabber.tcl
Removed:
   trunk/plugins/green/tkabber-swsusp.tcl
Modified:
   trunk/plugins/green/README
   trunk/plugins/green/license.terms
Log:
tkabber-swsusp.tcl renamed to swsusp-tkabber.tcl to prevent this script
 from trying to send the notification to itself (since its tk appname
 matched the "tkabber*" pattern).

README: Changed references to the actuator script name accordingly to
 the script's new name.

license.terms: Copyright year changed to 2008.


Modified: trunk/plugins/green/README
===================================================================
--- trunk/plugins/green/README	2008-02-12 02:05:04 UTC (rev 97)
+++ trunk/plugins/green/README	2008-02-12 14:13:08 UTC (rev 98)
@@ -69,7 +69,7 @@
 running on the same X display to communicate by sending Tcl
 scripts to each other.
 
-This script is called "tkabber-swsusp.tcl" and is placed in
+This script is called "swsusp-tkabber.tcl" and is placed in
 the plugin directory. It's not required by the plugin itself and
 can be freely relocated, if needed.
 
@@ -85,7 +85,7 @@
 * This script is written in Tcl and requires presence of
   both Tcl and Tk in the system (Tk-based tclkit will also
   work, just run it directly with this script, like
-  "tclkit /path/to/tkabber-swsusp.tcl").
+  "tclkit /path/to/swsusp-tkabber.tcl").
 
 * For Tk to initialize and be able to find Tcl interpreters
   controlling the running instances of Tkabber, this script has
@@ -99,10 +99,10 @@
 
   DISPLAY=:0
   export DISPLAY
-  /path/to/tkabber-swsusp.tcl
+  /path/to/swsusp-tkabber.tcl
 
   or even (in bash):
-  DISPLAY=:0 /path/to/tkabber-swsusp.tcl
+  DISPLAY=:0 /path/to/swsusp-tkabber.tcl
 
 * Since a Tk application can connect to just one display at a
   time, if you have several displays with running instances of

Modified: trunk/plugins/green/license.terms
===================================================================
--- trunk/plugins/green/license.terms	2008-02-12 02:05:04 UTC (rev 97)
+++ trunk/plugins/green/license.terms	2008-02-12 14:13:08 UTC (rev 98)
@@ -1,4 +1,4 @@
-Copyright (c) 2007 Konstantin Khomoutov <flatworm at users.sourceforge.net>
+Copyright (c) 2008 Konstantin Khomoutov <flatworm at users.sourceforge.net>
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the "Software"),

Copied: trunk/plugins/green/swsusp-tkabber.tcl (from rev 97, trunk/plugins/green/tkabber-swsusp.tcl)
===================================================================
--- trunk/plugins/green/swsusp-tkabber.tcl	                        (rev 0)
+++ trunk/plugins/green/swsusp-tkabber.tcl	2008-02-12 14:13:08 UTC (rev 98)
@@ -0,0 +1,41 @@
+#! /usr/bin/env wish
+# $Id$
+# This is an "actuator" script for the Tkabber "green" plugin
+# intended to work on X Window-based systems (namely, Linux).
+# It finds all the running instance of Tkabber on the current
+# display and directs the "green" plugin loaded in each of them
+# (if any) to perform the actions corresponding to a power
+# management event which is passed as the sole command-line
+# argument to this script ("suspend" or "resume").
+# Written by Konstantin Khomoutov <flatworm at users.sourceforge.net>
+# See README for usage guidelines.
+# See license.terms for details on distribution.
+
+wm withdraw .
+
+if {$argc != 1} {
+	puts stderr [::msgcat::mc "Usage: %s {suspend|resume}" [file tail $argv0]]
+	exit 1
+}
+
+set event [lindex $argv 0]
+switch -- $event {
+	suspend - resume {}
+	default {
+		puts stderr [::msgcat::mc "Wrong parameter value \"%s\":\
+			must be suspend or resume" $event]
+		exit 2
+	}
+}
+
+proc bgerror message {
+	puts stderr $message
+	exit 3
+}
+
+foreach app [lsearch -all -inline [winfo interps] tkabber*] {
+	eval [list send -async $app ::plugins::green::on_$event]
+}
+
+exit
+

Deleted: trunk/plugins/green/tkabber-swsusp.tcl
===================================================================
--- trunk/plugins/green/tkabber-swsusp.tcl	2008-02-12 02:05:04 UTC (rev 97)
+++ trunk/plugins/green/tkabber-swsusp.tcl	2008-02-12 14:13:08 UTC (rev 98)
@@ -1,41 +0,0 @@
-#! /usr/bin/env wish
-# $Id$
-# This is an "actuator" script for the Tkabber "green" plugin
-# intended to work on X Window-based systems (namely, Linux).
-# It finds all the running instance of Tkabber on the current
-# display and directs the "green" plugin loaded in each of them
-# (if any) to perform the actions corresponding to a power
-# management event which is passed as the sole command-line
-# argument to this script ("suspend" or "resume").
-# Written by Konstantin Khomoutov <flatworm at users.sourceforge.net>
-# See README for usage guidelines.
-# See license.terms for details on distribution.
-
-wm withdraw .
-
-if {$argc != 1} {
-	puts stderr [::msgcat::mc "Usage: %s {suspend|resume}" [file tail $argv0]]
-	exit 1
-}
-
-set event [lindex $argv 0]
-switch -- $event {
-	suspend - resume {}
-	default {
-		puts stderr [::msgcat::mc "Wrong parameter value \"%s\":\
-			must be suspend or resume" $event]
-		exit 2
-	}
-}
-
-proc bgerror message {
-	puts stderr $message
-	exit 3
-}
-
-foreach app [lsearch -all -inline [winfo interps] tkabber*] {
-	eval [list send -async $app ::plugins::green::on_$event]
-}
-
-exit
-



More information about the Tkabber-dev mailing list