yazıcı için paketler
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
diff -Nur -x '*.orig' -x '*~' a/scp-dbus-service.py b/scp-dbus-service.py
|
||||
--- a/scp-dbus-service.py 2013-09-20 22:26:27.000000000 +0200
|
||||
+++ b/scp-dbus-service.py 2013-10-24 13:12:44.998717234 +0200
|
||||
@@ -367,7 +367,7 @@
|
||||
pass
|
||||
|
||||
@dbus.service.signal(dbus_interface=CONFIG_NEWPRINTERDIALOG_IFACE,
|
||||
- signature='a{s}')
|
||||
+ signature='a(s)')
|
||||
def DriverDownloadChecked(self, installed_files):
|
||||
pass
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
Index: system-config-printer-1.1.11/system-config-printer.py
|
||||
===================================================================
|
||||
--- system-config-printer-1.1.11.orig/system-config-printer.py
|
||||
+++ system-config-printer-1.1.11/system-config-printer.py
|
||||
@@ -1428,7 +1428,7 @@ class GUI(GtkGUI, monitor.Watcher):
|
||||
def_emblem = None
|
||||
emblem = None
|
||||
if name == self.default_printer:
|
||||
- def_emblem = 'emblem-default'
|
||||
+ def_emblem = 'dialog-ok'
|
||||
elif name == userdef:
|
||||
def_emblem = 'emblem-favorite'
|
||||
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
diff -up system-config-printer-1.5.7/cupshelpers/cupshelpers.py.device-sorting system-config-printer-1.5.7/cupshelpers/cupshelpers.py
|
||||
--- system-config-printer-1.5.7/cupshelpers/cupshelpers.py.device-sorting 2015-04-23 16:05:58.000000000 +0100
|
||||
+++ system-config-printer-1.5.7/cupshelpers/cupshelpers.py 2015-05-26 09:57:43.583569255 +0100
|
||||
@@ -547,68 +547,68 @@ class Device:
|
||||
Compare devices by order of preference.
|
||||
"""
|
||||
if other == None:
|
||||
- return 1
|
||||
+ return True
|
||||
|
||||
if self.is_class != other.is_class:
|
||||
if other.is_class:
|
||||
- return 1
|
||||
- return -1
|
||||
+ return True
|
||||
+ return False
|
||||
if not self.is_class and (self.type != other.type):
|
||||
# "hp"/"hpfax" before "usb" before * before "parallel" before
|
||||
# "serial"
|
||||
if other.type == "serial":
|
||||
- return 1
|
||||
+ return True
|
||||
if self.type == "serial":
|
||||
- return -1
|
||||
+ return False
|
||||
if other.type == "parallel":
|
||||
- return 1
|
||||
+ return True
|
||||
if self.type == "parallel":
|
||||
- return -1
|
||||
+ return False
|
||||
if other.type == "hp":
|
||||
- return -1
|
||||
+ return False
|
||||
if self.type == "hp":
|
||||
- return 1
|
||||
+ return True
|
||||
if other.type == "hpfax":
|
||||
- return -1
|
||||
+ return False
|
||||
if self.type == "hpfax":
|
||||
- return 1
|
||||
+ return True
|
||||
if other.type == "dnssd":
|
||||
- return -1
|
||||
+ return False
|
||||
if self.type == "dnssd":
|
||||
- return 1
|
||||
+ return True
|
||||
if other.type == "socket":
|
||||
- return -1
|
||||
+ return False
|
||||
if self.type == "socket":
|
||||
- return 1
|
||||
+ return True
|
||||
if other.type == "lpd":
|
||||
- return -1
|
||||
+ return False
|
||||
if self.type == "lpd":
|
||||
- return 1
|
||||
+ return True
|
||||
if other.type == "ipps":
|
||||
- return -1
|
||||
+ return False
|
||||
if self.type == "ipps":
|
||||
- return 1
|
||||
+ return True
|
||||
if other.type == "ipp":
|
||||
- return -1
|
||||
+ return False
|
||||
if self.type == "ipp":
|
||||
- return 1
|
||||
+ return True
|
||||
if other.type == "usb":
|
||||
- return -1
|
||||
+ return False
|
||||
if self.type == "usb":
|
||||
- return 1
|
||||
+ return True
|
||||
if self.type == "dnssd" and other.type == "dnssd":
|
||||
if other.uri.find("._pdl-datastream") != -1: # Socket
|
||||
- return -1
|
||||
+ return False
|
||||
if self.uri.find("._pdl-datastream") != -1:
|
||||
- return 1
|
||||
+ return True
|
||||
if other.uri.find("._printer") != -1: # LPD
|
||||
- return -1
|
||||
+ return False
|
||||
if self.uri.find("._printer") != -1:
|
||||
- return 1
|
||||
+ return True
|
||||
if other.uri.find("._ipp") != -1: # IPP
|
||||
- return -1
|
||||
+ return False
|
||||
if self.uri.find("._ipp") != -1:
|
||||
- return 1
|
||||
+ return True
|
||||
result = bool(self.id) < bool(other.id)
|
||||
if not result:
|
||||
result = self.info < other.info
|
||||
diff -up system-config-printer-1.5.7/test_PhysicalDevice.py.device-sorting system-config-printer-1.5.7/test_PhysicalDevice.py
|
||||
--- system-config-printer-1.5.7/test_PhysicalDevice.py.device-sorting 2015-04-23 16:22:28.000000000 +0100
|
||||
+++ system-config-printer-1.5.7/test_PhysicalDevice.py 2015-05-26 09:57:43.583569255 +0100
|
||||
@@ -49,3 +49,21 @@ def run_test():
|
||||
phys.add_device (device)
|
||||
devices = phys.get_devices ()
|
||||
assert devices[0].uri.startswith ("hp")
|
||||
+
|
||||
+ dev1 = cupshelpers.Device("hp:/usb/HP_Color_LaserJet_CP3525?serial=CNCTC8G0QX",
|
||||
+ **{'device-id':'MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PJL,PCLXL,PCL,POSTSCRIPT,PDF;MDL:HP Color LaserJet CP3525;CLS:PRINTER;DES:Hewlett-Packard Color LaserJet CP3525;',
|
||||
+ 'device-make-and-model':'HP Color LaserJet CP3525',
|
||||
+ 'device-class':'direct'})
|
||||
+ phys = PhysicalDevice (dev1)
|
||||
+ dev2 = cupshelpers.Device('usb://HP/Color%20LaserJet%20CP3525?serial=CNCTC8G0QX',
|
||||
+ **{'device-id':'MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PJL,PCLXL,PCL,POSTSCRIPT,PDF;MDL:HP Color LaserJet CP3525;CLS:PRINTER;DES:Hewlett-Packard Color LaserJet CP3525;',
|
||||
+ 'device-make-and-model':'HP Color LaserJet CP3525',
|
||||
+ 'device-class':'direct'})
|
||||
+
|
||||
+ # hp device should sort < usb device
|
||||
+ assert dev1 < dev2
|
||||
+
|
||||
+ phys.add_device (dev2)
|
||||
+ devices = phys.get_devices ()
|
||||
+ assert devices[0] < devices[1]
|
||||
+ assert devices[0].uri.startswith ("hp")
|
||||
@@ -0,0 +1,9 @@
|
||||
diff -up system-config-printer-1.5.7/udev/udev-add-printer.shbang system-config-printer-1.5.7/udev/udev-add-printer
|
||||
--- system-config-printer-1.5.7/udev/udev-add-printer.shbang 2015-04-23 16:05:58.000000000 +0100
|
||||
+++ system-config-printer-1.5.7/udev/udev-add-printer 2015-05-26 09:15:43.761220755 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python3 -s -B
|
||||
+#!/usr/bin/python3 -sB
|
||||
|
||||
## udev-add-printer
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
d /run/udev-configure-printer 0755 root root
|
||||
+3385
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user