summaryrefslogtreecommitdiff
path: root/SoftwareProperties
diff options
context:
space:
mode:
Diffstat (limited to 'SoftwareProperties')
-rw-r--r--SoftwareProperties/aptsources.py4
-rw-r--r--SoftwareProperties/dialog_add.py6
2 files changed, 9 insertions, 1 deletions
diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py
index 397ebb38..532600fd 100644
--- a/SoftwareProperties/aptsources.py
+++ b/SoftwareProperties/aptsources.py
@@ -450,7 +450,7 @@ class SourcesList:
# templates for the add dialog
class SourceEntryTemplate(SourceEntry):
- def __init__(self,a_type,uri,dist,description,comps):
+ def __init__(self, a_type, uri, dist, description, comps):
self.comps = []
self.comps_descriptions = []
self.type = a_type
@@ -472,6 +472,8 @@ class SourceEntryTemplates:
dinfo = DistInfo (base_dir=datadir+"channels/")
+ self.dist = dinfo.dist
+
for suite in dinfo.suites:
comps = []
for comp in suite.components:
diff --git a/SoftwareProperties/dialog_add.py b/SoftwareProperties/dialog_add.py
index effd9f24..8ccd2080 100644
--- a/SoftwareProperties/dialog_add.py
+++ b/SoftwareProperties/dialog_add.py
@@ -26,6 +26,7 @@ import os
import gobject
import gtk
import gtk.glade
+from gettext import gettext as _
import aptsources
@@ -52,6 +53,11 @@ class dialog_add:
self.combo.pack_start(cell, True)
self.combo.add_attribute(cell, 'text', 0)
self.fill_combo(self.combo)
+ self.label_dist = self.gladexml.get_widget("label_dist")
+ if self.templatelist.dist != "":
+ # TRANSLATORS: %s is the distribution name, eg. Ubuntu or Debian
+ self.label_dist.set_markup("<b>%s</b>" % \
+ _("%s channels" % self.templatelist.dist))
# Setup the custom channel widgets
self.entry = self.gladexml.get_widget("entry_source_line")