Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158015 Details for
Bug 245929
Segfault in job option handling code
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
system-config-printer-job-options.patch
system-config-printer-job-options.patch (text/plain), 5.68 KB, created by
Tim Waugh
on 2007-06-27 14:15:58 UTC
(
hide
)
Description:
system-config-printer-job-options.patch
Filename:
MIME Type:
Creator:
Tim Waugh
Created:
2007-06-27 14:15:58 UTC
Size:
5.68 KB
patch
obsolete
>Index: system-config-printer.py >=================================================================== >RCS file: /usr/local/CVS/system-config-printer/system-config-printer.py,v >retrieving revision 1.108.2.15 >diff -d -u -r1.108.2.15 system-config-printer.py >--- system-config-printer.py 15 Nov 2006 16:12:24 -0000 1.108.2.15 >+++ system-config-printer.py 27 Jun 2007 14:06:47 -0000 >@@ -2,9 +2,9 @@ > > ## system-config-printer > >-## Copyright (C) 2006 Red Hat, Inc. >+## Copyright (C) 2006, 2007 Red Hat, Inc. >+## Copyright (C) 2006, 2007 Tim Waugh <twaugh@redhat.com> > ## Copyright (C) 2006 Florian Festi <ffesti@redhat.com> >-## Copyright (C) 2006 Tim Waugh <twaugh@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 >@@ -738,37 +738,45 @@ > self.btnPDelUser.set_sensitive(bool(rows)) > > # Server side options >+ def draw_server_side_options (self, editable=True): >+ rows = len (self.server_side_option_widgets) >+ if rows == 0: >+ self.tblServerOptions.hide_all () >+ return >+ >+ children = self.tblServerOptions.get_children () >+ for child in children: >+ self.tblServerOptions.remove (child) >+ self.tblServerOptions.resize (rows, 3) >+ i = 0 >+ for opt in self.server_side_option_widgets: >+ self.tblServerOptions.attach (opt.label, 0, 1, i, i + 1, >+ xoptions=gtk.FILL, >+ yoptions=gtk.FILL) >+ opt.label.set_alignment (0.5, 0.5) >+ self.tblServerOptions.attach (opt.selector, 1, 2, i, i + 1, >+ xoptions=gtk.FILL, >+ yoptions=0) >+ opt.selector.set_sensitive (editable) >+ >+ btn = gtk.Button(stock="gtk-remove") >+ btn.connect("clicked", self.removeOption_clicked) >+ btn.set_data("pyobject", opt) >+ btn.set_sensitive (editable) >+ self.tblServerOptions.attach (btn, 2, 3, i, i + 1, >+ xoptions=0, >+ yoptions=0) >+ i += 1 >+ >+ self.tblServerOptions.show_all () > > def add_option(self, name, value, supported, is_new=False, > editable=True): > option = options.OptionWidget(name, value, supported, > self.option_changed) > option.is_new = is_new >- rows = self.tblServerOptions.get_property("n-rows") >- self.tblServerOptions.resize(rows+1, 3) >- self.tblServerOptions.attach(option.label, 0, 1, rows, rows+1, >- xoptions=gtk.FILL, >- yoptions=gtk.FILL) >- option.label.set_alignment(0.0, 0.0) >- option.label.set_padding(5, 5) >- align = gtk.Alignment() >- align.add(option.selector) >- option.align = align >- self.tblServerOptions.attach(align, 1, 2, rows, rows+1, >- xoptions=gtk.FILL, >- yoptions=0) >- option.selector.set_sensitive(editable) >- if editable: >- # remove button >- btn = gtk.Button(stock="gtk-remove") >- btn.connect("clicked", self.removeOption_clicked) >- btn.set_data("pyobject", option) >- align = gtk.Alignment() >- align.add(btn) >- self.tblServerOptions.attach(align, 2, 3, rows, rows+1, >- xoptions=0, >- yoptions=gtk.FILL) >- option.remove_button = align >+ self.server_side_option_widgets.append (option) >+ self.draw_server_side_options (editable=editable) > self.server_side_options[name] = option > if name in self.changed: # was deleted before > option.is_new = False >@@ -778,15 +786,15 @@ > > def removeOption_clicked(self, button): > option = button.get_data("pyobject") >- self.tblServerOptions.remove(option.label) >- self.tblServerOptions.remove(option.align) >- self.tblServerOptions.remove(option.remove_button) >+ self.server_side_option_widgets.remove (option) >+ self.draw_server_side_options () > if option.is_new: > self.changed.discard(option) > else: > # keep name as reminder that option got deleted > self.changed.add(option.name) >- del self.server_side_options[option.name] >+ >+ del self.server_side_options[option.name] > > # re add to combobox > if option.name in self.printer.possible_attributes: >@@ -1217,20 +1225,18 @@ > if attr not in self.printer.attributes: > self.cmbentNewOption.append_text(attr) > >- self.tblServerOptions.resize(1, 3) >- for child in self.tblServerOptions.get_children(): >- self.tblServerOptions.remove(child) >+ self.server_side_option_widgets = [] >+ self.draw_server_side_options (editable=editable) > > attrs = printer.attributes.keys() > attrs.sort() > for attr in attrs: > value = printer.attributes[attr] >- supported = printer.possible_attributes[attr][1] >+ supported = "" >+ if self.printer.possible_attributes.has_key (attr): >+ supported = printer.possible_attributes[attr][1] > self.add_option(attr, value, supported, is_new=False, > editable=editable) >- >- self.tblServerOptions.show_all() >- self.tblServerOptions.queue_draw() > > if printer.is_class: > # remove InstallOptions tab
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 245929
: 158015