From aefb2cce102a32fa34dd0034cc99d4ee272e5e5f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 29 Aug 2006 21:31:16 +0200 Subject: * DistUpgrade/*: - s/download/fetch/ - integrate the cdrom scan progress into the view - fixes to the cdrom scan code --- DistUpgrade/DistUpgrade.glade | 3152 ++++++++++++++--------------------- DistUpgrade/DistUpgradeControler.py | 19 +- DistUpgrade/DistUpgradeViewGtk.py | 30 +- 3 files changed, 1245 insertions(+), 1956 deletions(-) (limited to 'DistUpgrade') diff --git a/DistUpgrade/DistUpgrade.glade b/DistUpgrade/DistUpgrade.glade index a31df120..dbe7911d 100644 --- a/DistUpgrade/DistUpgrade.glade +++ b/DistUpgrade/DistUpgrade.glade @@ -1,1205 +1,726 @@ - - - + + + - - - 6 - True - Upgrading Ubuntu - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - False - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - True - - - - - - True - False - 12 - - - - 6 - True - False - 12 - - - - True - <span weight="bold" size="x-large">Upgrading to Ubuntu 6.10</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 0 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - 5 - 2 - False - 6 - 6 - - - - 18 - 18 - True - 0.5 - 0.5 - 0 - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - 18 - 18 - True - 0.5 - 0.5 - 0 - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - 18 - 18 - True - 0.5 - 0.5 - 0 - 0 - - - 0 - 1 - 3 - 4 - fill - - - - - - True - Preparing the upgrade - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 0 - 1 - expand|shrink|fill - - - - - - - True - Modifying the software channels - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 1 - 2 - expand|shrink|fill - - - - - - - True - Downloading and installing the upgrades - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 2 - 3 - expand|shrink|fill - - - - - - - True - Cleaning up - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 3 - 4 - expand|shrink|fill - - - - - - - 18 - 18 - True - 0.5 - 0.5 - 0 - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - 18 - 18 - True - 0.5 - 0.5 - 0 - 0 - - - 0 - 1 - 4 - 5 - fill - - - - - - True - Restarting the system - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 4 - 5 - fill - - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - False - 4 - - - - 350 - True - GTK_PROGRESS_LEFT_TO_RIGHT - 0 - 0.10000000149 - - PANGO_ELLIPSIZE_END - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_END - -1 - False - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - False - True - False - 4 - - - - True - False - 0 - - - - True - create_terminal - 0 - 0 - Tue, 06 Dec 2005 20:03:08 GMT - - - 0 - True - True - - - - - - True - GTK_UPDATE_CONTINUOUS - False - 0 0 0 0 0 0 - - - 0 - False - True - - - - - - - - True - Terminal - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - - 6 - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - 500 - 400 - False - False - True - True - True - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - True - False - - - - True - False - 6 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - _Start Upgrade - True - GTK_RELIEF_NORMAL - True - -8 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - False - 12 - - - - True - gtk-dialog-question - 6 - 0 - 0 - 0 - 0 - - - 0 - False - True - - - - - - True - False - 12 - - - - True - True - - False - True - GTK_JUSTIFY_LEFT - True - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - - False - True - GTK_JUSTIFY_LEFT - True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - False - 6 - - - - 400 - 200 - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - True - False - False - False - - - - - - - - True - Details - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - - 6 - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - False - False - True - True - True - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - True - False - - - - True - False - 12 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - GTK_RELIEF_NORMAL - True - -8 - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-refresh - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Restart Now - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - - - - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - -7 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - False - 12 - - - - True - gtk-dialog-info - 6 - 0 - 0 - 0 - 0 - - - 0 - False - True - - - - - - True - <b><big>Restart the system to complete the upgrade</big></b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - - - - 6 - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - False - False - True - True - True - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - True - False - - - - True - False - 12 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - _Report Bug - True - GTK_RELIEF_NORMAL - True - -8 - - - - - - True - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - -7 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - False - 12 - - - - True - gtk-dialog-error - 6 - 0 - 0 - 0 - 0 - - - 0 - False - True - - - - - - True - False - 12 - - - - True - True - - False - True - GTK_JUSTIFY_LEFT - True - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - True - - - - - - 400 - 200 - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_NONE - True - 4 - 4 - 0 - 4 - 4 - 0 - - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - - 6 - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - 500 - 400 - False - False - True - True - True - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - True - False - - - - True - False - 6 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - _Continue - True - GTK_RELIEF_NORMAL - True - -8 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - False - 12 - - - - True - False - 12 - - - - True - gtk-dialog-question - 6 - 0 - 0 - 0 - 0 - - - 0 - False - True - - - - - - True - False - 12 - - - - True - <b><big>Start the upgrade?</big></b> - False - True - GTK_JUSTIFY_LEFT - True - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - The upgrade of your system requires + + True + 6 + Upgrading Ubuntu + False + GTK_WIN_POS_CENTER + True + + + + + True + 12 + + + True + 6 + 12 + + + True + 0.000000 + <span weight="bold" size="x-large">Upgrading to Ubuntu 6.10</span> + True + + + False + False + + + + + True + + + True + + + + False + False + + + + + True + 5 + 2 + 6 + 6 + + + True + 0.000000 + Restarting the system + + + 1 + 2 + 4 + 5 + GTK_FILL + + + + + + 18 + 18 + True + + + 4 + 5 + GTK_FILL + + + + + 18 + 18 + True + + + GTK_FILL + + + + + True + 0.000000 + Cleaning up + + + 1 + 2 + 3 + 4 + GTK_EXPAND | GTK_SHRINK | GTK_FILL + + + + + + True + 0.000000 + Fetching and installing the upgrades + + + 1 + 2 + 2 + 3 + GTK_EXPAND | GTK_SHRINK | GTK_FILL + + + + + + True + 0.000000 + Modifying the software channels + + + 1 + 2 + 1 + 2 + GTK_EXPAND | GTK_SHRINK | GTK_FILL + + + + + + True + 0.000000 + Preparing the upgrade + + + 1 + 2 + GTK_EXPAND | GTK_SHRINK | GTK_FILL + + + + + + 18 + 18 + True + + + 3 + 4 + GTK_FILL + + + + + 18 + 18 + True + + + 2 + 3 + GTK_FILL + + + + + 18 + 18 + True + + + 1 + 2 + GTK_FILL + + + + + 1 + + + + + 1 + + + + + True + 4 + + + 350 + True + 0.1 + + PANGO_ELLIPSIZE_END + + + False + False + + + + + True + 0.000000 + True + PANGO_ELLIPSIZE_END + + + False + False + 1 + + + + + 2 + + + + + True + False + True + 4 + + + True + + + True + create_terminal + + + + + True + 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 + + + False + 1 + + + + + + + True + Terminal + + + label_item + + + + + 3 + + + + + + + + + 6 + False + GTK_WIN_POS_CENTER_ON_PARENT + 500 + 400 + GDK_WINDOW_TYPE_HINT_DIALOG + True + True + True + False + + + True + 6 + + + True + 6 + 12 + + + True + 0.000000 + 0.000000 + gtk-dialog-question + 6 + + + False + + + + + True + 12 + + + True + True + 0.000000 + True + True + True + + + False + False + + + + + True + 0.000000 + True + True + + + False + False + 1 + + + + + True + True + 6 + + + 400 + 200 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + + + True + True + False + + + + + + + True + Details + + + label_item + + + + + 2 + + + + + 1 + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-cancel + True + -6 + + + + + True + True + True + _Start Upgrade + True + -8 + + + 1 + + + + + False + GTK_PACK_END + + + + + + + 6 + False + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + True + True + True + False + + + True + 12 + + + True + 6 + 12 + + + True + 0.000000 + 0.000000 + gtk-dialog-info + 6 + + + False + + + + + True + 0.000000 + 0.000000 + <b><big>Restart the system to complete the upgrade</big></b> + True + + + False + False + 1 + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + -8 + + + True + 0.000000 + 0.000000 + + + True + 2 + + + True + gtk-refresh + + + False + False + + + + + True + _Restart Now + True + + + False + False + 1 + + + + + + + + + + + True + True + True + gtk-close + True + -7 + + + 1 + + + + + False + GTK_PACK_END + + + + + + + 6 + False + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + True + True + True + False + + + True + 12 + + + True + 6 + 12 + + + True + 0.000000 + 0.000000 + gtk-dialog-error + 6 + + + False + + + + + True + 12 + + + True + True + 0.000000 + True + True + True + + + False + + + + + 400 + 200 + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + + + True + True + 4 + 4 + False + 4 + 4 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + _Report Bug + True + -8 + + + + + True + True + True + True + gtk-close + True + -7 + + + 1 + + + + + False + GTK_PACK_END + + + + + + + 6 + False + GTK_WIN_POS_CENTER_ON_PARENT + 500 + 400 + GDK_WINDOW_TYPE_HINT_DIALOG + True + True + True + False + + + True + 6 + + + True + 6 + 12 + + + True + 12 + + + True + 0.000000 + 0.000000 + gtk-dialog-question + 6 + + + False + + + + + True + 12 + + + True + 0.000000 + 0.000000 + <b><big>Start the upgrade?</big></b> + True + True + + + False + False + + + + + True + 0.000000 + 0.000000 + The upgrade of your system requires ... to download 2000 MByte @@ -1208,739 +729,502 @@ ... to update 200 packages This is you last chance to cancel the upgrade. - False - False - GTK_JUSTIFY_LEFT - True - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - False - 0 - - - - 400 - 200 - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - True - False - False - False - - - - - - - - True - Details - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - False - - - - - 0 - False - False - - - - - 0 - False - False - - - - - 0 - True - True - - - - - - - - 6 - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - False - False - True - True - True - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - True - False - - - - True - False - 12 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - _Cancel Upgrade - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - True - _Resume Upgrade - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - False - 12 - - - - True - gtk-dialog-question - 6 - 0 - 0 - 0 - 0 - - - 0 - False - True - - - - - - True - <b><big>Cancel the running upgrade?</big></b> + True + + + False + False + 1 + + + + + True + True + + + 400 + 200 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + + + True + True + False + + + + + + + True + Details + + + label_item + + + + + False + False + 2 + + + + + False + False + 1 + + + + + False + False + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-cancel + True + -6 + + + + + True + True + True + _Continue + True + -8 + + + 1 + + + + + False + GTK_PACK_END + + + + + + + 6 + False + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + True + True + True + False + + + True + 12 + + + True + 6 + 12 + + + True + 0.000000 + 0.000000 + gtk-dialog-question + 6 + + + False + + + + + True + 0.000000 + 0.000000 + <b><big>Cancel the running upgrade?</big></b> The system could be in an unusable state if you cancel the upgrade. You are strongly adviced to resume the upgrade. - False - True - GTK_JUSTIFY_LEFT - True - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - - - - 5 - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - True - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - False - - - - True - False - 12 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - True - True - GTK_RELIEF_NORMAL - True - -9 - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-cancel - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Keep - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - - - - True - True - True - GTK_RELIEF_NORMAL - True - -8 - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-ok - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Replace - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - False - 12 - - - - True - gtk-dialog-question - 6 - 0 - 0 - 0 - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - True - GTK_JUSTIFY_LEFT - True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - True - False - 0 - - - - True - False - 0 - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 300 - True - True - False - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_NONE - False - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - 0 - False - False - - - - - - - - True - Difference between the files - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - - - 6 - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - False - False - True - True - True - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - True - False - - - - True - False - 12 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - False - 12 - - - - True - gtk-dialog-info - 6 - 0 - 0 - 0 - 0 - - - 0 - False - True - - - - - - True - False - 12 - - - - True - True - - False - True - GTK_JUSTIFY_LEFT - True - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - True - - - - - - 400 - 200 - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_NONE - True - 4 - 4 - 0 - 4 - 4 - 0 - - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - + True + True + + + False + False + 1 + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + _Cancel Upgrade + True + -6 + + + + + True + True + True + True + _Resume Upgrade + True + -5 + + + 1 + + + + + False + GTK_PACK_END + + + + + + + 5 + False + True + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + False + + + True + 12 + + + True + 6 + 12 + + + True + 0.000000 + 0.000000 + gtk-dialog-question + 6 + + + False + False + + + + + True + 12 + + + True + 0.000000 + True + True + + + False + False + + + + + 1 + + + + + 1 + + + + + True + True + + + True + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + + + 300 + True + True + False + False + + + + + False + False + + + + + + + True + Difference between the files + + + label_item + + + + + 2 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + True + True + -9 + + + True + 0.000000 + 0.000000 + + + True + 2 + + + True + gtk-cancel + + + False + False + + + + + True + _Keep + True + + + False + False + 1 + + + + + + + + + + + True + True + True + -8 + + + True + 0.000000 + 0.000000 + + + True + 2 + + + True + gtk-ok + + + False + False + + + + + True + _Replace + True + + + False + False + 1 + + + + + + + + + 1 + + + + + False + GTK_PACK_END + + + + + + + 6 + False + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + True + True + True + False + + + True + 12 + + + True + 6 + 12 + + + True + 0.000000 + 0.000000 + gtk-dialog-info + 6 + + + False + + + + + True + 12 + + + True + True + 0.000000 + True + True + True + + + False + + + + + 400 + 200 + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + + + True + True + 4 + 4 + False + 4 + 4 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + True + gtk-close + True + -5 + + + + + False + GTK_PACK_END + + + + + diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index dd4074ac..fd8bc2b9 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -38,23 +38,6 @@ from gettext import gettext as _ import gettext from DistUpgradeCache import MyCache -class MyCdromProgress(apt.progress.CdromProgress): - """ Report the cdrom add progress - Subclass this class to implement cdrom add progress reporting - """ - def __init__(self): - pass - def update(self, text, step): - """ update is called regularly so that the gui can be redrawn """ - print "update()",text, step - pass - def askCdromName(self): - print "askCdromName" - return "lala" - def changeCdrom(self): - print "changeCdrom" - - class AptCdrom(object): def __init__(self, view, path): self.view = view @@ -82,7 +65,7 @@ class AptCdrom(object): apt_pkg.Config.Set("APT::CDROM::NoMount","true") cdrom = apt_pkg.GetCdrom() # FIXME: add cdrom progress here for the view - progress = MyCdromProgress() + progress = self._view.getCdromProgress() try: res = cdrom.Add(progress) except SystemError, e: diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index d6e69c31..2095a416 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -1,6 +1,6 @@ # DistUpgradeViewGtk.py # -# Copyright (c) 2004,2005 Canonical +# Copyright (c) 2004-2006 Canonical # # Author: Michael Vogt # @@ -60,6 +60,25 @@ def FuzzyTimeToStr(sec): return _("About %li seconds remaining") % sec +class GtkCdromProgressAdapter(apt.progress.CdromProgress): + """ Report the cdrom add progress + Subclass this class to implement cdrom add progress reporting + """ + def __init__(self, parent): + self.status = parent.label_status + self.progress = parent.progressbar_cache + self.parent = parent + def update(self, text, step): + """ update is called regularly so that the gui can be redrawn """ + if text: + self.status.set_text(text) + self.progress.set_fraction(step/float(self.totalSteps)) + def askCdromName(self): + return (False, "") + def changeCdrom(self): + return False + + class GtkOpProgress(apt.progress.OpProgress): def __init__(self, progressbar): self.progressbar = progressbar @@ -108,7 +127,7 @@ class GtkFetchProgressAdapter(apt.progress.FetchProgress): self.status.show() def stop(self): self.progress.set_text(" ") - self.status.set_text(_("Download is complete")) + self.status.set_text(_("Fetching is complete")) def pulse(self): # FIXME: move the status_str and progress_str into python-apt # (python-apt need i18n first for this) @@ -119,10 +138,10 @@ class GtkFetchProgressAdapter(apt.progress.FetchProgress): currentItem = self.totalItems if self.currentCPS > 0: - self.status.set_text(_("Downloading file %li of %li at %s/s" % (currentItem, self.totalItems, apt_pkg.SizeToStr(self.currentCPS)))) + self.status.set_text(_("Fetching file %li of %li at %s/s" % (currentItem, self.totalItems, apt_pkg.SizeToStr(self.currentCPS)))) self.progress.set_text(FuzzyTimeToStr(self.eta)) else: - self.status.set_text(_("Downloading file %li of %li" % (currentItem, self.totalItems))) + self.status.set_text(_("Fetching file %li of %li" % (currentItem, self.totalItems))) self.progress.set_text(" ") while gtk.events_pending(): @@ -310,6 +329,7 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): self.window_main.window.set_functions(gtk.gdk.FUNC_MOVE) self._opCacheProgress = GtkOpProgress(self.progressbar_cache) self._fetchProgress = GtkFetchProgressAdapter(self) + self._cdromProgress = GtkCdromProgressAdapter(self) self._installProgress = GtkInstallProgressAdapter(self) # details dialog self.details_list = gtk.ListStore(gobject.TYPE_STRING) @@ -382,6 +402,8 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): return self._installProgress def getOpCacheProgress(self): return self._opCacheProgress + def getCdromProgress(self): + return self._cdromProgress def updateStatus(self, msg): self.label_status.set_text("%s" % msg) def setStep(self, step): -- cgit v1.2.3