diff options
| author | Michael Vogt <egon@top> | 2005-11-29 17:31:21 +0100 |
|---|---|---|
| committer | Michael Vogt <egon@top> | 2005-11-29 17:31:21 +0100 |
| commit | a79e4fc80ef854844e560e5b547d1398ab149360 (patch) | |
| tree | e321ca95a5573529a4261ca1fdbd01b14c4a17af /SoftwareProperties | |
| parent | 4fce0fdfe15c8ab88d63e3919670e1371eb38fb9 (diff) | |
| download | python-apt-a79e4fc80ef854844e560e5b547d1398ab149360.tar.gz | |
* make the software preferences work again completely
Diffstat (limited to 'SoftwareProperties')
| -rw-r--r-- | SoftwareProperties/SoftwareProperties.py | 10 | ||||
| -rw-r--r-- | SoftwareProperties/__init__.py | 1 | ||||
| -rw-r--r-- | SoftwareProperties/aptsources.py | 6 | ||||
| -rw-r--r-- | SoftwareProperties/dialog_edit.py | 2 |
4 files changed, 13 insertions, 6 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 86586cc1..5c6e8fef 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -29,6 +29,7 @@ import apt_pkg import gobject import shutil import gettext +import os #sys.path.append("@prefix/share/update-manager/python") @@ -101,9 +102,12 @@ class SoftwareProperties(SimpleGladeApp): self.treeview1.set_model(self.source_store) tr = gtk.CellRendererText() + tr.set_property("xpad", 10) + tr.set_property("ypad", 10) source_col = gtk.TreeViewColumn("Description", tr, markup=LIST_MARKUP) source_col.set_max_width(500) + self.treeview1.append_column(source_col) self.sourceslist = aptsources.SourcesList() @@ -123,13 +127,13 @@ class SoftwareProperties(SimpleGladeApp): for source in self.sourceslist.list: if source.invalid or source.disabled: continue - (a_type, dists, comps) = self.matcher.match(source) + (a_type, dist, comps) = self.matcher.match(source) contents = "" if source.comment != "": contents += "<i>%s</i>\n\n" % (source.comment) - contents += "%s <small>(%s)</small>" % (dists, a_type) - + contents +="<big><b>%s </b></big> (%s) <small>\n%s</small>" % (dist,a_type, comps) + self.source_store.append([contents, not source.disabled, source]) def reload_keyslist(self): diff --git a/SoftwareProperties/__init__.py b/SoftwareProperties/__init__.py index e69de29b..1e6834bd 100644 --- a/SoftwareProperties/__init__.py +++ b/SoftwareProperties/__init__.py @@ -0,0 +1 @@ +from SoftwareProperties import SoftwareProperties diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py index 640a70b4..aa3cbb5a 100644 --- a/SoftwareProperties/aptsources.py +++ b/SoftwareProperties/aptsources.py @@ -27,12 +27,12 @@ import re import apt_pkg import glob -from DistInfo import DistInfo +from UpdateManager.Common.DistInfo import DistInfo # actual source.list entries class SourceEntry: - def __init__(self, line,file): + def __init__(self, line,file=None): self.invalid = False self.disabled = False self.type = "" @@ -41,6 +41,8 @@ class SourceEntry: self.comps = [] self.comment = "" self.line = line + if file == None: + file = apt_pkg.Config.FindDir("Dir::Etc")+apt_pkg.Config.Find("Dir::Etc::sourcelist") self.file = file self.parse(line) diff --git a/SoftwareProperties/dialog_edit.py b/SoftwareProperties/dialog_edit.py index 32e6ac0c..87cc9799 100644 --- a/SoftwareProperties/dialog_edit.py +++ b/SoftwareProperties/dialog_edit.py @@ -38,7 +38,7 @@ class dialog_edit: if os.path.exists("../data/SoftwarePropertiesDialogs.glade"): self.gladexml = gtk.glade.XML("../data/SoftwarePropertiesDialogs.glade") else: - self.gladexml = gtk.glade.XML("%s/SoftwarePropertiesDialogs.glade" % datadir) + self.gladexml = gtk.glade.XML("%s/glade/SoftwarePropertiesDialogs.glade" % datadir) self.main = self.gladexml.get_widget("dialog_edit") self.main.set_transient_for(parent) |
