[X2go-Commits] pyhoca-gui.git - master (branch) updated: 0.1.0.10-75-g84074f1

X2go dev team git-admin at x2go.org
Mon Feb 20 20:39:15 CET 2012


The branch, master has been updated
       via  84074f170c26a8d2431571dfbbc64a7aa3464236 (commit)
      from  00250a11898323c98b3dddf97e0e08008532d903 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 84074f170c26a8d2431571dfbbc64a7aa3464236
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Feb 20 20:39:09 2012 +0100

    Handle the situation that no printer is installed with CUPS/WinSpool gracefully.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog              |    3 ++-
 pyhoca/wxgui/printingprefs.py |   19 ++++++++++---------
 2 files changed, 12 insertions(+), 10 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 21904ec..6fe11a4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,7 +41,8 @@ pyhoca-gui (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
     - Provide empty translation file nb_NO.po.
     - Fix profile manager GUI layout, make default keyboard layout i18n
       capable.
-    - Handle the situation that no printers are installed with CUPS/WinSpool.
+    - Handle the situation that no printer is installed with CUPS/WinSpool
+      gracefully.
   * Depend on Python X2Go 0.1.2.0.
   * Install GNOME icons via dh_links.
   * Install X2Go icons with explicit install paths.
diff --git a/pyhoca/wxgui/printingprefs.py b/pyhoca/wxgui/printingprefs.py
index 6089087..2c94ae2 100644
--- a/pyhoca/wxgui/printingprefs.py
+++ b/pyhoca/wxgui/printingprefs.py
@@ -219,15 +219,16 @@ class PyHocaGUI_PrintingPreferences(wx.Dialog):
         self.PdfViewCmd.SetValue(self.client_printing.get_property('pdfview_cmd'))
         self.PdfSaveToFolder.SetValue(self.client_printing.get_property('save_to_folder'))
         if self._defaultPrinter != '#PRINTSYSTEM_UNAVAILABLE#':
-            try:
-                _printer_name = self._availablePrinters[self.client_printing.get_property('printer')]
-            except KeyError:
-                _printer_name = self._availablePrinters[self._defaultPrinter]
-        elif self._defaultPrinter == None:
-            _printer_name = _(u'- no printers installed -')
-            self.PrintPrinter.Clear()
-            self.PrintPrinter.Append(_(_printer_name))
-            self.PrintPrinter.Enable(False)
+            if self._defaultPrinter != None:
+                try:
+                    _printer_name = self._availablePrinters[self.client_printing.get_property('printer')]
+                except KeyError:
+                    _printer_name = self._availablePrinters[self._defaultPrinter]
+            else:
+                _printer_name = _(u'- no printers installed -')
+                self.PrintPrinter.Clear()
+                self.PrintPrinter.Append(_(_printer_name))
+                self.PrintPrinter.Enable(False)
         else:
             _printer_name = _(u'- print system is not available -')
             self.PrintPrinter.Clear()


hooks/post-receive
-- 
pyhoca-gui.git (Python X2Go Client (wxPython GUI))

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).




More information about the x2go-commits mailing list