~ubuntu-branches/ubuntu/natty/system-config-printer/natty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/37_jobviewer-attributes-window-convert-numbers-to-strings.patch

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2011-03-21 23:09:52 UTC
  • Revision ID: james.westby@ubuntu.com-20110321230952-oyiyq4th3bp6vvid
Tags: 1.3.1+20110222-0ubuntu9
debian/patches/37_jobviewer-attributes-window-convert-numbers-to-strings.patch:
In the code for the job attributes window in the job viewer (right-click a
job and choose "View Attributes") on two points arguments have to be
converted to strings. Once for the notebook page labels as the job IDs
are numbers, and second for the attribute values, they can be numbers
or even data structures (LP: #733088).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -Nur -x '*.orig' -x '*~' system-config-printer-1.3.1+20110222//jobviewer.py system-config-printer-1.3.1+20110222.new//jobviewer.py
 
2
--- system-config-printer-1.3.1+20110222//jobviewer.py  2011-02-16 23:25:01.000000000 +0100
 
3
+++ system-config-printer-1.3.1+20110222.new//jobviewer.py      2011-03-21 23:05:02.746420010 +0100
 
4
@@ -1441,7 +1441,7 @@
 
5
             if jobid not in self.jobs_attrs:
 
6
                 # add new notebook page with scrollable treeview
 
7
                 scrolledwindow = gtk.ScrolledWindow()
 
8
-                label = gtk.Label(jobid) # notebook page has label with jobid
 
9
+                label = gtk.Label(str(jobid)) # notebook page has label with jobid
 
10
                 page_index = self.notebook.append_page(scrolledwindow, label)
 
11
                 attr_treeview = gtk.TreeView()
 
12
                 scrolledwindow.add(attr_treeview)
 
13
@@ -1490,7 +1490,7 @@
 
14
             for name, value in attrs.iteritems():
 
15
                 if name in ['job-id', 'job-printer-up-time']:
 
16
                     continue
 
17
-                attr_store.append([name, value])
 
18
+                attr_store.append([name, str(value)])
 
19
 
 
20
     def job_is_active (self, jobdata):
 
21
         state = jobdata.get ('job-state', cups.IPP_JOB_CANCELED)