Corretto problema di spaziatura nei VBox dell'authblock.
Leonardo [2010-06-11 14:26]
Corretto problema di spaziatura nei VBox dell'authblock.
diff --git a/DrPrintBackend.py b/DrPrintBackend.py
index c1cedbf..b8127d8 100644
--- a/DrPrintBackend.py
+++ b/DrPrintBackend.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
## Some useful function to help DrPrint to
# -*- coding: utf-8 -*-
@@ -18,8 +19,12 @@ class Backend(gobject.GObject):
super(Backend, self).__init__()
def get_queue(self, printer, remote_host, username, password):
+ """
+ Obtain the queue of jobs on selected printer. It opens an SSH
+ connection to the server and parse lpq -Pprinter output
+ """
- try:
+ try:
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
except:
diff --git a/DrPrintGui/Input.py b/DrPrintGui/Input.py
index c579573..2ce8d6b 100644
--- a/DrPrintGui/Input.py
+++ b/DrPrintGui/Input.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
## This library provides User Input fields
# -*- coding: utf-8 -*-
@@ -77,8 +78,8 @@ class AuthBlock(gtk.HBox):
self.user_field = UsernameField(user = user)
self.password_field = PasswordField()
- vbox1 = gtk.VBox()
- vbox2 = gtk.VBox()
+ vbox1 = gtk.VBox(False, default_spacing)
+ vbox2 = gtk.VBox(False, default_spacing)
label = LeftAlignedLabel("Server SSH", 20)
vbox1.pack_start (label)
diff --git a/drprint b/drprint
index a3e9f4b..c116b24 100755
--- a/drprint
+++ b/drprint
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
import gtk, pygtk
from optparse import OptionParser