Index: /pykoticon/trunk/tests/test.py
===================================================================
--- /pykoticon/trunk/tests/test.py (revision 98)
+++ /pykoticon/trunk/tests/test.py (revision 100)
@@ -30,19 +30,30 @@
 def main(arguments) :
     """Main function."""
-    printername = os.environ.get("PYKOTAPRINTERNAME")
-    username = os.environ.get("PYKOTAUSERNAME")
-    jobid = os.environ.get("PYKOTAJOBID")
-    jobtitle = os.environ.get("PYKOTATITLE")
-    jobsize = os.environ.get("PYKOTAPRECOMPUTEDJOBSIZE")
-    try :
-        server = xmlrpclib.ServerProxy("http://%s:%s" % (arguments[0], arguments[1]))
-        result = server.openConfirmDialog(printername, username, jobid, jobtitle, jobsize)
-    except :    
-        sys.stderr.write("An error occured !\n")
-    if result != "OK" :
+    printername = os.environ.get("PYKOTAPRINTERNAME", "Unknown")
+    username = os.environ.get("PYKOTAUSERNAME", "Unknown")
+    jobid = os.environ.get("PYKOTAJOBID", "Unknown")
+    jobtitle = os.environ.get("PYKOTATITLE", "Unknown")
+    jobsize = os.environ.get("PYKOTAPRECOMPUTEDJOBSIZE", "Unknown")
+    
+    if len(arguments) < 3 :
+        message = """Hello %(username)s,
+        
+You sent job %(jobid)s (%(jobtitle)s) to printer %(printername)s.
+
+This job seems to be %(jobsize)s pages long. 
+
+Do you really want to print it ?""" % locals()
+        yesno = True
+    else :
+        message = "\n".join(arguments[2:])
+        yesno = False
+
+    server = xmlrpclib.ServerProxy("http://%s:%s" % (arguments[0], arguments[1]))
+    result = server.showDialog(message, yesno)
+    if yesno and (result != "OK") :
         print result
         
 if __name__ == "__main__" :
-    if len(sys.argv) != 3 :
+    if len(sys.argv) < 3 :
         sys.stderr.write("usage : %s printing_client_hostname_or_ip_address printing_client_TCPPort\n" % sys.argv[0])
     else :    
Index: /pykoticon/trunk/bin/pykoticon
===================================================================
--- /pykoticon/trunk/bin/pykoticon (revision 97)
+++ /pykoticon/trunk/bin/pykoticon (revision 100)
@@ -90,16 +90,12 @@
         return True
         
-    def export_openConfirmDialog(self, printername, username, jobid, jobtitle, jobsize) :    
-        """Opens a dialog to ask the user to confirm or cancel the print job.
-        
-           Returns True to confirm, False to cancel.
-        """   
-        wx.CallAfter(self.frame.askConfirmation, printername, username, jobid, jobtitle, jobsize)
-        
+    def export_showDialog(self, message, yesno) :
+        """Opens a notification or confirmation dialog."""
+        wx.CallAfter(self.frame.showDialog, message, yesno)
         # ugly, isn't it ?
-        while self.frame.askConfirmationResult is None :
+        while self.frame.dialogAnswer is None :
             time.sleep(0.1)
-        retcode = self.frame.askConfirmationResult    
-        self.frame.askConfirmationResult = None # prepare for next call, just in case
+        retcode = self.frame.dialogAnswer    
+        self.frame.dialogAnswer = None # prepare for next call, just in case
         return retcode
         
@@ -126,5 +122,5 @@
     def mainloop(self) :
         """XML-RPC Server's main loop."""
-        self.register_function(self.export_openConfirmDialog)
+        self.register_function(self.export_showDialog)
         self.register_function(self.export_quitApplication)
         self.register_function(self.export_nop)
@@ -137,5 +133,5 @@
     """Main class."""
     def __init__(self, parent, id):
-        self.askConfirmationResult = None
+        self.dialogAnswer = None
         wx.Frame.__init__(self, parent, wx.ID_ANY, \
                _("PyKota info for  %s") % getCurrentUserName(), \
@@ -224,18 +220,18 @@
         self.Close()
         
-    def askConfirmation(self, printername, username, jobid, jobtitle, jobsize) :
-        """Asks for confirmation before printing."""
-        message = _("""Hello %(username)s,
-        
-You sent job %(jobid)s (%(jobtitle)s) to printer %(printername)s.
-
-This job seems to be %(jobsize)s pages long. 
-
-Do you really want to print it ?""") % locals()
-                     
-        dialog = wx.MessageDialog(self, message, _("Confirmation"), \
-                 wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION | wx.STAY_ON_TOP)
-        self.askConfirmationResult = ((dialog.ShowModal() == wx.ID_NO) and "CANCEL") or "OK"
+    def showDialog(self, message, yesno) :
+        """Opens a notification dialog."""
+        self.dialogAnswer = None
+        if yesno :
+            caption = _("Confirmation")
+            style = wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION
+        else :
+            caption = _("Information")
+            style = wx.OK | wx.ICON_INFORMATION
+        style |= wx.STAY_ON_TOP    
+        dialog = wx.MessageDialog(self, message, caption, style)
+        self.dialogAnswer = ((dialog.ShowModal() == wx.ID_NO) and "CANCEL") or "OK"
         dialog.Destroy()
+        
 
 class PyKotIconApp(wx.PySimpleApp):
