rpms/system-config-printer/F-13 system-config-printer-inklevel.patch, NONE, 1.1 system-config-printer.spec, 1.377, 1.378

Tim Waugh twaugh at fedoraproject.org
Thu Mar 25 16:29:11 UTC 2010


Author: twaugh

Update of /cvs/pkgs/rpms/system-config-printer/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv1277

Modified Files:
	system-config-printer.spec 
Added Files:
	system-config-printer-inklevel.patch 
Log Message:
* Thu Mar 25 2010 Tim Waugh <twaugh at redhat.com> - 1.2.0-8
- Make inklevel widget easier to read (bug #576930).


system-config-printer-inklevel.patch:
 gtkinklevel.py           |   30 +++++++++++++++++++++++++-----
 system-config-printer.py |    1 +
 2 files changed, 26 insertions(+), 5 deletions(-)

--- NEW FILE system-config-printer-inklevel.patch ---
diff -up system-config-printer-1.2.0/gtkinklevel.py.inklevel system-config-printer-1.2.0/gtkinklevel.py
--- system-config-printer-1.2.0/gtkinklevel.py.inklevel	2009-12-03 17:06:22.000000000 +0000
+++ system-config-printer-1.2.0/gtkinklevel.py	2010-03-25 16:25:55.108235939 +0000
@@ -1,7 +1,8 @@
 #!/usr/bin/env python
 
-## Copyright (C) 2009 Tim Waugh <twaugh at redhat.com>
-## Copyright (C) 2009 Red Hat, Inc.
+## Copyright (C) 2010 Red Hat, Inc.
+## Authors:
+##  Tim Waugh <twaugh at redhat.com>
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -56,10 +57,9 @@ class GtkInkLevel (gtk.DrawingArea):
         ctx.translate (thickness, thickness)
         ctx.scale (w - 2 * thickness, h - 2 * thickness)
         thickness = max (ctx.device_to_user_distance (thickness, thickness))
-        ctx.set_line_width (thickness)
-        self.draw (ctx)
+        self.draw (ctx, thickness)
 
-    def draw (self, ctx):
+    def draw (self, ctx, thickness):
         r = self._color.red / 65535.0
         g = self._color.green / 65535.0
         b = self._color.blue / 65535.0
@@ -72,6 +72,7 @@ class GtkInkLevel (gtk.DrawingArea):
         ctx.curve_to (0.0, 0.5, 0.1, 0.2, 0.5, 0.0)
         ctx.close_path ()
         ctx.set_source_rgb (r, g, b)
+        ctx.set_line_width (thickness)
         ctx.stroke_preserve ()
         if fill_point > 0.0:
             grad_width = 0.10
@@ -90,6 +91,25 @@ class GtkInkLevel (gtk.DrawingArea):
             ctx.set_source_rgb (1, 1, 1)
             ctx.fill ()
 
+        ctx.set_line_width (thickness / 2)
+
+        ctx.move_to (0.03, 0.5)
+        ctx.line_to (0.9, 0.5)
+        ctx.set_source_rgb (r, g, b)
+        ctx.set_dash ([0.1])
+        ctx.stroke ()
+
+        ctx.move_to (0, 0.75)
+        ctx.line_to (1, 0.75)
+        ctx.set_source_rgb (r, g, b)
+        ctx.set_dash ([0.05])
+        ctx.stroke ()
+
+        ctx.move_to (0.15, 0.25)
+        ctx.line_to (0.6, 0.25)
+        ctx.set_source_rgb (r, g, b)
+        ctx.stroke ()
+
 if __name__ == '__main__':
     # Try it out.
     import gobject
diff -up system-config-printer-1.2.0/system-config-printer.py.inklevel system-config-printer-1.2.0/system-config-printer.py
--- system-config-printer-1.2.0/system-config-printer.py.inklevel	2010-03-25 16:25:37.904233984 +0000
+++ system-config-printer-1.2.0/system-config-printer.py	2010-03-25 16:26:07.037359284 +0000
@@ -2681,6 +2681,7 @@ class GUI(GtkGUI, monitor.Watcher):
                 vbox = gtk.VBox (spacing=6)
                 subhbox = gtk.HBox ()
                 inklevel = gtkinklevel.GtkInkLevel (color, level)
+                inklevel.set_tooltip_text ("%d%%" % level)
                 subhbox.pack_start (inklevel, True, False, 0)
                 vbox.pack_start (subhbox, False, False, 0)
                 label = gtk.Label (name)


Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-13/system-config-printer.spec,v
retrieving revision 1.377
retrieving revision 1.378
diff -u -p -r1.377 -r1.378
--- system-config-printer.spec	24 Mar 2010 10:30:58 -0000	1.377
+++ system-config-printer.spec	25 Mar 2010 16:29:11 -0000	1.378
@@ -7,7 +7,7 @@
 Summary: A printer administration tool
 Name: system-config-printer
 Version: 1.2.0
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv2+
 URL: http://cyberelk.net/tim/software/system-config-printer/
 Group: System Environment/Base
@@ -26,6 +26,7 @@ Patch6: system-config-printer-cdi-filena
 Patch7: system-config-printer-reconnect-error.patch
 Patch8: system-config-printer-downloadable-drivers.patch
 Patch9: system-config-printer-JobCancel.patch
+Patch10: system-config-printer-inklevel.patch
 
 Patch100: system-config-printer-pycups-build.patch
 
@@ -114,6 +115,9 @@ printers.
 # Use new JobCancelPurge cups-pk-helper method (bug #576496).
 %patch9 -p1 -b .JobCancel
 
+# Make inklevel widget easier to read (bug #576930).
+%patch10 -p1 -b .inklevel
+
 pushd pycups-%{pycups_version}
 
 # Fixed pycups build with new distutils.
@@ -236,6 +240,9 @@ rm -rf %buildroot
 exit 0
 
 %changelog
+* Thu Mar 25 2010 Tim Waugh <twaugh at redhat.com> - 1.2.0-8
+- Make inklevel widget easier to read (bug #576930).
+
 * Wed Mar 24 2010 Tim Waugh <twaugh at redhat.com> - 1.2.0-7
 - Use new JobCancelPurge cups-pk-helper method (bug #576496).
 



More information about the scm-commits mailing list