From 349205800d5ba7892b3f044fd5241f3f2470a4cb Mon Sep 17 00:00:00 2001 From: Leonardo Date: Sat, 12 Jun 2010 10:18:12 +0200 Subject: [PATCH] Corretto baco nel caso di errori di connesione quando si recupera la lista dei lavori di stampa. --- DrPrintBackend.py | 1 - DrPrintGui/Input.py | 1 - DrPrintGui/MainWin.py | 13 +++++++++---- drprint.desktop | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) mode change 100644 => 100755 drprint.desktop diff --git a/DrPrintBackend.py b/DrPrintBackend.py index b8127d8..679a082 100644 --- a/DrPrintBackend.py +++ b/DrPrintBackend.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- ## Some useful function to help DrPrint to -# -*- coding: utf-8 -*- import paramiko, gobject, select, time, re diff --git a/DrPrintGui/Input.py b/DrPrintGui/Input.py index 2ce8d6b..7064f55 100644 --- a/DrPrintGui/Input.py +++ b/DrPrintGui/Input.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- ## This library provides User Input fields -# -*- coding: utf-8 -*- import gtk, pygtk, gobject, os diff --git a/DrPrintGui/MainWin.py b/DrPrintGui/MainWin.py index 2c86991..15775e8 100644 --- a/DrPrintGui/MainWin.py +++ b/DrPrintGui/MainWin.py @@ -1,5 +1,5 @@ +# -*- coding: utf-8 -*- ## This library is part of DrPrintGui -# -*- coding: utf-8 -*- ## This file provide the MainWin object, ## that is the main window of the DrPrint ## application @@ -163,10 +163,15 @@ class MainWin(gtk.Window): "Il seguente errore si รจ verificato durante il recupero della coda: %s" % e) resp = dialog.run() dialog.destroy() + jobs = None + + # Se siamo riusciti a scucire qualche informazione la mostriamo, + # altrimenti no. self.queue_button.set_state("idle") - qd = QueueDialog(jobs, printer) - resp = qd.run() - qd.destroy() + if jobs: + qd = QueueDialog(jobs, printer) + resp = qd.run() + qd.destroy() diff --git a/drprint.desktop b/drprint.desktop old mode 100644 new mode 100755 index ad4c7d6..f2ec01b --- a/drprint.desktop +++ b/drprint.desktop @@ -1,3 +1,4 @@ +#!/usr/bin/env xdg-open [Desktop Entry] Encoding=UTF-8 Name=DrPrint -- 2.1.4