summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgrade.glade511
-rw-r--r--DistUpgrade/DistUpgradeControler.py5
-rw-r--r--DistUpgrade/DistUpgradeView.py3
-rw-r--r--DistUpgrade/DistUpgradeViewGtk.py82
4 files changed, 508 insertions, 93 deletions
diff --git a/DistUpgrade/DistUpgrade.glade b/DistUpgrade/DistUpgrade.glade
index 00b04644..697514cf 100644
--- a/DistUpgrade/DistUpgrade.glade
+++ b/DistUpgrade/DistUpgrade.glade
@@ -39,7 +39,7 @@
<child>
<widget class="GtkLabel" id="label_title">
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot; size=&quot;x-large&quot;&gt;Upgrading Ubuntu&lt;/span&gt;</property>
+ <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot; size=&quot;x-large&quot;&gt;Upgrading to Ubuntu &quot;Dapper&quot; 6.04&lt;/span&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -95,7 +95,7 @@
<child>
<widget class="GtkTable" id="table_steps">
<property name="visible">True</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
@@ -161,7 +161,7 @@
<child>
<widget class="GtkLabel" id="label_step1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Preparing upgrade</property>
+ <property name="label" translatable="yes">Preparing the upgrade</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -189,7 +189,7 @@
<child>
<widget class="GtkLabel" id="label_step2">
<property name="visible">True</property>
- <property name="label" translatable="yes">Upgrading software channels</property>
+ <property name="label" translatable="yes">Modifing the software channels</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -217,7 +217,7 @@
<child>
<widget class="GtkLabel" id="label_step3">
<property name="visible">True</property>
- <property name="label" translatable="yes">Upgrading the system</property>
+ <property name="label" translatable="yes">Downloading and installing the upgrades</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -288,6 +288,51 @@
<property name="x_options">fill</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkImage" id="image_step5">
+ <property name="width_request">18</property>
+ <property name="height_request">18</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label_step5">
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -439,43 +484,6 @@
<property name="fill">True</property>
</packing>
</child>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox2">
- <property name="border_width">6</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="button3">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-media-pause</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
</widget>
</child>
</widget>
@@ -858,4 +866,423 @@
</child>
</widget>
+<widget class="GtkDialog" id="dialog_error">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes"></property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="modal">False</property>
+ <property name="resizable">False</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">True</property>
+ <property name="has_separator">False</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox6">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="hbuttonbox3">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="button_bugreport">
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Report Bug</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-8</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button6">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-7</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox8">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkImage" id="image5">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-error</property>
+ <property name="icon_size">6</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkLabel" id="label_error">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scroll_error">
+ <property name="width_request">400</property>
+ <property name="height_request">200</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="textview_error">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="overwrite">False</property>
+ <property name="accepts_tab">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">4</property>
+ <property name="pixels_below_lines">4</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">4</property>
+ <property name="right_margin">4</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="dialog_obsolete">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes"></property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="modal">False</property>
+ <property name="default_width">500</property>
+ <property name="default_height">400</property>
+ <property name="resizable">False</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">True</property>
+ <property name="has_separator">False</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox8">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="hbuttonbox4">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="button7">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button8">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">_Continue</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-8</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox9">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkImage" id="image6">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-question</property>
+ <property name="icon_size">6</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox10">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkLabel" id="label26">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;&lt;big&gt;Start the upgrade?&lt;/big&gt;&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label27">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">The upgrade of your system requires
+
+ ... to download 2000 MByte
+
+ ... to install 23 new packages
+ ... to remove 19 packages
+ ... to update 200 packages
+
+This is you last chance to cancel the upgrade.</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkExpander" id="expander2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="expanded">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow4">
+ <property name="width_request">400</property>
+ <property name="height_request">200</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="treeview2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Details</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index 8321ce8f..6ab77103 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -277,7 +277,7 @@ class DistUpgradeControler(object):
# this is the core
def dapperUpgrade(self):
# sanity check (check for ubuntu-desktop, brokenCache etc)
- self._view.updateStatus(_("Checking update system"))
+ self._view.updateStatus(_("Checking package manager"))
self._view.setStep(1)
self.openCache()
if not self.cache.sanityCheck(self._view):
@@ -296,7 +296,7 @@ class DistUpgradeControler(object):
self.abort()
# then open the cache (again)
- self._view.updateStatus(_("Checking update system"))
+ self._view.updateStatus(_("Checking package manager"))
self.openCache()
# calc the dist-upgrade and see if the removals are ok/expected
@@ -317,6 +317,7 @@ class DistUpgradeControler(object):
self.doPostUpgrade()
# done, ask for reboot
+ self._view.setStep(5)
self._view.updateStatus(_("System upgrade is complete."))
# FIXME should we look into /var/run/reboot-required here?
if self._view.confirmRestart():
diff --git a/DistUpgrade/DistUpgradeView.py b/DistUpgrade/DistUpgradeView.py
index abc5b340..4c9103ba 100644
--- a/DistUpgrade/DistUpgradeView.py
+++ b/DistUpgrade/DistUpgradeView.py
@@ -38,11 +38,12 @@ class DistUpgradeView(object):
"""
pass
def setStep(self, step):
- """ we have 4 steps current for a upgrade:
+ """ we have 5 steps current for a upgrade:
1. Analyzing the system
2. Updating repository information
3. Performing the upgrade
4. Post upgrade stuff
+ 5. Complete
"""
pass
def confirmChanges(self, summary, changes, downloadSize):
diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py
index 20f5f99a..61fd442b 100644
--- a/DistUpgrade/DistUpgradeViewGtk.py
+++ b/DistUpgrade/DistUpgradeViewGtk.py
@@ -46,14 +46,19 @@ def utf8(str):
class GtkOpProgress(apt.progress.OpProgress):
def __init__(self, progressbar):
self.progressbar = progressbar
+ #self.progressbar.set_pulse_step(0.01)
+ #self.progressbar.pulse()
+
def update(self, percent):
- #self._progressbar.show()
- #self.progressbar.set_text(self.op)
+ #if percent > 99:
+ # self.progressbar.set_fraction(1)
+ #else:
+ # self.progressbar.pulse()
self.progressbar.set_fraction(percent/100.0)
while gtk.events_pending():
gtk.main_iteration()
+
def done(self):
- #self.progressbar.hide()
self.progressbar.set_text(" ")
@@ -84,9 +89,8 @@ class GtkFetchProgressAdapter(apt.progress.FetchProgress):
self.progress.set_fraction(0)
self.status.show()
def stop(self):
- #self.progress.hide()
self.progress.set_text(" ")
- self.status.set_text("")
+ self.status.set_text(_("Download is complete"))
def pulse(self):
# FIXME: move the status_str and progress_str into python-apt
# (python-apt need i18n first for this)
@@ -123,7 +127,7 @@ class GtkInstallProgressAdapter(InstallProgress):
# FIXME: add support for the timeout
# of the terminal (to display something useful then)
# -> longer term, move this code into python-apt
- self.label_status.set_text(_("Installing updates ..."))
+ self.label_status.set_text(_("Installing updates"))
self.progress.set_fraction(0.0)
self.progress.set_text(" ")
self.expander.set_sensitive(True)
@@ -131,35 +135,22 @@ class GtkInstallProgressAdapter(InstallProgress):
self.env = ["VTE_PTY_KEEP_FD=%s"% self.writefd,
"DEBIAN_FRONTEND=gnome",
"APT_LISTCHANGES_FRONTEND=none"]
+
def error(self, pkg, errormsg):
logging.error("got a error from dpkg for pkg: '%s': '%s'" % (pkg, errormsg))
- dialog = gtk.MessageDialog(self.parent.window_main, 0,
- gtk.MESSAGE_ERROR,
- gtk.BUTTONS_OK,"")
- summary = _("Error installing '%s'" % pkg)
- msg = _("During the install a error occured. This is usually a bug "
- "in the packages, please report it. See the message below "
- "for more information. ")
- msg="<big><b>%s</b></big>\n\n%s" % (summary,msg)
- dialog.set_markup(msg)
- dialog.vbox.set_spacing(6)
- if errormsg != None:
- scroll = gtk.ScrolledWindow()
- scroll.set_size_request(400,200)
- textview = gtk.TextView()
- textview.set_cursor_visible(False)
- textview.set_editable(False)
- textview.get_buffer().set_text(utf8(errormsg))
- textview.show()
- scroll.add(textview)
- scroll.show()
- dialog.vbox.pack_end(scroll)
- dialog.run()
- dialog.destroy()
+ #self.expander_terminal.set_expanded(True)
+ self.dialog_error.set_transient_for(self.window_main)
+ summary = _("Could not install '%s'" % pkg)
+ msg = _("The upgrade will abort. Please report the bug.")
+ markup="<big><b>%s</b></big>\n\n%s" % (summary, msg)
+ self.label_error.set_markup(markup)
+ self.textview_error.get_buffer().set_text(utf8(errormsg))
+ self.scroll_error.show()
+ self.dialog_error.run()
+ self.dialog_error.hide()
def conffile(self, current, new):
logging.debug("got a conffile-prompt from dpkg for file: '%s'" % current)
self.expander.set_expanded(True)
- pass
def fork(self):
pid = self.term.forkpty(envv=self.env)
return pid
@@ -171,7 +162,6 @@ class GtkInstallProgressAdapter(InstallProgress):
self.updateInterface()
return self.apt_status
def finishUpdate(self):
- #self.progress.hide()
self.label_status.set_text("")
def updateInterface(self):
InstallProgress.updateInterface(self)
@@ -275,26 +265,22 @@ class GtkDistUpgradeView(DistUpgradeView,SimpleGladeApp):
#attr = pango.AttrStyle(pango.STYLE_ITALIC, 0, -1)
attrlist.insert(attr)
label.set_property("attributes",attrlist)
+
def error(self, summary, msg, extended_msg=None):
- dialog = gtk.MessageDialog(self.window_main, 0, gtk.MESSAGE_ERROR,
- gtk.BUTTONS_OK,"")
- msg="<big><b>%s</b></big>\n\n%s" % (summary,msg)
- dialog.set_markup(msg)
- dialog.vbox.set_spacing(6)
+ self.dialog_error.set_transient_for(self.window_main)
+ #self.expander_terminal.set_expanded(True)
+ msg="<big><b>%s</b></big>\n\n%s" % (summary, msg)
+ self.label_error.set_markup(msg)
if extended_msg != None:
- scroll = gtk.ScrolledWindow()
- scroll.set_size_request(400,200)
- textview = gtk.TextView()
- textview.set_cursor_visible(False)
- textview.set_editable(False)
- textview.get_buffer().set_text(extended_msg)
- textview.show()
- scroll.add(textview)
- scroll.show()
- dialog.vbox.pack_end(scroll)
- dialog.run()
- dialog.destroy()
+ buffer = self.textview_error.get_buffer()
+ buffer.set_text(extended_msg)
+ self.scroll_error.show()
+ else:
+ self.scroll_error.hide()
+ self.dialog_error.run()
+ self.dialog_error.show()
+ self.dialog_error.destroy()
return False
def confirmChanges(self, summary, changes, downloadSize):