Second attempt

-- 
Alexander Nest
Index: gui.tcl
===================================================================
--- gui.tcl	(revisión: 11882)
+++ gui.tcl	(copia de trabajo)
@@ -6840,27 +6840,47 @@
 
 #///////////////////////////////////////////////////////////////////////
 proc paste { window {middle 0} } {
-	if { [catch {selection get} res] != 0 } {
-		catch {
-			if { [OnLinux] } {
-				set contents [ selection get -type UTF8_STRING -selection CLIPBOARD ]
-			} else {
-				set contents [ selection get -selection CLIPBOARD ]
-			}
-			[::ChatWindow::GetInputText $window] insert insert $contents
-		}
-	} else {
-		if { $middle == 0} {
-			catch {
-				if { [OnLinux] } {
-                                	set contents [ selection get -type UTF8_STRING -selection CLIPBOARD ]
-	                        } else {
-        	                        set contents [ selection get -selection CLIPBOARD ]
-                	        }
-				[::ChatWindow::GetInputText $window] insert insert $contents
-			}
-		}
-	}
+    if { [catch {selection get} res] != 0 } {
+        catch {
+            if { [OnLinux] } {
+                set contents [ selection get -type UTF8_STRING -selection CLIPBOARD ]
+                set evPar(contents) contents
+                set evPar(window) window
+                set evPar(middle) middle
+                ::plugins::PostEvent pre_paste evPar
+            } else {
+                set contents [ selection get -selection CLIPBOARD ]
+                set evPar(contents) contents
+                set evPar(window) window
+                set evPar(middle) middle
+                ::plugins::PostEvent pre_paste evPar
+            }
+            if { $contents != "" } {
+                [::ChatWindow::GetInputText $window] insert insert $contents
+            }
+        }
+    } else {
+        if { $middle == 0} {
+            catch {
+                if { [OnLinux] } {
+                    set contents [ selection get -type UTF8_STRING -selection CLIPBOARD ]
+                    set evPar(contents) contents
+                    set evPar(window) window
+                    set evPar(middle) middle
+                    ::plugins::PostEvent pre_paste evPar
+                } else {
+                    set contents [ selection get -selection CLIPBOARD ]
+                    set evPar(contents) contents
+                    set evPar(window) window
+                    set evPar(middle) middle
+                    ::plugins::PostEvent pre_paste evPar
+                }
+                if { $contents != "" } {
+                    [::ChatWindow::GetInputText $window] insert insert $contents
+                }
+            }
+        }
+    }
 }
 #///////////////////////////////////////////////////////////////////////
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to