Compare commits
No commits in common. 'c9' and 'i8' have entirely different histories.
@ -1 +1 @@
|
|||||||
SOURCES/system-config-printer-1.5.15.tar.xz
|
SOURCES/system-config-printer-1.5.11.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
766ffe01642cbc959ea34ee01cbe4e7116a514ed SOURCES/system-config-printer-1.5.15.tar.xz
|
d07abc566bd060a1c4a05c5e432a12513e68a2db SOURCES/system-config-printer-1.5.11.tar.gz
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
From f52f192d241f49334aa46dca1fe9c22b2ee37ff3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Antonio Larrosa <antonio.larrosa@gmail.com>
|
||||||
|
Date: Thu, 31 May 2018 12:07:19 +0200
|
||||||
|
Subject: [PATCH] Fallback to using LC_CTYPE if LC_MESSAGES is empty and fix
|
||||||
|
_language use
|
||||||
|
|
||||||
|
On openSUSE, LC_MESSAGES is not set by default, so fallback to LC_CTYPE in
|
||||||
|
that case.
|
||||||
|
|
||||||
|
Also, self._language is not a list (unlike in other classes) but the language
|
||||||
|
itself, so if we get the first element, we would be getting the first letter,
|
||||||
|
not the language.
|
||||||
|
---
|
||||||
|
scp-dbus-service.py | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/scp-dbus-service.py b/scp-dbus-service.py
|
||||||
|
index 1338836b..b3c03217 100644
|
||||||
|
--- a/scp-dbus-service.py
|
||||||
|
+++ b/scp-dbus-service.py
|
||||||
|
@@ -471,6 +471,8 @@ class ConfigPrinting(dbus.service.Object):
|
||||||
|
self._jobappletpath = None
|
||||||
|
self._ppds = None
|
||||||
|
self._language = locale.getlocale (locale.LC_MESSAGES)[0]
|
||||||
|
+ if not self._language:
|
||||||
|
+ self._language = locale.getlocale (locale.LC_CTYPE)[0]
|
||||||
|
|
||||||
|
def destroy (self):
|
||||||
|
self._cupsconn.destroy ()
|
||||||
|
@@ -511,7 +513,7 @@ class ConfigPrinting(dbus.service.Object):
|
||||||
|
def GetBestDrivers(self, device_id, device_make_and_model, device_uri,
|
||||||
|
reply_handler, error_handler):
|
||||||
|
GetBestDriversRequest (device_id, device_make_and_model, device_uri,
|
||||||
|
- self._cupsconn, self._language[0],
|
||||||
|
+ self._cupsconn, self._language,
|
||||||
|
reply_handler, error_handler)
|
||||||
|
|
||||||
|
@dbus.service.method(dbus_interface=CONFIG_IFACE,
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
From 4ab0958643827777f526b180ece874d40009986d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Korbar <tkorbar@redhat.com>
|
||||||
|
Date: Thu, 27 Sep 2018 17:27:39 +0200
|
||||||
|
Subject: [PATCH] Fix TypeError raised by debugprint call
|
||||||
|
|
||||||
|
- this error is caused by typo in options.py:424 debugprint call
|
||||||
|
- debugprint function takes only one parameter so i think it should
|
||||||
|
have been formated string
|
||||||
|
- fix https://bugzilla.redhat.com/show_bug.cgi?id=1619593
|
||||||
|
---
|
||||||
|
options.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/options.py b/options.py
|
||||||
|
index 4dc0b1fe..d756f98d 100644
|
||||||
|
--- a/options.py
|
||||||
|
+++ b/options.py
|
||||||
|
@@ -421,7 +421,7 @@ class OptionSelectOne(Option):
|
||||||
|
self.selector.set_active(selected)
|
||||||
|
else:
|
||||||
|
debugprint("Unknown value for %s: %s" % (name, value))
|
||||||
|
- debugprint("Choices:", supported)
|
||||||
|
+ debugprint("Choices: %s" % (supported))
|
||||||
|
if len(supported) > 0:
|
||||||
|
debugprint("Selecting from choices:", supported[0])
|
||||||
|
self.selector.set_active(0)
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 027ed8683a0ec30dbe705fe4d8f31c8ccb973199 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||||
|
Date: Thu, 30 Aug 2018 12:05:53 +0200
|
||||||
|
Subject: [PATCH] Fix typo in debugprint call
|
||||||
|
(https://github.com/zdohnal/system-config-printer/issues/105)
|
||||||
|
|
||||||
|
---
|
||||||
|
newprinter.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/newprinter.py b/newprinter.py
|
||||||
|
index 850c986b..051fc253 100644
|
||||||
|
--- a/newprinter.py
|
||||||
|
+++ b/newprinter.py
|
||||||
|
@@ -1049,7 +1049,7 @@ class NewPrinterGUI(GtkGUI):
|
||||||
|
debugprint('No packages for driver')
|
||||||
|
return None
|
||||||
|
if len(arches) > 1:
|
||||||
|
- debugprint('Returned more than one matching architecture, please report this as a bug: %s', repr (arches))
|
||||||
|
+ debugprint('Returned more than one matching architecture, please report this as a bug: %s' % repr (arches))
|
||||||
|
return None
|
||||||
|
|
||||||
|
pkgs = pkgs[arches[0]]
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,731 @@
|
|||||||
|
From 8193fc299431ca74734c1fb4a137e9878b1f0a05 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergey Cherevko <s.cherevko@msvsphere.ru>
|
||||||
|
Date: Tue, 29 Aug 2023 17:03:05 +0300
|
||||||
|
Subject: [PATCH] Fixed text in python files for translation
|
||||||
|
|
||||||
|
---
|
||||||
|
applet.py | 43 ++++++++++-----
|
||||||
|
authconn.py | 13 +++--
|
||||||
|
jobviewer.py | 116 ++++++++++++++++++++++++++-------------
|
||||||
|
newprinter.py | 66 ++++++++++++----------
|
||||||
|
ppdsloader.py | 7 ++-
|
||||||
|
printerproperties.py | 61 +++++++++++---------
|
||||||
|
pysmb.py | 24 +++++---
|
||||||
|
system-config-printer.py | 8 ++-
|
||||||
|
8 files changed, 214 insertions(+), 124 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/applet.py b/applet.py
|
||||||
|
index 959e5c8..d625f4c 100644
|
||||||
|
--- a/applet.py
|
||||||
|
+++ b/applet.py
|
||||||
|
@@ -47,6 +47,21 @@ from gi.repository import Notify
|
||||||
|
APPDIR="/usr/share/system-config-printer"
|
||||||
|
ICON="printer"
|
||||||
|
|
||||||
|
+# MSVSphere
|
||||||
|
+TEXT_missing_drv = _("Missing printer driver")
|
||||||
|
+TEXT_no_drv_for = _("No printer driver for %s.")
|
||||||
|
+TEXT_no_drv = _("No driver for this printer.")
|
||||||
|
+TEXT_search = _("Search")
|
||||||
|
+TEXT_printer_added = _("Printer added")
|
||||||
|
+TEXT_install_drv = _("Install printer driver")
|
||||||
|
+TEXT_reg_drv_inst = _("`%s' requires driver installation: %s.")
|
||||||
|
+TEXT_is_ready = _("`%s' is ready for printing.")
|
||||||
|
+TEXT_test_page = _("Print Test Page")
|
||||||
|
+TEXT_configure = _("Configure")
|
||||||
|
+TEXT_has_been_added = _("`%s' has been added, using the `%s' driver.")
|
||||||
|
+TEXT_find_drv = _("Find driver")
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# We need to call Notify.init before we can check the server for caps
|
||||||
|
Notify.init('System Config Printer Notification')
|
||||||
|
|
||||||
|
@@ -111,21 +126,21 @@ class NewPrinterNotification(dbus.service.Object):
|
||||||
|
if name.find("/") >= 0:
|
||||||
|
# name is a URI, no queue was generated, because no suitable
|
||||||
|
# driver was found
|
||||||
|
- title = _("Missing printer driver")
|
||||||
|
+ title = TEXT_missing_drv
|
||||||
|
devid = "MFG:%s;MDL:%s;DES:%s;CMD:%s;" % (mfg, mdl, des, cmd)
|
||||||
|
if (mfg and mdl) or des:
|
||||||
|
if (mfg and mdl):
|
||||||
|
device = "%s %s" % (mfg, mdl)
|
||||||
|
else:
|
||||||
|
device = des
|
||||||
|
- text = _("No printer driver for %s.") % device
|
||||||
|
+ text = TEXT_no_drv_for % device
|
||||||
|
else:
|
||||||
|
- text = _("No driver for this printer.")
|
||||||
|
+ text = TEXT_no_drv
|
||||||
|
n = Notify.Notification.new (title, text, 'printer')
|
||||||
|
if "actions" in Notify.get_server_caps():
|
||||||
|
n.set_urgency (Notify.Urgency.CRITICAL)
|
||||||
|
n.set_timeout (Notify.EXPIRES_NEVER)
|
||||||
|
- n.add_action ("setup-printer", _("Search"),
|
||||||
|
+ n.add_action ("setup-printer", TEXT_search,
|
||||||
|
lambda x, y:
|
||||||
|
self.setup_printer (x, y, name, devid))
|
||||||
|
else:
|
||||||
|
@@ -162,14 +177,14 @@ class NewPrinterNotification(dbus.service.Object):
|
||||||
|
(make, model) = ppdMakeModelSplit (printer['printer-make-and-model'])
|
||||||
|
driver = make + " " + model
|
||||||
|
if status < self.STATUS_GENERIC_DRIVER:
|
||||||
|
- title = _("Printer added")
|
||||||
|
+ title = TEXT_printer_added
|
||||||
|
else:
|
||||||
|
- title = _("Missing printer driver")
|
||||||
|
+ title = TEXT_missing_drv
|
||||||
|
|
||||||
|
if len (missing_pkgs) > 0:
|
||||||
|
pkgs = reduce (lambda x,y: x + ", " + y, missing_pkgs)
|
||||||
|
- title = _("Install printer driver")
|
||||||
|
- text = (_("`%s' requires driver installation: %s.") %
|
||||||
|
+ title = TEXT_install_drv
|
||||||
|
+ text = ( TEXT_reg_drv_inst %
|
||||||
|
(name, pkgs))
|
||||||
|
n = Notify.Notification.new (title, text, 'printer')
|
||||||
|
import installpackage
|
||||||
|
@@ -193,26 +208,26 @@ class NewPrinterNotification(dbus.service.Object):
|
||||||
|
|
||||||
|
elif status == self.STATUS_SUCCESS:
|
||||||
|
devid = "MFG:%s;MDL:%s;DES:%s;CMD:%s;" % (mfg, mdl, des, cmd)
|
||||||
|
- text = _("`%s' is ready for printing.") % name
|
||||||
|
+ text = TEXT_is_ready % name
|
||||||
|
n = Notify.Notification.new (title, text, 'printer')
|
||||||
|
if "actions" in Notify.get_server_caps():
|
||||||
|
n.set_urgency (Notify.Urgency.NORMAL)
|
||||||
|
- n.add_action ("test-page", _("Print test page"),
|
||||||
|
+ n.add_action ("test-page", TEXT_test_page,
|
||||||
|
lambda x, y:
|
||||||
|
self.print_test_page (x, y, name))
|
||||||
|
- n.add_action ("configure", _("Configure"),
|
||||||
|
+ n.add_action ("configure", TEXT_configure,
|
||||||
|
lambda x, y: self.configure (x, y, name))
|
||||||
|
else: # Model mismatch
|
||||||
|
devid = "MFG:%s;MDL:%s;DES:%s;CMD:%s;" % (mfg, mdl, des, cmd)
|
||||||
|
- text = (_("`%s' has been added, using the `%s' driver.") %
|
||||||
|
+ text = ( TEXT_has_been_added %
|
||||||
|
(name, driver))
|
||||||
|
n = Notify.Notification.new (title, text, 'printer')
|
||||||
|
if "actions" in Notify.get_server_caps():
|
||||||
|
n.set_urgency (Notify.Urgency.CRITICAL)
|
||||||
|
- n.add_action ("test-page", _("Print test page"),
|
||||||
|
+ n.add_action ("test-page", TEXT_test_page,
|
||||||
|
lambda x, y:
|
||||||
|
self.print_test_page (x, y, name, devid))
|
||||||
|
- n.add_action ("find-driver", _("Find driver"),
|
||||||
|
+ n.add_action ("find-driver", TEXT_find_drv,
|
||||||
|
lambda x, y:
|
||||||
|
self.find_driver (x, y, name, devid))
|
||||||
|
n.set_timeout (Notify.EXPIRES_NEVER)
|
||||||
|
diff --git a/authconn.py b/authconn.py
|
||||||
|
index 2a645dc..317e702 100644
|
||||||
|
--- a/authconn.py
|
||||||
|
+++ b/authconn.py
|
||||||
|
@@ -34,11 +34,16 @@ import gettext
|
||||||
|
gettext.install(domain=config.PACKAGE, localedir=config.localedir)
|
||||||
|
N_ = lambda x: x
|
||||||
|
|
||||||
|
+TEXT_user = _("Username:")
|
||||||
|
+TEXT_domain = _("Domain:")
|
||||||
|
+TEXT_password = _("Password:")
|
||||||
|
+TEXT_auth = _("Authentication")
|
||||||
|
+
|
||||||
|
cups.require("1.9.60")
|
||||||
|
class AuthDialog(Gtk.Dialog):
|
||||||
|
- AUTH_FIELD={'username': N_("Username:"),
|
||||||
|
- 'password': N_("Password:"),
|
||||||
|
- 'domain': N_("Domain:")}
|
||||||
|
+ AUTH_FIELD={'username': N_(TEXT_user),
|
||||||
|
+ 'password': N_(TEXT_password),
|
||||||
|
+ 'domain': N_(TEXT_domain)}
|
||||||
|
|
||||||
|
def __init__ (self, title=None, parent=None,
|
||||||
|
flags=Gtk.DialogFlags.MODAL,
|
||||||
|
@@ -47,7 +52,7 @@ class AuthDialog(Gtk.Dialog):
|
||||||
|
auth_info_required=None,
|
||||||
|
allow_remember=False):
|
||||||
|
if title is None:
|
||||||
|
- title = _("Authentication")
|
||||||
|
+ title = TEXT_auth
|
||||||
|
if auth_info_required is None:
|
||||||
|
auth_info_required = ['username', 'password']
|
||||||
|
Gtk.Dialog.__init__ (self, title, parent, flags, buttons)
|
||||||
|
diff --git a/jobviewer.py b/jobviewer.py
|
||||||
|
index 6d9309f..11ad7d6 100644
|
||||||
|
--- a/jobviewer.py
|
||||||
|
+++ b/jobviewer.py
|
||||||
|
@@ -70,6 +70,46 @@ ICON="printer"
|
||||||
|
ICON_SIZE=22
|
||||||
|
SEARCHING_ICON="document-print-preview"
|
||||||
|
|
||||||
|
+# MSVSphere
|
||||||
|
+TEXT_my_jobs_on = _("my jobs on %s")
|
||||||
|
+TEXT_my_jobs = _("my jobs")
|
||||||
|
+TEXT_all_jobs = _("all jobs")
|
||||||
|
+TEXT_doc_prn_status = _("Document Print Status (%s)")
|
||||||
|
+TEXT_job = _("Job")
|
||||||
|
+TEXT_user = _("User")
|
||||||
|
+TEXT_doc = _("Document")
|
||||||
|
+TEXT_prn = _("Printer")
|
||||||
|
+TEXT_size = _("Size")
|
||||||
|
+TEXT_time_subm = _("Time submitted")
|
||||||
|
+TEXT_status = _("Status")
|
||||||
|
+TEXT_cancel = _("_Cancel")
|
||||||
|
+TEXT_del = _("_Delete")
|
||||||
|
+TEXT_hold = _("_Hold")
|
||||||
|
+TEXT_release = _("_Release")
|
||||||
|
+TEXT_reprint = _("Re_print")
|
||||||
|
+TEXT_retrieve = _("Re_trieve")
|
||||||
|
+TEXT_move_to = _("_Move To")
|
||||||
|
+TEXT_auth = _("_Authenticate")
|
||||||
|
+TEXT_view_attr = _("_View Attributes")
|
||||||
|
+TEXT_close_wnd = _("Close this window")
|
||||||
|
+TEXT_del_jobs = _("Delete Jobs")
|
||||||
|
+TEXT_del_jobs_ask = _("Do you really want to delete these jobs?")
|
||||||
|
+TEXT_del_job = _("Delete Job")
|
||||||
|
+TEXT_del_job_ask = _("Do you really want to delete this job?")
|
||||||
|
+TEXT_cancel_jobs = _("Cancel Jobs")
|
||||||
|
+TEXT_cancel_jobs_ask = _("Do you really want to cancel these jobs?")
|
||||||
|
+TEXT_cancel_job = _("Cancel Job")
|
||||||
|
+TEXT_cancel_job_ask = _("Do you really want to cancel this job?")
|
||||||
|
+TEXT_keep_prn = _("Keep Printing")
|
||||||
|
+TEXT_deleting = _("deleting job")
|
||||||
|
+TEXT_canceling = _("canceling job")
|
||||||
|
+TEXT_cancel_selected = _("Cancel selected jobs")
|
||||||
|
+TEXT_delete_selected = _("Delete selected jobs")
|
||||||
|
+TEXT_hold_selected = _("Hold selected jobs")
|
||||||
|
+TEXT_release_selected = _("Release selected jobs")
|
||||||
|
+TEXT_reprint_selected = _("Reprint selected jobs")
|
||||||
|
+TEXT_retrieve_selected = _("Retrieve selected jobs")
|
||||||
|
+
|
||||||
|
# We need to call Notify.init before we can check the server for caps
|
||||||
|
Notify.init('System Config Printer Notification')
|
||||||
|
|
||||||
|
@@ -252,22 +292,22 @@ class CancelJobsOperation(GObject.GObject):
|
||||||
|
self.encryption = encryption
|
||||||
|
if purge_job:
|
||||||
|
if len(self.jobids) > 1:
|
||||||
|
- dialog_title = _("Delete Jobs")
|
||||||
|
- dialog_label = _("Do you really want to delete these jobs?")
|
||||||
|
+ dialog_title = TEXT_del_jobs
|
||||||
|
+ dialog_label = TEXT_del_jobs_ask
|
||||||
|
else:
|
||||||
|
- dialog_title = _("Delete Job")
|
||||||
|
- dialog_label = _("Do you really want to delete this job?")
|
||||||
|
+ dialog_title = TEXT_del_job
|
||||||
|
+ dialog_label = TEXT_del_job_ask
|
||||||
|
else:
|
||||||
|
if len(self.jobids) > 1:
|
||||||
|
- dialog_title = _("Cancel Jobs")
|
||||||
|
- dialog_label = _("Do you really want to cancel these jobs?")
|
||||||
|
+ dialog_title = TEXT_cancel_jobs
|
||||||
|
+ dialog_label = TEXT_cancel_jobs_ask
|
||||||
|
else:
|
||||||
|
- dialog_title = _("Cancel Job")
|
||||||
|
- dialog_label = _("Do you really want to cancel this job?")
|
||||||
|
+ dialog_title = TEXT_cancel_job
|
||||||
|
+ dialog_label = TEXT_cancel_job_ask
|
||||||
|
|
||||||
|
dialog = Gtk.Dialog (title=dialog_title, transient_for=parent,
|
||||||
|
modal=True, destroy_with_parent=True)
|
||||||
|
- dialog.add_buttons (_("Keep Printing"), Gtk.ResponseType.NO,
|
||||||
|
+ dialog.add_buttons (TEXT_keep_prn, Gtk.ResponseType.NO,
|
||||||
|
dialog_title, Gtk.ResponseType.YES)
|
||||||
|
dialog.set_default_response (Gtk.ResponseType.NO)
|
||||||
|
dialog.set_border_width (6)
|
||||||
|
@@ -334,9 +374,9 @@ class CancelJobsOperation(GObject.GObject):
|
||||||
|
self.connection = connection
|
||||||
|
|
||||||
|
if self.purge_job:
|
||||||
|
- operation = _("deleting job")
|
||||||
|
+ operation = TEXT_deleting
|
||||||
|
else:
|
||||||
|
- operation = _("canceling job")
|
||||||
|
+ operation = TEXT_canceling
|
||||||
|
|
||||||
|
self.connection._begin_operation (operation)
|
||||||
|
self.connection.cancelJob (self.jobids[0], self.purge_job,
|
||||||
|
@@ -434,25 +474,25 @@ class JobViewer (GtkGUI):
|
||||||
|
|
||||||
|
job_action_group = Gtk.ActionGroup (name="JobActionGroup")
|
||||||
|
job_action_group.add_actions ([
|
||||||
|
- ("cancel-job", Gtk.STOCK_CANCEL, _("_Cancel"), None,
|
||||||
|
- _("Cancel selected jobs"), self.on_job_cancel_activate),
|
||||||
|
- ("delete-job", Gtk.STOCK_DELETE, _("_Delete"), None,
|
||||||
|
- _("Delete selected jobs"), self.on_job_delete_activate),
|
||||||
|
- ("hold-job", Gtk.STOCK_MEDIA_PAUSE, _("_Hold"), None,
|
||||||
|
- _("Hold selected jobs"), self.on_job_hold_activate),
|
||||||
|
- ("release-job", Gtk.STOCK_MEDIA_PLAY, _("_Release"), None,
|
||||||
|
- _("Release selected jobs"), self.on_job_release_activate),
|
||||||
|
- ("reprint-job", Gtk.STOCK_REDO, _("Re_print"), None,
|
||||||
|
- _("Reprint selected jobs"), self.on_job_reprint_activate),
|
||||||
|
- ("retrieve-job", Gtk.STOCK_SAVE_AS, _("Re_trieve"), None,
|
||||||
|
- _("Retrieve selected jobs"), self.on_job_retrieve_activate),
|
||||||
|
- ("move-job", None, _("_Move To"), None, None, None),
|
||||||
|
- ("authenticate-job", None, _("_Authenticate"), None, None,
|
||||||
|
+ ("cancel-job", Gtk.STOCK_CANCEL, TEXT_cancel, None,
|
||||||
|
+ TEXT_cancel_selected, self.on_job_cancel_activate),
|
||||||
|
+ ("delete-job", Gtk.STOCK_DELETE, TEXT_del, None,
|
||||||
|
+ TEXT_delete_selected, self.on_job_delete_activate),
|
||||||
|
+ ("hold-job", Gtk.STOCK_MEDIA_PAUSE, TEXT_hold, None,
|
||||||
|
+ TEXT_hold_selected, self.on_job_hold_activate),
|
||||||
|
+ ("release-job", Gtk.STOCK_MEDIA_PLAY, TEXT_release, None,
|
||||||
|
+ TEXT_release_selected, self.on_job_release_activate),
|
||||||
|
+ ("reprint-job", Gtk.STOCK_REDO, TEXT_reprint, None,
|
||||||
|
+ TEXT_reprint_selected, self.on_job_reprint_activate),
|
||||||
|
+ ("retrieve-job", Gtk.STOCK_SAVE_AS, TEXT_retrieve, None,
|
||||||
|
+ TEXT_retrieve_selected, self.on_job_retrieve_activate),
|
||||||
|
+ ("move-job", None, TEXT_move_to, None, None, None),
|
||||||
|
+ ("authenticate-job", None, TEXT_auth, None, None,
|
||||||
|
self.on_job_authenticate_activate),
|
||||||
|
- ("job-attributes", None, _("_View Attributes"), None, None,
|
||||||
|
+ ("job-attributes", None, TEXT_view_attr, None, None,
|
||||||
|
self.on_job_attributes_activate),
|
||||||
|
("close", Gtk.STOCK_CLOSE, None, "<ctrl>w",
|
||||||
|
- _("Close this window"), self.on_delete_event)
|
||||||
|
+ TEXT_close_wnd, self.on_delete_event)
|
||||||
|
])
|
||||||
|
self.job_ui_manager = Gtk.UIManager ()
|
||||||
|
self.job_ui_manager.insert_action_group (job_action_group, -1)
|
||||||
|
@@ -515,11 +555,11 @@ class JobViewer (GtkGUI):
|
||||||
|
self.toolbar.insert (item, -1)
|
||||||
|
|
||||||
|
for skip, ellipsize, name, setter in \
|
||||||
|
- [(False, False, _("Job"), self._set_job_job_number_text),
|
||||||
|
- (True, False, _("User"), self._set_job_user_text),
|
||||||
|
- (False, True, _("Document"), self._set_job_document_text),
|
||||||
|
- (False, True, _("Printer"), self._set_job_printer_text),
|
||||||
|
- (False, False, _("Size"), self._set_job_size_text)]:
|
||||||
|
+ [(False, False, TEXT_job, self._set_job_job_number_text),
|
||||||
|
+ (True, False, TEXT_user, self._set_job_user_text),
|
||||||
|
+ (False, True, TEXT_doc, self._set_job_document_text),
|
||||||
|
+ (False, True, TEXT_prn, self._set_job_printer_text),
|
||||||
|
+ (False, False, TEXT_size, self._set_job_size_text)]:
|
||||||
|
if applet and skip:
|
||||||
|
# Skip the user column when running as applet.
|
||||||
|
continue
|
||||||
|
@@ -535,11 +575,11 @@ class JobViewer (GtkGUI):
|
||||||
|
self.treeview.append_column(column)
|
||||||
|
|
||||||
|
cell = Gtk.CellRendererText ()
|
||||||
|
- column = Gtk.TreeViewColumn (_("Time submitted"), cell, text=1)
|
||||||
|
+ column = Gtk.TreeViewColumn (TEXT_time_subm, cell, text=1)
|
||||||
|
column.set_resizable (True)
|
||||||
|
self.treeview.append_column (column)
|
||||||
|
|
||||||
|
- column = Gtk.TreeViewColumn (_("Status"))
|
||||||
|
+ column = Gtk.TreeViewColumn (TEXT_status)
|
||||||
|
icon = Gtk.CellRendererPixbuf ()
|
||||||
|
column.pack_start (icon, False)
|
||||||
|
text = Gtk.CellRendererText ()
|
||||||
|
@@ -569,15 +609,15 @@ class JobViewer (GtkGUI):
|
||||||
|
|
||||||
|
if my_jobs:
|
||||||
|
if specific_dests:
|
||||||
|
- title = _("my jobs on %s") % the_dests
|
||||||
|
+ title = TEXT_my_jobs_on % the_dests
|
||||||
|
else:
|
||||||
|
- title = _("my jobs")
|
||||||
|
+ title = TEXT_my_jobs
|
||||||
|
else:
|
||||||
|
if specific_dests:
|
||||||
|
title = "%s" % the_dests
|
||||||
|
else:
|
||||||
|
- title = _("all jobs")
|
||||||
|
- self.JobsWindow.set_title (_("Document Print Status (%s)") % title)
|
||||||
|
+ title = TEXT_all_jobs
|
||||||
|
+ self.JobsWindow.set_title (TEXT_doc_prn_status % title)
|
||||||
|
|
||||||
|
if parent:
|
||||||
|
self.JobsWindow.set_transient_for (parent)
|
||||||
|
diff --git a/newprinter.py b/newprinter.py
|
||||||
|
index 850c986..da0e959 100644
|
||||||
|
--- a/newprinter.py
|
||||||
|
+++ b/newprinter.py
|
||||||
|
@@ -72,6 +72,25 @@ gettext.install(domain=config.PACKAGE, localedir=config.localedir)
|
||||||
|
TEXT_adjust_firewall = _("The firewall may need adjusting in order to "
|
||||||
|
"detect network printers. Adjust the "
|
||||||
|
"firewall now?")
|
||||||
|
+# MSVSphere
|
||||||
|
+TEXT_adjust_firewall_header = _("Adjust Firewall")
|
||||||
|
+TEXT_adjust_firewall_NO_button = _("Do It Later")
|
||||||
|
+TEXT_adjust_firewall_YES_button = _("Adjust Firewall")
|
||||||
|
+TEXT_secondary_text_IPP = _("Allow all incoming IPP Browse packets")
|
||||||
|
+TEXT_secondary_text_mDNS = _("Allow all incoming mDNS traffic")
|
||||||
|
+TEXT_secondary_text_SMB = _("Allow all incoming SMB/CIFS browse packets")
|
||||||
|
+TEXT_show_info_dialog_header = _("No Print Shares")
|
||||||
|
+TEXT_show_info_dialog_body = _("There were no print shares found. "
|
||||||
|
+ "Please check that the Samba service is "
|
||||||
|
+ "marked as trusted in your firewall "
|
||||||
|
+ "configuration.")
|
||||||
|
+TEXT_searching = _("Searching")
|
||||||
|
+TEXT_searching_for_drivers = _("Searching for drivers")
|
||||||
|
+TEXT_share_verified = _("Print Share Verified")
|
||||||
|
+TEXT_share_verified_text = _("This print share is accessible.")
|
||||||
|
+TEXT_share_inaccessible = _("Print Share Inaccessible")
|
||||||
|
+TEXT_share_inaccessible_text = _("This print share is not accessible.")
|
||||||
|
+TEXT_no_printer_was_found_at = _("No printer was found at that address.")
|
||||||
|
|
||||||
|
def validDeviceURI (uri):
|
||||||
|
"""Returns True is the provided URI is valid."""
|
||||||
|
@@ -1675,7 +1694,7 @@ class NewPrinterGUI(GtkGUI):
|
||||||
|
self.searchedfordriverpackages = True
|
||||||
|
|
||||||
|
self._searchdialog_canceled = False
|
||||||
|
- fmt = _("Searching")
|
||||||
|
+ fmt = TEXT_searching
|
||||||
|
self._searchdialog = Gtk.MessageDialog (
|
||||||
|
parent=self.NewPrinterWindow,
|
||||||
|
modal=True,
|
||||||
|
@@ -1684,8 +1703,7 @@ class NewPrinterGUI(GtkGUI):
|
||||||
|
buttons=Gtk.ButtonsType.CANCEL,
|
||||||
|
text=fmt)
|
||||||
|
|
||||||
|
- self._searchdialog.format_secondary_text (
|
||||||
|
- _("Searching for drivers"))
|
||||||
|
+ self._searchdialog.format_secondary_text (TEXT_searching_for_drivers)
|
||||||
|
|
||||||
|
self.opreq = OpenPrintingRequest ()
|
||||||
|
self._searchdialog.connect (
|
||||||
|
@@ -2275,13 +2293,10 @@ class NewPrinterGUI(GtkGUI):
|
||||||
|
|
||||||
|
secondary_text = TEXT_adjust_firewall + "\n\n"
|
||||||
|
if not ipp_allowed:
|
||||||
|
- secondary_text += ("- " +
|
||||||
|
- _("Allow all incoming IPP Browse packets") +
|
||||||
|
- "\n")
|
||||||
|
+ secondary_text += "- " + TEXT_secondary_text_IPP + "\n"
|
||||||
|
f.add_service (firewallsettings.IPP_CLIENT_SERVICE)
|
||||||
|
if not mdns_allowed:
|
||||||
|
- secondary_text += ("- " +
|
||||||
|
- _("Allow all incoming mDNS traffic") + "\n")
|
||||||
|
+ secondary_text += "- " + TEXT_secondary_text_mDNS + "\n"
|
||||||
|
f.add_service (firewallsettings.MDNS_SERVICE)
|
||||||
|
|
||||||
|
if not allowed:
|
||||||
|
@@ -2291,10 +2306,10 @@ class NewPrinterGUI(GtkGUI):
|
||||||
|
modal=True, destroy_with_parent=True,
|
||||||
|
message_type=Gtk.MessageType.QUESTION,
|
||||||
|
buttons=Gtk.ButtonsType.NONE,
|
||||||
|
- text= _("Adjust Firewall"))
|
||||||
|
+ text= TEXT_adjust_firewall_header)
|
||||||
|
dialog.format_secondary_markup (secondary_text)
|
||||||
|
- dialog.add_buttons (_("Do It Later"), Gtk.ResponseType.NO,
|
||||||
|
- _("Adjust Firewall"), Gtk.ResponseType.YES)
|
||||||
|
+ dialog.add_buttons (TEXT_adjust_firewall_NO_button, Gtk.ResponseType.NO,
|
||||||
|
+ TEXT_adjust_firewall_YES_button, Gtk.ResponseType.YES)
|
||||||
|
dialog.connect ('response', self.adjust_firewall_response)
|
||||||
|
dialog.show ()
|
||||||
|
except (dbus.DBusException, Exception):
|
||||||
|
@@ -2570,11 +2585,7 @@ class NewPrinterGUI(GtkGUI):
|
||||||
|
|
||||||
|
if store.get_iter_first () is None:
|
||||||
|
self.SMBBrowseDialog.hide ()
|
||||||
|
- show_info_dialog (_("No Print Shares"),
|
||||||
|
- _("There were no print shares found. "
|
||||||
|
- "Please check that the Samba service is "
|
||||||
|
- "marked as trusted in your firewall "
|
||||||
|
- "configuration."),
|
||||||
|
+ show_info_dialog (TEXT_show_info_dialog_header, TEXT_show_info_dialog_body,
|
||||||
|
parent=self.NewPrinterWindow)
|
||||||
|
|
||||||
|
def smb_select_function (self, selection, model, path, path_selected, data):
|
||||||
|
@@ -2765,13 +2776,11 @@ class NewPrinterGUI(GtkGUI):
|
||||||
|
modal=True, destroy_with_parent=True,
|
||||||
|
message_type=Gtk.MessageType.QUESTION,
|
||||||
|
buttons=Gtk.ButtonsType.NONE,
|
||||||
|
- text=_("Adjust Firewall"))
|
||||||
|
- secondary_text += ("- " +
|
||||||
|
- _("Allow all incoming SMB/CIFS "
|
||||||
|
- "browse packets"))
|
||||||
|
+ text=TEXT_adjust_firewall_header)
|
||||||
|
+ secondary_text += "- " + TEXT_secondary_text_SMB
|
||||||
|
dialog.format_secondary_markup (secondary_text)
|
||||||
|
- dialog.add_buttons (_("Do It Later"), Gtk.ResponseType.NO,
|
||||||
|
- _("Adjust Firewall"), Gtk.ResponseType.YES)
|
||||||
|
+ dialog.add_buttons (TEXT_adjust_firewall_NO_button, Gtk.ResponseType.NO,
|
||||||
|
+ TEXT_adjust_firewall_YES_button, Gtk.ResponseType.YES)
|
||||||
|
response = dialog.run ()
|
||||||
|
dialog.destroy ()
|
||||||
|
|
||||||
|
@@ -2887,16 +2896,16 @@ class NewPrinterGUI(GtkGUI):
|
||||||
|
ready (self.NewPrinterWindow)
|
||||||
|
|
||||||
|
if accessible:
|
||||||
|
- show_info_dialog (_("Print Share Verified"),
|
||||||
|
- _("This print share is accessible."),
|
||||||
|
+ show_info_dialog (TEXT_share_verified,
|
||||||
|
+ TEXT_share_verified_text,
|
||||||
|
parent=self.NewPrinterWindow)
|
||||||
|
return
|
||||||
|
|
||||||
|
if not canceled:
|
||||||
|
- text = _("This print share is not accessible.")
|
||||||
|
+ text = TEXT_share_inaccessible_text
|
||||||
|
if reason:
|
||||||
|
text = reason
|
||||||
|
- show_error_dialog (_("Print Share Inaccessible"), text,
|
||||||
|
+ show_error_dialog (TEXT_share_inaccessible, text,
|
||||||
|
parent=self.NewPrinterWindow)
|
||||||
|
|
||||||
|
def entry_changed(self, entry, allowed_chars):
|
||||||
|
@@ -3503,10 +3512,7 @@ class NewPrinterGUI(GtkGUI):
|
||||||
|
self.entNPTNetworkHostname.set_sensitive (True)
|
||||||
|
self.btnNetworkFind.set_sensitive (True)
|
||||||
|
if self.network_found == 0:
|
||||||
|
- self.lblNetworkFindNotFound.set_markup ('<i>' +
|
||||||
|
- _("No printer was "
|
||||||
|
- "found at that "
|
||||||
|
- "address.") + '</i>')
|
||||||
|
+ self.lblNetworkFindNotFound.set_markup ('<i>' + TEXT_no_printer_was_found_at + '</i>')
|
||||||
|
self.lblNetworkFindNotFound.show ()
|
||||||
|
|
||||||
|
Gdk.threads_leave ()
|
||||||
|
diff --git a/ppdsloader.py b/ppdsloader.py
|
||||||
|
index 7be92ee..d56a2b7 100644
|
||||||
|
--- a/ppdsloader.py
|
||||||
|
+++ b/ppdsloader.py
|
||||||
|
@@ -33,6 +33,9 @@ import config
|
||||||
|
import gettext
|
||||||
|
gettext.install(domain=config.PACKAGE, localedir=config.localedir)
|
||||||
|
|
||||||
|
+TEXT_searching = _("Searching")
|
||||||
|
+TEXT_searching_for_drivers = _("Searching for drivers")
|
||||||
|
+
|
||||||
|
class PPDsLoader(GObject.GObject):
|
||||||
|
"""
|
||||||
|
1. If PackageKit support is available, and this is a local server,
|
||||||
|
@@ -83,14 +86,14 @@ class PPDsLoader(GObject.GObject):
|
||||||
|
debugprint ("Failed to get session bus")
|
||||||
|
self._bus = None
|
||||||
|
|
||||||
|
- fmt = _("Searching")
|
||||||
|
+ fmt = TEXT_searching
|
||||||
|
self._dialog = Gtk.MessageDialog (parent=parent,
|
||||||
|
modal=True, destroy_with_parent=True,
|
||||||
|
message_type=Gtk.MessageType.INFO,
|
||||||
|
buttons=Gtk.ButtonsType.CANCEL,
|
||||||
|
text=fmt)
|
||||||
|
|
||||||
|
- self._dialog.format_secondary_text (_("Searching for drivers"))
|
||||||
|
+ self._dialog.format_secondary_text (TEXT_searching_for_drivers)
|
||||||
|
|
||||||
|
self._dialog.connect ("response", self._dialog_response)
|
||||||
|
|
||||||
|
diff --git a/printerproperties.py b/printerproperties.py
|
||||||
|
index ff85664..42722eb 100755
|
||||||
|
--- a/printerproperties.py
|
||||||
|
+++ b/printerproperties.py
|
||||||
|
@@ -49,6 +49,25 @@ from newprinter import busy, ready
|
||||||
|
|
||||||
|
import ppdippstr
|
||||||
|
pkgdata = config.pkgdatadir
|
||||||
|
+# MSVSphere
|
||||||
|
+TEXT_inst_opts = _("Installable Options")
|
||||||
|
+TEXT_prn_opts = _("Printer Options")
|
||||||
|
+TEXT_submitted = _("Submitted")
|
||||||
|
+TEXT_test_page_submitted = _("Test page submitted as job %d")
|
||||||
|
+TEXT_maintenance_cmd_submitted = _("Maintenance command submitted as job %d")
|
||||||
|
+TEXT_not_possible = _("Not possible")
|
||||||
|
+TEXT_remote_srv_not_accept = _("The remote server did not accept "
|
||||||
|
+ "the print job, most likely "
|
||||||
|
+ "because the printer is not "
|
||||||
|
+ "shared.")
|
||||||
|
+TEXT_raw_queue = _("Raw Queue")
|
||||||
|
+TEXT_unable_get_queue = _("Unable to get queue details. Treating queue "
|
||||||
|
+ "as raw.")
|
||||||
|
+TEXT_error = _("Error")
|
||||||
|
+TEXT_ppd_file_damaged = _("The PPD file for this queue "
|
||||||
|
+ "is damaged.")
|
||||||
|
+TEXT_problem_connect = _("There was a problem connecting to "
|
||||||
|
+ "the CUPS server.")
|
||||||
|
|
||||||
|
def CUPS_server_hostname ():
|
||||||
|
host = cups.getServer ()
|
||||||
|
@@ -954,8 +973,8 @@ class PrinterPropertiesDialog(GtkGUI):
|
||||||
|
optionsbold = True
|
||||||
|
else:
|
||||||
|
self.btnConflict.hide()
|
||||||
|
- installabletext = _("Installable Options")
|
||||||
|
- optionstext = _("Printer Options")
|
||||||
|
+ installabletext = TEXT_inst_opts
|
||||||
|
+ optionstext = TEXT_prn_opts
|
||||||
|
if installablebold:
|
||||||
|
installabletext = "<b>%s</b>" % installabletext
|
||||||
|
if optionsbold:
|
||||||
|
@@ -1200,11 +1219,8 @@ class PrinterPropertiesDialog(GtkGUI):
|
||||||
|
if (e == cups.IPP_NOT_AUTHORIZED and
|
||||||
|
self._host != 'localhost' and
|
||||||
|
self._host[0] != '/'):
|
||||||
|
- show_error_dialog (_("Not possible"),
|
||||||
|
- _("The remote server did not accept "
|
||||||
|
- "the print job, most likely "
|
||||||
|
- "because the printer is not "
|
||||||
|
- "shared."),
|
||||||
|
+ show_error_dialog (TEXT_not_possible,
|
||||||
|
+ TEXT_remote_srv_not_accept,
|
||||||
|
self.parent)
|
||||||
|
else:
|
||||||
|
show_IPP_Error(e, msg, self.parent)
|
||||||
|
@@ -1213,8 +1229,8 @@ class PrinterPropertiesDialog(GtkGUI):
|
||||||
|
cups.setUser (user)
|
||||||
|
|
||||||
|
if job_id is not None:
|
||||||
|
- show_info_dialog (_("Submitted"),
|
||||||
|
- _("Test page submitted as job %d") % job_id,
|
||||||
|
+ show_info_dialog (TEXT_submitted,
|
||||||
|
+ TEXT_test_page_submitted % job_id,
|
||||||
|
parent=self.parent)
|
||||||
|
|
||||||
|
def maintenance_command (self, command):
|
||||||
|
@@ -1233,19 +1249,15 @@ class PrinterPropertiesDialog(GtkGUI):
|
||||||
|
format=format,
|
||||||
|
file=tmpfile.name,
|
||||||
|
user=cups.getUser ())
|
||||||
|
- show_info_dialog (_("Submitted"),
|
||||||
|
- _("Maintenance command submitted as "
|
||||||
|
- "job %d") % job_id,
|
||||||
|
+ show_info_dialog (TEXT_submitted,
|
||||||
|
+ TEXT_maintenance_cmd_submitted % job_id,
|
||||||
|
parent=self.parent)
|
||||||
|
except cups.IPPError as e:
|
||||||
|
(e, msg) = e.args
|
||||||
|
if (e == cups.IPP_NOT_AUTHORIZED and
|
||||||
|
self.printer.name != 'localhost'):
|
||||||
|
- show_error_dialog (_("Not possible"),
|
||||||
|
- _("The remote server did not accept "
|
||||||
|
- "the print job, most likely "
|
||||||
|
- "because the printer is not "
|
||||||
|
- "shared."),
|
||||||
|
+ show_error_dialog (TEXT_not_possible,
|
||||||
|
+ TEXT_remote_srv_not_accept,
|
||||||
|
self.parent)
|
||||||
|
else:
|
||||||
|
show_IPP_Error(e, msg, self.parent)
|
||||||
|
@@ -1315,9 +1327,8 @@ class PrinterPropertiesDialog(GtkGUI):
|
||||||
|
|
||||||
|
if e in [cups.IPP_SERVICE_UNAVAILABLE,
|
||||||
|
cups.IPP_INTERNAL_ERROR]:
|
||||||
|
- show_dialog(_("Raw Queue"),
|
||||||
|
- _("Unable to get queue details. Treating queue "
|
||||||
|
- "as raw."),
|
||||||
|
+ show_dialog(TEXT_raw_queue,
|
||||||
|
+ TEXT_unable_get_queue,
|
||||||
|
Gtk.MessageType.ERROR,
|
||||||
|
self.parent)
|
||||||
|
|
||||||
|
@@ -1328,14 +1339,12 @@ class PrinterPropertiesDialog(GtkGUI):
|
||||||
|
# NULL without setting an IPP error (so it'll be something
|
||||||
|
# like a failed connection), or the PPD could not be parsed.
|
||||||
|
if str (e).startswith ("ppd"):
|
||||||
|
- show_error_dialog (_("Error"),
|
||||||
|
- _("The PPD file for this queue "
|
||||||
|
- "is damaged."),
|
||||||
|
+ show_error_dialog (TEXT_error,
|
||||||
|
+ TEXT_ppd_file_damaged,
|
||||||
|
self.parent)
|
||||||
|
else:
|
||||||
|
- show_error_dialog (_("Error"),
|
||||||
|
- _("There was a problem connecting to "
|
||||||
|
- "the CUPS server."),
|
||||||
|
+ show_error_dialog (TEXT_error,
|
||||||
|
+ TEXT_problem_connect,
|
||||||
|
self.parent)
|
||||||
|
raise
|
||||||
|
|
||||||
|
diff --git a/pysmb.py b/pysmb.py
|
||||||
|
index b9afe62..d373dd3 100644
|
||||||
|
--- a/pysmb.py
|
||||||
|
+++ b/pysmb.py
|
||||||
|
@@ -31,6 +31,14 @@ import pwd
|
||||||
|
import smbc
|
||||||
|
from debug import *
|
||||||
|
|
||||||
|
+TEXT_not_authorized = _("Not authorized")
|
||||||
|
+TEXT_password_incorrect = _("The password may be incorrect.")
|
||||||
|
+TEXT_autch = _("Authentication")
|
||||||
|
+TEXT_autch_header = _("You must log in to access %s.")
|
||||||
|
+TEXT_user = _("Username:")
|
||||||
|
+TEXT_domain = _("Domain:")
|
||||||
|
+TEXT_password = _("Password:")
|
||||||
|
+
|
||||||
|
class _None(RuntimeError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@@ -87,15 +95,15 @@ class AuthContext:
|
||||||
|
modal=True, destroy_with_parent=True,
|
||||||
|
message_type=Gtk.MessageType.ERROR,
|
||||||
|
buttons=Gtk.ButtonsType.CLOSE)
|
||||||
|
- d.set_title (_("Not authorized"))
|
||||||
|
+ d.set_title (TEXT_not_authorized)
|
||||||
|
d.set_markup ('<span weight="bold" size="larger">' +
|
||||||
|
- _("Not authorized") + '</span>\n\n' +
|
||||||
|
- _("The password may be incorrect."))
|
||||||
|
+ TEXT_not_authorized + '</span>\n\n' +
|
||||||
|
+ TEXT_password_incorrect)
|
||||||
|
d.run ()
|
||||||
|
d.destroy ()
|
||||||
|
|
||||||
|
# After that, prompt
|
||||||
|
- d = Gtk.Dialog (title=_("Authentication"),
|
||||||
|
+ d = Gtk.Dialog (title=TEXT_autch,
|
||||||
|
transient_for=self.parent,
|
||||||
|
modal=True)
|
||||||
|
d.add_buttons (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
|
||||||
|
@@ -111,7 +119,7 @@ class AuthContext:
|
||||||
|
hbox.pack_start (image, False, False, 0)
|
||||||
|
vbox = Gtk.VBox (False, 12)
|
||||||
|
label = Gtk.Label(label='<span weight="bold" size="larger">' +
|
||||||
|
- _("You must log in to access %s.")
|
||||||
|
+ TEXT_autch_header
|
||||||
|
% self.for_server +
|
||||||
|
'</span>')
|
||||||
|
label.set_use_markup (True)
|
||||||
|
@@ -122,13 +130,13 @@ class AuthContext:
|
||||||
|
grid = Gtk.Grid()
|
||||||
|
grid.set_row_spacing (6)
|
||||||
|
grid.set_column_spacing (6)
|
||||||
|
- grid.attach (Gtk.Label(label=_("Username:")), 0, 0, 1, 1)
|
||||||
|
+ grid.attach (Gtk.Label(label=TEXT_user), 0, 0, 1, 1)
|
||||||
|
username_entry = Gtk.Entry ()
|
||||||
|
grid.attach (username_entry, 1, 0, 1, 1)
|
||||||
|
- grid.attach (Gtk.Label(label=_("Domain:")), 0, 1, 1, 1)
|
||||||
|
+ grid.attach (Gtk.Label(label=TEXT_domain), 0, 1, 1, 1)
|
||||||
|
domain_entry = Gtk.Entry ()
|
||||||
|
grid.attach (domain_entry, 1, 1, 1, 1)
|
||||||
|
- grid.attach (Gtk.Label(label=_("Password:")), 0, 2, 1, 1)
|
||||||
|
+ grid.attach (Gtk.Label(label=TEXT_password), 0, 2, 1, 1)
|
||||||
|
password_entry = Gtk.Entry ()
|
||||||
|
password_entry.set_activates_default (True)
|
||||||
|
password_entry.set_visibility (False)
|
||||||
|
diff --git a/system-config-printer.py b/system-config-printer.py
|
||||||
|
index f3e2663..d134b46 100755
|
||||||
|
--- a/system-config-printer.py
|
||||||
|
+++ b/system-config-printer.py
|
||||||
|
@@ -104,6 +104,10 @@ sys.path.append (pkgdata)
|
||||||
|
PlugWindow = None
|
||||||
|
PlugWindowId = None
|
||||||
|
|
||||||
|
+# MSVSphere
|
||||||
|
+TEXT_test_page = _("Print Test Page")
|
||||||
|
+TEXT_test_page_ask = _("Would you like to print a test page?")
|
||||||
|
+
|
||||||
|
#set program name
|
||||||
|
GLib.set_prgname("system-config-printer")
|
||||||
|
|
||||||
|
@@ -2028,9 +2032,9 @@ class GUI(GtkGUI):
|
||||||
|
modal=True, destroy_with_parent=True,
|
||||||
|
message_type=Gtk.MessageType.QUESTION,
|
||||||
|
buttons=Gtk.ButtonsType.NONE,
|
||||||
|
- text=_("Would you like to print a test page?"))
|
||||||
|
+ text=TEXT_test_page_ask)
|
||||||
|
q.add_buttons (Gtk.STOCK_CANCEL, Gtk.ResponseType.NO,
|
||||||
|
- _("Print Test Page"), Gtk.ResponseType.YES)
|
||||||
|
+ TEXT_test_page, Gtk.ResponseType.YES)
|
||||||
|
response = q.run ()
|
||||||
|
q.destroy ()
|
||||||
|
if response == Gtk.ResponseType.YES:
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
From 3fee7c63c3aba395a3d8cf0bf4ea0fd2fae695ae Mon Sep 17 00:00:00 2001
|
||||||
|
From: Laurent Bigonville <bigon@bigon.be>
|
||||||
|
Date: Mon, 26 Feb 2018 11:54:10 +0100
|
||||||
|
Subject: [PATCH] Require proper version of GDK and GTK in scp-dbus-service as
|
||||||
|
well
|
||||||
|
|
||||||
|
scp-dbus-service can be D-Bus activated, that means that
|
||||||
|
gi.require_version() is not called before.
|
||||||
|
|
||||||
|
That needs to be kept in sync with the required version in the main
|
||||||
|
program file.
|
||||||
|
---
|
||||||
|
scp-dbus-service.py | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/scp-dbus-service.py b/scp-dbus-service.py
|
||||||
|
index f0f51efc..3aefc6c6 100644
|
||||||
|
--- a/scp-dbus-service.py
|
||||||
|
+++ b/scp-dbus-service.py
|
||||||
|
@@ -21,9 +21,12 @@
|
||||||
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
import dbus.service
|
||||||
|
+import gi
|
||||||
|
from gi.repository import GObject
|
||||||
|
from gi.repository import GLib
|
||||||
|
+gi.require_version('Gdk', '3.0')
|
||||||
|
from gi.repository import Gdk
|
||||||
|
+gi.require_version('Gtk', '3.0')
|
||||||
|
from gi.repository import Gtk
|
||||||
|
import sys
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
From d818802daefd66eafbcc1618dc731e65de3e08b8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Laurent Bigonville <bigon@bigon.be>
|
||||||
|
Date: Mon, 26 Feb 2018 13:59:26 +0100
|
||||||
|
Subject: [PATCH] Set programe name for scp-dbus-service as well
|
||||||
|
|
||||||
|
scp-dbus-service can be D-Bus activated, that means that the program
|
||||||
|
name is never set meaning that the icon and the fancy name in the window
|
||||||
|
list is never set.
|
||||||
|
|
||||||
|
This completes the fix for bug #53
|
||||||
|
---
|
||||||
|
scp-dbus-service.py | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/scp-dbus-service.py b/scp-dbus-service.py
|
||||||
|
index 3aefc6c6..1338836b 100644
|
||||||
|
--- a/scp-dbus-service.py
|
||||||
|
+++ b/scp-dbus-service.py
|
||||||
|
@@ -20,8 +20,8 @@
|
||||||
|
## along with this program; if not, write to the Free Software
|
||||||
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
-import dbus.service
|
||||||
|
import gi
|
||||||
|
+import dbus.service
|
||||||
|
from gi.repository import GObject
|
||||||
|
from gi.repository import GLib
|
||||||
|
gi.require_version('Gdk', '3.0')
|
||||||
|
@@ -55,6 +55,9 @@ CONFIG_JOBVIEWER_IFACE=CONFIG_IFACE + ".JobViewer"
|
||||||
|
g_ppds = None
|
||||||
|
g_killtimer = None
|
||||||
|
|
||||||
|
+#set program name
|
||||||
|
+GLib.set_prgname("system-config-printer")
|
||||||
|
+
|
||||||
|
class FetchedPPDs(GObject.GObject):
|
||||||
|
__gsignals__ = {
|
||||||
|
'ready': (GObject.SIGNAL_RUN_LAST, None, ()),
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 96e1f5b242f4be5b20d408e6f526caaaecf34a48 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Laurent Bigonville <bigon@bigon.be>
|
||||||
|
Date: Mon, 26 Feb 2018 11:17:22 +0100
|
||||||
|
Subject: [PATCH] Use ValueError instead of ImportError to catch exception when
|
||||||
|
importing GIR bindings
|
||||||
|
|
||||||
|
When importing specific version of GIR bindings, the ValueError
|
||||||
|
exception is raised instead of ImportError.
|
||||||
|
|
||||||
|
This should make libsecret optional as intended
|
||||||
|
|
||||||
|
Fixes: #94
|
||||||
|
---
|
||||||
|
jobviewer.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/jobviewer.py b/jobviewer.py
|
||||||
|
index 6d9309ff..16b20300 100644
|
||||||
|
--- a/jobviewer.py
|
||||||
|
+++ b/jobviewer.py
|
||||||
|
@@ -57,7 +57,7 @@ try:
|
||||||
|
gi.require_version('Secret', '1')
|
||||||
|
from gi.repository import Secret
|
||||||
|
USE_SECRET=True
|
||||||
|
-except ImportError:
|
||||||
|
+except ValueError:
|
||||||
|
USE_SECRET=False
|
||||||
|
|
||||||
|
import gettext
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,148 @@
|
|||||||
|
From 42d95b7560c26f0fdf3b4f46823843861948c136 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||||
|
Date: Thu, 30 Aug 2018 11:52:48 +0200
|
||||||
|
Subject: [PATCH] define classes for Secret only when libsecret is installed
|
||||||
|
(https://github.com/zdohnal/system-config-printer/issues/118,
|
||||||
|
https://github.com/zdohnal/system-config-printer/issues/115)
|
||||||
|
|
||||||
|
---
|
||||||
|
jobviewer.py | 123 ++++++++++++++++++++++++++-------------------------
|
||||||
|
1 file changed, 62 insertions(+), 61 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/jobviewer.py b/jobviewer.py
|
||||||
|
index 16b20300..86f5feaf 100644
|
||||||
|
--- a/jobviewer.py
|
||||||
|
+++ b/jobviewer.py
|
||||||
|
@@ -73,67 +73,68 @@ SEARCHING_ICON="document-print-preview"
|
||||||
|
# We need to call Notify.init before we can check the server for caps
|
||||||
|
Notify.init('System Config Printer Notification')
|
||||||
|
|
||||||
|
-NETWORK_PASSWORD = Secret.Schema.new("org.system.config.printer.store", Secret.SchemaFlags.NONE,
|
||||||
|
- {
|
||||||
|
- "user": Secret.SchemaAttributeType.STRING,
|
||||||
|
- "domain": Secret.SchemaAttributeType.STRING,
|
||||||
|
- "object": Secret.SchemaAttributeType.STRING,
|
||||||
|
- "protocol": Secret.SchemaAttributeType.STRING,
|
||||||
|
- "port": Secret.SchemaAttributeType.INTEGER,
|
||||||
|
- "server": Secret.SchemaAttributeType.STRING,
|
||||||
|
- "authtype": Secret.SchemaAttributeType.STRING,
|
||||||
|
- "uri": Secret.SchemaAttributeType.STRING,
|
||||||
|
- }
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-class ServiceGet:
|
||||||
|
- service = Secret.Service()
|
||||||
|
-
|
||||||
|
- def on_get_service(self, source, result, unused):
|
||||||
|
- service = Secret.Service.get_finish(result)
|
||||||
|
-
|
||||||
|
- def __init__(self):
|
||||||
|
- Secret.Service.get(0,
|
||||||
|
- None,
|
||||||
|
- self.on_get_service,
|
||||||
|
- None)
|
||||||
|
-
|
||||||
|
- def get_service(self):
|
||||||
|
- return ServiceGet.service
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-class ItemSearch:
|
||||||
|
- items = list()
|
||||||
|
-
|
||||||
|
- def on_search_item(self, source, result, unused):
|
||||||
|
- items = Secret.Service.search_finish(None, result)
|
||||||
|
-
|
||||||
|
- def __init__(self, service, attrs):
|
||||||
|
- Secret.Service.search(service,
|
||||||
|
- NETWORK_PASSWORD,
|
||||||
|
- attrs,
|
||||||
|
- Secret.SearchFlags.LOAD_SECRETS,
|
||||||
|
- None,
|
||||||
|
- self.on_search_item,
|
||||||
|
- None)
|
||||||
|
-
|
||||||
|
- def get_items(self):
|
||||||
|
- return ItemSearch.items
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-class PasswordStore:
|
||||||
|
- def __init__(self, attrs, name, secret):
|
||||||
|
- Secret.password_store(NETWORK_PASSWORD,
|
||||||
|
- attrs,
|
||||||
|
- Secret.COLLECTION_DEFAULT,
|
||||||
|
- name,
|
||||||
|
- secret,
|
||||||
|
- None,
|
||||||
|
- self.on_password_stored)
|
||||||
|
-
|
||||||
|
- def on_password_stored(self, source, result, unused):
|
||||||
|
- Secret.password_store_finish(result)
|
||||||
|
+if USE_SECRET:
|
||||||
|
+ NETWORK_PASSWORD = Secret.Schema.new("org.system.config.printer.store", Secret.SchemaFlags.NONE,
|
||||||
|
+ {
|
||||||
|
+ "user": Secret.SchemaAttributeType.STRING,
|
||||||
|
+ "domain": Secret.SchemaAttributeType.STRING,
|
||||||
|
+ "object": Secret.SchemaAttributeType.STRING,
|
||||||
|
+ "protocol": Secret.SchemaAttributeType.STRING,
|
||||||
|
+ "port": Secret.SchemaAttributeType.INTEGER,
|
||||||
|
+ "server": Secret.SchemaAttributeType.STRING,
|
||||||
|
+ "authtype": Secret.SchemaAttributeType.STRING,
|
||||||
|
+ "uri": Secret.SchemaAttributeType.STRING,
|
||||||
|
+ }
|
||||||
|
+ )
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ class ServiceGet:
|
||||||
|
+ service = Secret.Service()
|
||||||
|
+
|
||||||
|
+ def on_get_service(self, source, result, unused):
|
||||||
|
+ service = Secret.Service.get_finish(result)
|
||||||
|
+
|
||||||
|
+ def __init__(self):
|
||||||
|
+ Secret.Service.get(0,
|
||||||
|
+ None,
|
||||||
|
+ self.on_get_service,
|
||||||
|
+ None)
|
||||||
|
+
|
||||||
|
+ def get_service(self):
|
||||||
|
+ return ServiceGet.service
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ class ItemSearch:
|
||||||
|
+ items = list()
|
||||||
|
+
|
||||||
|
+ def on_search_item(self, source, result, unused):
|
||||||
|
+ items = Secret.Service.search_finish(None, result)
|
||||||
|
+
|
||||||
|
+ def __init__(self, service, attrs):
|
||||||
|
+ Secret.Service.search(service,
|
||||||
|
+ NETWORK_PASSWORD,
|
||||||
|
+ attrs,
|
||||||
|
+ Secret.SearchFlags.LOAD_SECRETS,
|
||||||
|
+ None,
|
||||||
|
+ self.on_search_item,
|
||||||
|
+ None)
|
||||||
|
+
|
||||||
|
+ def get_items(self):
|
||||||
|
+ return ItemSearch.items
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ class PasswordStore:
|
||||||
|
+ def __init__(self, attrs, name, secret):
|
||||||
|
+ Secret.password_store(NETWORK_PASSWORD,
|
||||||
|
+ attrs,
|
||||||
|
+ Secret.COLLECTION_DEFAULT,
|
||||||
|
+ name,
|
||||||
|
+ secret,
|
||||||
|
+ None,
|
||||||
|
+ self.on_password_stored)
|
||||||
|
+
|
||||||
|
+ def on_password_stored(self, source, result, unused):
|
||||||
|
+ Secret.password_store_finish(result)
|
||||||
|
|
||||||
|
|
||||||
|
class PrinterURIIndex:
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,66 @@
|
|||||||
|
From e7940de50a7164a2de82e003222ecbf8b10c9ad5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: xoduddk123 <xoduddk123@naver.com>
|
||||||
|
Date: Wed, 20 Jun 2018 12:24:13 +0900
|
||||||
|
Subject: [PATCH] encoding: Modified to use utf-8 in fdopen()
|
||||||
|
|
||||||
|
The following error occurred due to encoding problem in fdopen().
|
||||||
|
|
||||||
|
root@tykwon:~# cat /var/log/syslog
|
||||||
|
2018-02-12T17:08:24.208317+09:00 tykwon kernel: usb 1-1.2: new high-speed USB device number 4 using dwc_otg
|
||||||
|
2018-02-12T17:08:24.309341+09:00 tykwon kernel: usb 1-1.2: New USB device found, idVendor=03f0, idProduct=3b2a
|
||||||
|
2018-02-12T17:08:24.309398+09:00 tykwon kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
|
||||||
|
2018-02-12T17:08:24.309415+09:00 tykwon kernel: usb 1-1.2: Product: HP Color LaserJet MFP M277n
|
||||||
|
2018-02-12T17:08:24.309428+09:00 tykwon kernel: usb 1-1.2: Manufacturer: Hewlett-Packard
|
||||||
|
2018-02-12T17:08:24.318314+09:00 tykwon kernel: usb 1-1.2: SerialNumber: VNBKK97643
|
||||||
|
2018-02-12T17:08:24.340967+09:00 tykwon root: loading HP Device 001 004
|
||||||
|
2018-02-12T17:08:25.537224+09:00 tykwon python: io/hpmud/musb.c 2185: [307] hpmud_make_usb_uri() bus=001 dev=004
|
||||||
|
2018-02-12T17:08:25.540188+09:00 tykwon python: io/hpmud/musb.c 2282: hpmud_make_usb_uri() uri=hp:/usb/HP_Color_LaserJet_MFP_M277n?serial=VNBKK97643 bytes_read=53
|
||||||
|
2018-02-12T17:08:26.510021+09:00 tykwon kernel: usblp 1-1.2:1.1: usblp0: USB Bidirectional printer dev 4 if 1 alt 0 proto 2 vid 0x03F0 pid 0x3B2A
|
||||||
|
2018-02-12T17:08:26.518337+09:00 tykwon kernel: usbcore: registered new interface driver usblp
|
||||||
|
2018-02-12T17:08:26.523457+09:00 tykwon systemd[1]: Created slice system-configure\x2dprinter.slice.
|
||||||
|
2018-02-12T17:08:26.525835+09:00 tykwon systemd[1]: Started Configure Plugged-In Printer.
|
||||||
|
2018-02-12T17:08:26.527132+09:00 tykwon systemd[1]: Reached target Printer.
|
||||||
|
2018-02-12T17:08:26.546282+09:00 tykwon udev-configure-printer: add usb-001-004
|
||||||
|
2018-02-12T17:08:26.688365+09:00 tykwon udev-configure-printer: device devpath is /devices/lm1/usb1/1-1/1-1.2
|
||||||
|
2018-02-12T17:08:26.700706+09:00 tykwon udev-configure-printer: MFG:Hewlett-Packard MDL:HP Color LaserJet MFP M277n SERN:- serial:VNBKK97643
|
||||||
|
2018-02-12T17:08:31.788344+09:00 tykwon kernel: usblp0: removed
|
||||||
|
2018-02-12T17:08:31.798343+09:00 tykwon kernel: usblp 1-1.2:1.1: usblp0: USB Bidirectional printer dev 4 if 1 alt 0 proto 2 vid 0x03F0 pid 0x3B2A
|
||||||
|
2018-02-12T17:08:31.870363+09:00 tykwon udev-configure-printer: URI contains USB serial number
|
||||||
|
2018-02-12T17:08:31.871482+09:00 tykwon udev-configure-printer: URI match: usb://HP/Color%20LaserJet%20MFP%20M277n?serial=VNBKK97643&interface=1
|
||||||
|
2018-02-12T17:08:31.872536+09:00 tykwon udev-configure-printer: SERN field matches USB serial number
|
||||||
|
2018-02-12T17:08:31.873629+09:00 tykwon udev-configure-printer: URI match: hp:/usb/HP_Color_LaserJet_MFP_M277n?serial=VNBKK97643
|
||||||
|
2018-02-12T17:08:31.874594+09:00 tykwon udev-configure-printer: URI of detected printer: usb://HP/Color%20LaserJet%20MFP%20M277n?serial=VNBKK97643&interface=1, normalized: color laserjet mfp m277n serial vnbkk97643 interface 1
|
||||||
|
2018-02-12T17:08:31.875782+09:00 tykwon udev-configure-printer: URI of print queue: hp:/usb/HP_LaserJet_Professional_P1106?serial=000000000QN926Y1PR1a, normalized: laserjet professional p1106 serial 000000000qn926y1pr1a
|
||||||
|
2018-02-12T17:08:31.876985+09:00 tykwon udev-configure-printer: URI of detected printer: hp:/usb/HP_Color_LaserJet_MFP_M277n?serial=VNBKK97643, normalized: color laserjet mfp m277n serial vnbkk97643
|
||||||
|
2018-02-12T17:08:31.878166+09:00 tykwon udev-configure-printer: About to add queue for hp:/usb/HP_Color_LaserJet_MFP_M277n?serial=VNBKK97643
|
||||||
|
2018-02-12T17:08:34.760340+09:00 tykwon udev-add-printer: add_queue: URIs=['hp:/usb/HP_Color_LaserJet_MFP_M277n?serial=VNBKK97643', 'usb://HP/Color%20LaserJet%20MFP%20M277n?serial=VNBKK97643&interface=1']
|
||||||
|
2018-02-12T17:08:34.766174+09:00 tykwon udev-add-printer: D-Bus method call failed: org.freedesktop.DBus.Error.ServiceUnknown: The name com.redhat.NewPrinterNotification was not provided by any .service files
|
||||||
|
2018-02-12T17:08:41.722389+09:00 tykwon udev-add-printer: PPD: hplip:1/hp-color_laserjet_pro_mfp_m277-ps.ppd; Status: 0
|
||||||
|
2018-02-12T17:08:45.763635+09:00 tykwon udev-add-printer: File "/lib/udev/udev-add-printer", line 232, in <module>#012 add_queue (sys.argv[1], sys.argv[2:])
|
||||||
|
2018-02-12T17:08:45.764840+09:00 tykwon udev-add-printer: File "/lib/udev/udev-add-printer", line 169, in add_queue#012 installer)
|
||||||
|
2018-02-12T17:08:45.765979+09:00 tykwon udev-add-printer: File "/lib/udev/udev-add-printer", line 75, in create_queue#012 (pkgs, exes) = cupshelpers.missingPackagesAndExecutables (ppd)
|
||||||
|
2018-02-12T17:08:45.767236+09:00 tykwon udev-add-printer: File "/usr/lib/python3.5/site-packages/cupshelpers/cupshelpers.py", line 889, in missingPackagesAndExecutables#012 executables = missingExecutables(ppd)
|
||||||
|
2018-02-12T17:08:45.768527+09:00 tykwon udev-add-printer: File "/usr/lib/python3.5/site-packages/cupshelpers/cupshelpers.py", line 864, in missingExecutables#012 for line in f:
|
||||||
|
2018-02-12T17:08:45.769834+09:00 tykwon udev-add-printer: File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode#012 return codecs.ascii_decode(input, self.errors)[0]
|
||||||
|
2018-02-12T17:08:45.771056+09:00 tykwon udev-add-printer: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4175: ordinal not in range(128)
|
||||||
|
root@tykwon:~#
|
||||||
|
---
|
||||||
|
cupshelpers/cupshelpers.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/cupshelpers/cupshelpers.py b/cupshelpers/cupshelpers.py
|
||||||
|
index 978ab801..8fe7ead4 100755
|
||||||
|
--- a/cupshelpers/cupshelpers.py
|
||||||
|
+++ b/cupshelpers/cupshelpers.py
|
||||||
|
@@ -859,7 +859,7 @@ def missingExecutables(ppd):
|
||||||
|
os.unlink (tmpfname)
|
||||||
|
ppd.writeFd (tmpfd)
|
||||||
|
os.lseek (tmpfd, 0, os.SEEK_SET)
|
||||||
|
- f = os.fdopen (tmpfd, "rt")
|
||||||
|
+ f = os.fdopen (tmpfd, "rt", encoding="utf-8")
|
||||||
|
search = "*cupsFilter:"
|
||||||
|
for line in f:
|
||||||
|
if line.startswith (search):
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 8a623c2f038dd85da3df647531c6a881d235523c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||||
|
Date: Fri, 23 Mar 2018 13:43:41 +0100
|
||||||
|
Subject: [PATCH] require Gtk and Gdk version 3.0 in asyncpk1.py
|
||||||
|
|
||||||
|
---
|
||||||
|
asyncpk1.py | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/asyncpk1.py b/asyncpk1.py
|
||||||
|
index 65d2e768..849c995f 100644
|
||||||
|
--- a/asyncpk1.py
|
||||||
|
+++ b/asyncpk1.py
|
||||||
|
@@ -22,7 +22,9 @@ import cups
|
||||||
|
import dbus
|
||||||
|
from functools import reduce
|
||||||
|
try:
|
||||||
|
+ gi.require_version('Gdk', '3.0')
|
||||||
|
from gi.repository import Gdk
|
||||||
|
+ gi.require_version('Gtk', '3.0')
|
||||||
|
from gi.repository import Gtk
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
diff -up system-config-printer-1.5.11/authconn.py.authdialog system-config-printer-1.5.11/authconn.py
|
||||||
|
--- system-config-printer-1.5.11/authconn.py.authdialog 2018-02-15 11:42:35.074157581 +0100
|
||||||
|
+++ system-config-printer-1.5.11/authconn.py 2018-02-15 11:43:51.652437359 +0100
|
||||||
|
@@ -78,11 +78,9 @@ class AuthDialog(Gtk.Dialog):
|
||||||
|
field = auth_info_required[i]
|
||||||
|
label = Gtk.Label (label=_(self.AUTH_FIELD.get (field, field)))
|
||||||
|
label.set_alignment (0, 0.5)
|
||||||
|
- grid.attach (label, 0, 1, i, i + 1)
|
||||||
|
grid.attach (label, 0, i, 1, 1)
|
||||||
|
entry = Gtk.Entry ()
|
||||||
|
entry.set_visibility (field != 'password')
|
||||||
|
- grid.attach (entry, 1, 2, i, i + 1, 0, 0)
|
||||||
|
grid.attach (entry, 1, i, 1, 1)
|
||||||
|
self.field_entry.append (entry)
|
||||||
|
|
Loading…
Reference in new issue