From 336ecc1e474bff905918262c3928ca2d401dd9a4 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Fri, 11 Jun 2010 16:26:21 +0200 Subject: [PATCH] Corretto problema di spaziatura nei VBox dell'authblock. --- DrPrintBackend.py | 7 ++++++- DrPrintGui/Input.py | 5 +++-- drprint | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) 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 -- 2.1.4