diff --git a/DrPrintGui/MainWin.py b/DrPrintGui/MainWin.py index 75afa14..3e90583 100644 --- a/DrPrintGui/MainWin.py +++ b/DrPrintGui/MainWin.py @@ -58,9 +58,7 @@ class MainWin(gtk.Window): label = gtk.Label() label.set_markup("<b>Come usare questo programma:</b>\n\ <b>1)</b> Inserire nome utente e password \n<b>2)</b> Scegliere il file da stampare e la\ - stampante \n<b>3)</b> Premere il tasto stampa\n\ -<b>Attenzione: </b>Questo programma stampa solo file che possono\n\ -essere compresi dalle stampanti, ovvero <b>PS</b> e <b>PDF</b>") + stampante \n<b>3)</b> Premere il tasto stampa") hbox = gtk.HBox(); hbox.show() diff --git a/debian/changelog b/debian/changelog index 2d91e43..4bdc2d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +drprint (0.7-2) karmic; urgency=low + + * Tolto del testo inutile + + -- Leonardo Robol <leonardo@debby> Wed, 18 Nov 2009 11:09:12 +0100 + +drprint (0.7-1) karmic; urgency=low + + * Cambiata la classe Dialog in modo da creare dei dialoghi bellini + * Aggiunta una notifica che il file stampato non sembra PDF o PS + + -- Leonardo Robol <leonardo@debby> Wed, 18 Nov 2009 11:06:06 +0100 + drprint (0.6-3) karmic; urgency=low * Cambiato il metodo per ottenere il nome utente diff --git a/debian/drprint.debhelper.log b/debian/drprint.debhelper.log index 02a3317..480656b 100644 --- a/debian/drprint.debhelper.log +++ b/debian/drprint.debhelper.log @@ -63,3 +63,16 @@ dh_installdeb dh_gencontrol dh_md5sums dh_builddeb +dh_prep +dh_installdirs +dh_installchangelogs +dh_installdocs +dh_installexamples +dh_installman +dh_link +dh_compress +dh_fixperms +dh_installdeb +dh_gencontrol +dh_md5sums +dh_builddeb diff --git a/debian/drprint/DEBIAN/control b/debian/drprint/DEBIAN/control index 12daf37..056dfc5 100644 --- a/debian/drprint/DEBIAN/control +++ b/debian/drprint/DEBIAN/control @@ -1,5 +1,5 @@ Package: drprint -Version: 0.6-3 +Version: 0.7-1 Architecture: all Maintainer: Leonardo Robol <leo@robol.it> Installed-Size: 184 diff --git a/debian/drprint/DEBIAN/md5sums b/debian/drprint/DEBIAN/md5sums index 91e75c9..08ade8d 100644 --- a/debian/drprint/DEBIAN/md5sums +++ b/debian/drprint/DEBIAN/md5sums @@ -1,18 +1,18 @@ 210b7fdd83ad02e6844ca947e51b5b65 usr/share/doc/drprint/copyright -26c7ce37223627121a25054233df4b6b usr/share/doc/drprint/changelog.Debian.gz +cb7bcbb054006f354d3691ffaf31ab01 usr/share/doc/drprint/changelog.Debian.gz fe6673b9521294403f77f7aa80e76e62 usr/share/doc/drprint/README.Debian f7aa3012efd5b01be9c79d0639ec1350 usr/local/bin/drprint -ba8997cac5fea103ebd9d94ea8f3ca98 usr/local/lib/python2.6/dist-packages/DrPrintGui/Dialogs.py +3c8b12fdabe14320b348e7486eb70c24 usr/local/lib/python2.6/dist-packages/DrPrintGui/Dialogs.py 2baa975a03736b1864533548e3ec92b5 usr/local/lib/python2.6/dist-packages/DrPrintGui/Input.py -bbabfe3bc2e2918a8fa6867b0b210ed1 usr/local/lib/python2.6/dist-packages/DrPrintGui/MainWin.py -ef21f631795819b8494c14938a3ab45e usr/local/lib/python2.6/dist-packages/DrPrintGui/Dialogs.pyc +d28e3f4433e3c1f554bc9666747c64d2 usr/local/lib/python2.6/dist-packages/DrPrintGui/MainWin.py +d530e81daad1d4be359861c71fe6a7bf usr/local/lib/python2.6/dist-packages/DrPrintGui/Dialogs.pyc d41d8cd98f00b204e9800998ecf8427e usr/local/lib/python2.6/dist-packages/DrPrintGui/__init__.py 30705d4ecde4b4de1f16a7ed9d30295c usr/local/lib/python2.6/dist-packages/DrPrintGui/__init__.pyc -371ce2b4d07ffed97380bbaada7f7a90 usr/local/lib/python2.6/dist-packages/DrPrintGui/MainWin.pyc +b13bdc711aac44159c422d5aa1fd7191 usr/local/lib/python2.6/dist-packages/DrPrintGui/MainWin.pyc d01fa8ab27243b43006e416b8800e72f usr/local/lib/python2.6/dist-packages/DrPrintGui/Input.pyc 6e95598efbfcd3cedb2df0d55083d28e usr/local/lib/python2.6/dist-packages/DrPrintBackend.pyc d017a23432b720ea110a28f498d2673a usr/local/lib/python2.6/dist-packages/DrPrintBackend.py 67ff218ed969602f5df1cc016298c2ad usr/local/lib/python2.6/dist-packages/DrPrint-0.3.egg-info -e7cd4902a940e3e4ddd25545ef6a34be usr/local/share/applications/drprint.desktop +4a2f988e188fe1218305de5f13fc7af7 usr/local/share/applications/drprint.desktop 267aed785f5614bab9a43ed7dfcb96bd usr/local/share/pixmaps/drprint.png b4149fabeb9884087e0730bca5cb5073 usr/local/share/drprint/drprint_gui.png diff --git a/debian/drprint/usr/local/lib/python2.6/dist-packages/DrPrintGui/Dialogs.py b/debian/drprint/usr/local/lib/python2.6/dist-packages/DrPrintGui/Dialogs.py index 9a632c9..e3c2e88 100644 --- a/debian/drprint/usr/local/lib/python2.6/dist-packages/DrPrintGui/Dialogs.py +++ b/debian/drprint/usr/local/lib/python2.6/dist-packages/DrPrintGui/Dialogs.py @@ -1,27 +1,39 @@ import gtk, pygtk -class Dialog(gtk.Dialog): +class Dialog(gtk.MessageDialog): - def __init__(self, title=None, buttons=None, text=None): + def __init__(self, buttons=gtk.BUTTONS_NONE, mtype=gtk.MESSAGE_INFO): - gtk.Dialog.__init__(self, title, - None, - 0, - buttons) - - + gtk.MessageDialog.__init__(self, + parent = None, + flags = 0, + type = mtype, + buttons = buttons) + class ErrorDialog(Dialog): def __init__(self, error, message): - Dialog.__init__(self, "Errore: %s" % error, - buttons = (gtk.STOCK_OK, gtk.RESPONSE_OK) + Dialog.__init__(self, + buttons = gtk.BUTTONS_OK, + mtype = gtk.MESSAGE_ERROR ) - label = gtk.Label() - label.set_markup(message) - self.get_content_area().pack_start( label , False, False, 15 ) - label.show() + self.set_markup(error) + self.format_secondary_markup(message) + + +class MessageDialog(Dialog): + + def __init__(self, title, text): + + Dialog.__init__(self, + buttons = gtk.BUTTONS_OK_CANCEL, + mtype = gtk.MESSAGE_WARNING + ) + self.set_markup(title) + self.format_secondary_markup(text) + diff --git a/debian/drprint/usr/local/lib/python2.6/dist-packages/DrPrintGui/MainWin.py b/debian/drprint/usr/local/lib/python2.6/dist-packages/DrPrintGui/MainWin.py index 2993a05..75afa14 100644 --- a/debian/drprint/usr/local/lib/python2.6/dist-packages/DrPrintGui/MainWin.py +++ b/debian/drprint/usr/local/lib/python2.6/dist-packages/DrPrintGui/MainWin.py @@ -12,7 +12,7 @@ import os import sys from Input import AuthBlock, PrinterSettingsBlock, PrintButton, LeftAlignedLabel, PageRangeBlock, OrientationSelect, SidesSelect -from Dialogs import ErrorDialog +from Dialogs import ErrorDialog, MessageDialog class MainWin(gtk.Window): """MainWin object for DrPrint""" @@ -58,7 +58,9 @@ class MainWin(gtk.Window): label = gtk.Label() label.set_markup("<b>Come usare questo programma:</b>\n\ <b>1)</b> Inserire nome utente e password \n<b>2)</b> Scegliere il file da stampare e la\ - stampante \n<b>3)</b> Premere il tasto stampa") + stampante \n<b>3)</b> Premere il tasto stampa\n\ +<b>Attenzione: </b>Questo programma stampa solo file che possono\n\ +essere compresi dalle stampanti, ovvero <b>PS</b> e <b>PDF</b>") hbox = gtk.HBox(); hbox.show() @@ -135,15 +137,29 @@ class MainWin(gtk.Window): orientation = self.orientation_select.get_orientation() sides = self.sides_select.get_sides_select() - self.backend.send_print(printer = printer, - username = username, - password = password, - filename = filename, - page_per_page = page_per_page, - page_range = page_range, - copies = copies, - orientation=orientation, - sides = sides) + if not (filename.lower().endswith("pdf") | + filename.lower().endswith("ps")): + dialog = MessageDialog("Attenzione!", + "Il file che hai scelto di stampare\n\ +non sembra essere un file <b>PS</b>,\n\ +un file <b>PDF</b> o un file di testo, e quindi \n\ +probabilmente il programma non stamperà\n\ +quello che vuoi.\n\ +Se vuoi continuare premi OK") + resp = dialog.run() + dialog.destroy() + + + if resp == gtk.RESPONSE_OK: + self.backend.send_print(printer = printer, + username = username, + password = password, + filename = filename, + page_per_page = page_per_page, + page_range = page_range, + copies = copies, + orientation=orientation, + sides = sides) else: self.debug( "Sembra che non ci sia un backend attaccato\ a questa interfaccia, quindi non faccio nulla") @@ -153,7 +169,7 @@ class MainWin(gtk.Window): e password siano errati""" self.debug("Autenticazione fallita") dialog = ErrorDialog("Autenticazione Fallita", - "<b>Autenticazione Fallita</b>\nLo username e la password forniti non sono\n\ + "Lo username e la password forniti non sono\n\ corretti. L'autenticazione su ssh.dm.unipi.it\nnon è andata a buon fine.") dialog.run() dialog.destroy() @@ -162,8 +178,7 @@ corretti. L'autenticazione su ssh.dm.unipi.it\nnon è andata a buon fine.") self.debug("Errore di I/O") dialog = ErrorDialog("Errore di I/O", - "<b>Errore di I/O</b>\n\ -C'è stato un errore nella lettura o nella\n \ + "C'è stato un errore nella lettura o nella\n \ trasmissione del file.") dialog.run() diff --git a/debian/drprint/usr/local/share/applications/drprint.desktop b/debian/drprint/usr/local/share/applications/drprint.desktop index 7cd2777..ad4c7d6 100644 --- a/debian/drprint/usr/local/share/applications/drprint.desktop +++ b/debian/drprint/usr/local/share/applications/drprint.desktop @@ -2,7 +2,7 @@ Encoding=UTF-8 Name=DrPrint Comment[it]=Stampa sulle stampanti della rete dm.unipi.it -Comment[en]= Print using dm.unipi.it network printers +Comment[en]=Print using dm.unipi.it network printers Exec=drprint Terminal=false Type=Application diff --git a/debian/drprint/usr/share/doc/drprint/changelog.Debian.gz b/debian/drprint/usr/share/doc/drprint/changelog.Debian.gz index c4278a7..d608639 100644 Binary files a/debian/drprint/usr/share/doc/drprint/changelog.Debian.gz and b/debian/drprint/usr/share/doc/drprint/changelog.Debian.gz differ diff --git a/debian/files b/debian/files index 3910bcd..e6f3f81 100644 --- a/debian/files +++ b/debian/files @@ -3,3 +3,4 @@ drprint_0.6-2_all.deb unknown extra drprint_0.6-2_all.deb unknown extra drprint_0.6-2_all.deb unknown extra drprint_0.6-3_all.deb unknown extra +drprint_0.7-1_all.deb unknown extra