summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DistUpgrade/DistUpgradeControler.py5
-rw-r--r--SoftwareProperties/SoftwareProperties.py6
-rw-r--r--SoftwareProperties/aptsources.py8
-rw-r--r--data/SoftwareProperties.glade3
4 files changed, 18 insertions, 4 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index 874eaf0b..6ee2fb97 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -58,7 +58,6 @@ class DistUpgradeControler(object):
def updateSourcesList(self):
- self.sources = SourcesList()
# this must map, i.e. second in "from" must be the second in "to"
# (but they can be different, so in theory we could exchange
@@ -299,8 +298,10 @@ class DistUpgradeControler(object):
# sanity check (check for ubuntu-desktop, brokenCache etc)
self._view.updateStatus(_("Checking package manager"))
self._view.setStep(1)
+
self.openCache()
-
+ self.sources = SourcesList()
+
if not self.cache.sanityCheck(self._view):
abort(1)
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py
index 9613b49e..9ccf12ad 100644
--- a/SoftwareProperties/SoftwareProperties.py
+++ b/SoftwareProperties/SoftwareProperties.py
@@ -70,13 +70,19 @@ class SoftwareProperties(SimpleGladeApp):
#self.gconfclient = gconf.client_get_default()
if parent:
+ self.window_main.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
+ self.window_main.show()
self.window_main.set_transient_for(parent)
# If externally called, reparent to external application.
self.options = options
if options and options.toplevel != None:
+ self.window_main.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
+ self.window_main.show()
toplevel = gtk.gdk.window_foreign_new(int(options.toplevel))
self.window_main.window.set_transient_for(toplevel)
+
+ self.window_main.show()
self.init_sourceslist()
self.reload_sourceslist()
diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py
index 77de510b..53ae2e84 100644
--- a/SoftwareProperties/aptsources.py
+++ b/SoftwareProperties/aptsources.py
@@ -102,8 +102,16 @@ class SourceEntry:
line = line[:i]
# source is ok, split it and see what we have
pieces = self.mysplit(line)
+ # Sanity check
+ if len(pieces) < 3:
+ self.invalid = True
+ return
# Type, deb or deb-src
self.type = string.strip(pieces[0])
+ # Sanity check
+ if self.type not in ("deb", "deb-src"):
+ self.invalid = True
+ return
# URI
self.uri = string.strip(pieces[1])
# distro and components (optional)
diff --git a/data/SoftwareProperties.glade b/data/SoftwareProperties.glade
index da164c23..57f7542d 100644
--- a/data/SoftwareProperties.glade
+++ b/data/SoftwareProperties.glade
@@ -7,7 +7,6 @@
<property name="border_width">6</property>
<property name="width_request">580</property>
<property name="height_request">400</property>
- <property name="visible">True</property>
<property name="title" translatable="yes">Software Preferences</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_CENTER</property>
@@ -18,7 +17,7 @@
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>