This patch adds support for the "print" operation when KDE is detected
as current desktop.

The patch also fixes an error dialog when "mail" is called without
parameters.

Mario

2007-03-19  Mario Torre  <[EMAIL PROTECTED]>

        * gnu/java/awt/peer/KDEDesktopPeer.java: 
        (mail): Fixed error dialog in KDE when the mail method is called
without
        argument; now opens the default mailer with a blank window.
        (getCommand): Handle the use of kprinter as default print command for
        KDE.
        (supportCommand): Enable the print command when a KDE desktop is
        detected.

-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Jabber: [EMAIL PROTECTED] - Profile: 
http://www.gtalkprofile.com/profile/9661.html
pgp key: http://subkeys.pgp.net/
PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
### Eclipse Workspace Patch 1.0
#P classpath
Index: gnu/java/awt/peer/KDEDesktopPeer.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/KDEDesktopPeer.java,v
retrieving revision 1.1
diff -u -r1.1 KDEDesktopPeer.java
--- gnu/java/awt/peer/KDEDesktopPeer.java	2 Mar 2007 21:01:39 -0000	1.1
+++ gnu/java/awt/peer/KDEDesktopPeer.java	19 Mar 2007 13:06:24 -0000
@@ -37,6 +37,7 @@
 
 package gnu.java.awt.peer;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
@@ -69,7 +70,7 @@
               }
             else if (action == _PRINT)
               {
-                command = null;
+                command = "kprinter";
               }
             else
               {
@@ -87,11 +88,6 @@
      
   protected boolean supportCommand(String check)
   {
-    if (check == _PRINT)
-      { 
-        return super.supportCommand(check);
-      }
-    
     return true;
   }
   
@@ -104,7 +100,7 @@
     if (mail == null)
       throw new UnsupportedOperationException();
     
-    Runtime.getRuntime().exec(mail + " mailto:");
+    Runtime.getRuntime().exec(mail + " 'mailto: '");
   }
   
   protected String execQuery(String command) throws IOException

Reply via email to