Corretto baco nel caso di errori di connesione quando si recupera
Leonardo [2010-06-12 08:18]
Corretto baco nel caso di errori di connesione quando si recupera
la lista dei lavori di stampa.
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