diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-23 16:41:55 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-23 16:41:55 +0100 |
| commit | b4b3505f21186e7325d1282d2aa62f92104e8208 (patch) | |
| tree | bb982247c4fa9fe35d7c281aff6e59569398bab4 | |
| parent | a7470cfe01b96da3d387e098630d15e913f7f145 (diff) | |
| parent | c221a3e97d7da6a41f8afbb741a5e72c83b54fd9 (diff) | |
| download | python-apt-b4b3505f21186e7325d1282d2aa62f92104e8208.tar.gz | |
* merged with sebastian
* DistUpgrade/DistUpgrade.glade: make the "hbuttonbox2" invisible
* DistUpgrade/DistUpgradeViewGtk.py: support cancel with the window-managers delete event
| -rw-r--r-- | DistUpgrade/DistUpgrade.glade | 678 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 3 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeViewGtk.py | 26 | ||||
| -rw-r--r-- | UpdateManager/UpdateManager.py | 13 | ||||
| -rw-r--r-- | data/UpdateManager.glade | 13 |
5 files changed, 392 insertions, 341 deletions
diff --git a/DistUpgrade/DistUpgrade.glade b/DistUpgrade/DistUpgrade.glade index ad28aabc..7ad420da 100644 --- a/DistUpgrade/DistUpgrade.glade +++ b/DistUpgrade/DistUpgrade.glade @@ -6,7 +6,7 @@ <widget class="GtkWindow" id="window_main"> <property name="border_width">6</property> <property name="visible">True</property> - <property name="title" translatable="yes">Upgrade Ubuntu</property> + <property name="title" translatable="yes">Upgrading Ubuntu</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> @@ -19,147 +19,320 @@ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> + <signal name="delete_event" handler="on_window_main_delete_event" last_modification_time="Mon, 23 Jan 2006 15:30:09 GMT"/> + <signal name="destroy_event" handler="on_window_main_destroy_event" last_modification_time="Mon, 23 Jan 2006 15:30:19 GMT"/> <child> - <widget class="GtkVBox" id="vbox1"> - <property name="border_width">6</property> + <widget class="GtkVBox" id="vbox5"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> + <property name="spacing">12</property> <child> - <widget class="GtkLabel" id="label_title"> + <widget class="GtkVBox" id="vbox1"> + <property name="border_width">6</property> <property name="visible">True</property> - <property name="label" translatable="yes"><span weight="bold" size="x-large">Upgrading Ubuntu</span></property> - <property name="use_underline">False</property> - <property name="use_markup">True</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">12</property> - <property name="ypad">12</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> - <placeholder/> - </child> + <property name="homogeneous">False</property> + <property name="spacing">12</property> - <child> - <widget class="GtkAlignment" id="alignment2"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">24</property> - <property name="left_padding">12</property> - <property name="right_padding">12</property> + <child> + <widget class="GtkLabel" id="label_title"> + <property name="visible">True</property> + <property name="label" translatable="yes"><span weight="bold" size="x-large">Upgrading Ubuntu</span></property> + <property name="use_underline">False</property> + <property name="use_markup">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> <child> - <widget class="GtkTable" id="table_steps"> + <widget class="GtkHBox" id="hbox3"> <property name="visible">True</property> - <property name="n_rows">4</property> - <property name="n_columns">2</property> <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">0</property> + <property name="spacing">0</property> <child> - <widget class="GtkImage" id="image_step1"> - <property name="width_request">18</property> - <property name="height_request">18</property> + <widget class="GtkLabel" id="label17"> <property name="visible">True</property> + <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.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="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkImage" id="image_step2"> - <property name="width_request">18</property> - <property name="height_request">18</property> + <widget class="GtkTable" id="table_steps"> <property name="visible">True</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">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - </packing> - </child> + <property name="n_rows">4</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> - <child> - <widget class="GtkImage" id="image_step3"> - <property name="width_request">18</property> - <property name="height_request">18</property> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <child> + <widget class="GtkImage" id="image_step2"> + <property name="width_request">18</property> + <property name="height_request">18</property> + <property name="visible">True</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">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkImage" id="image_step3"> + <property name="width_request">18</property> + <property name="height_request">18</property> + <property name="visible">True</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">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkImage" id="image_step4"> + <property name="width_request">18</property> + <property name="height_request">18</property> + <property name="visible">True</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">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label_step1"> + <property name="visible">True</property> + <property name="label" translatable="yes">Preparing upgrade</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">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">expand|shrink|fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label_step2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Upgrading software channels</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">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">expand|shrink|fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label_step3"> + <property name="visible">True</property> + <property name="label" translatable="yes">Upgrading the system</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">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">expand|shrink|fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label_step4"> + <property name="visible">True</property> + <property name="label" translatable="yes">Cleaning up</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">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">expand|shrink|fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkImage" id="image_step1"> + <property name="width_request">18</property> + <property name="height_request">18</property> + <property name="visible">True</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">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + </packing> + </child> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> + <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> + + <child> + <widget class="GtkVBox" id="vbox5"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">4</property> <child> - <widget class="GtkImage" id="image_step4"> - <property name="width_request">18</property> - <property name="height_request">18</property> + <widget class="GtkProgressBar" id="progressbar_cache"> + <property name="width_request">350</property> <property name="visible">True</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="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property> + <property name="fraction">0</property> + <property name="pulse_step">0.10000000149</property> + <property name="text" translatable="yes"> </property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkLabel" id="label_step1"> + <widget class="GtkLabel" id="label_status"> <property name="visible">True</property> - <property name="label" translatable="yes">Analyzing the system</property> + <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="wrap">True</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0.5</property> @@ -171,23 +344,19 @@ <property name="angle">0</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">expand|shrink|fill</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkLabel" id="label_step2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Updating repository information</property> + <widget class="GtkLabel" id="label_extra_status"> + <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="wrap">True</property> <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0.5</property> @@ -199,53 +368,72 @@ <property name="angle">0</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">expand|shrink|fill</property> - <property name="y_options"></property> + <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> + + <child> + <widget class="GtkExpander" id="expander_terminal"> + <property name="can_focus">True</property> + <property name="expanded">False</property> + <property name="spacing">0</property> <child> - <widget class="GtkLabel" id="label_step3"> + <widget class="GtkHBox" id="hbox1"> <property name="visible">True</property> - <property name="label" translatable="yes">Performing 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">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> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="Custom" id="custom_terminal"> + <property name="visible">True</property> + <property name="creation_function">create_terminal</property> + <property name="int1">0</property> + <property name="int2">0</property> + <property name="last_modification_time">Tue, 06 Dec 2005 20:03:08 GMT</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkVScrollbar" id="vscrollbar_terminal"> + <property name="visible">True</property> + <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> + <property name="inverted">False</property> + <property name="adjustment">0 0 0 0 0 0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">expand|shrink|fill</property> - <property name="y_options"></property> - </packing> </child> <child> - <widget class="GtkLabel" id="label_step4"> + <widget class="GtkLabel" id="label6"> <property name="visible">True</property> - <property name="label" translatable="yes">Post upgrade stuff</property> + <property name="label" translatable="yes">Terminal</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="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -255,15 +443,15 @@ <property name="angle">0</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">expand|shrink|fill</property> - <property name="y_options"></property> + <property name="type">label_item</property> </packing> </child> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> <packing> @@ -274,195 +462,33 @@ </child> <child> - <widget class="GtkFrame" id="frame1"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> + <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="GtkAlignment" id="alignment1"> + <widget class="GtkButton" id="button3"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">12</property> - - <child> - <widget class="GtkVBox" id="vbox5"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label_status"> - <property name="visible">True</property> - <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">True</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="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkProgressBar" id="progressbar_cache"> - <property name="width_request">350</property> - <property name="visible">True</property> - <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property> - <property name="fraction">0</property> - <property name="pulse_step">0.10000000149</property> - <property name="text" translatable="yes"> </property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</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="label_extra_status"> - <property name="visible">True</property> - <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">True</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="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkExpander" id="expander_terminal"> - <property name="can_focus">True</property> - <property name="expanded">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="Custom" id="custom_terminal"> - <property name="visible">True</property> - <property name="creation_function">create_terminal</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Tue, 06 Dec 2005 20:03:08 GMT</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkVScrollbar" id="vscrollbar_terminal"> - <property name="visible">True</property> - <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> - <property name="inverted">False</property> - <property name="adjustment">0 0 0 0 0 0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="label" translatable="yes">Terminal</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">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> + <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="GtkLabel" id="label16"> + <widget class="GtkButton" id="button4"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Current Step</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</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> + <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> - <packing> - <property name="type">label_item</property> - </packing> </child> </widget> <packing> diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index e67009cf..bea1e40f 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -217,9 +217,8 @@ class DistUpgradeControler(object): self._view.error(_("Error during commit"), _("Some problem occured during the clean-up. " "Please see the below message for more " - "information. ", + "information. "), "%s" % e) - self.cache.commit(fprogress,iprogress) def askForReboot(self): diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index 55f1f6fd..a313ce4f 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -27,6 +27,7 @@ import gtk.glade import vte import gobject import pango +import sys import apt import apt_pkg @@ -194,6 +195,16 @@ class GtkDistUpgradeView(DistUpgradeView,SimpleGladeApp): self.treeview_details.append_column(column) self.treeview_details.set_model(self.details_list) self.vscrollbar_terminal.set_adjustment(self._term.get_adjustment()) + # Use italic style in the status labels + + attrlist=pango.AttrList() + attr = pango.AttrStyle(pango.STYLE_ITALIC, 0, -1) + attrlist.insert(attr) + + + self.label_status.set_property("attributes", attrlist) + self.label_extra_status.set_property("attributes", attrlist) + #self.label_status_extra.set_property("attributes", pango.AttrStyle(pango.STYLE_ITALIC, 0, -1)) def create_terminal(self, arg1,arg2,arg3,arg4): " helper to create a vte terminal " @@ -207,7 +218,7 @@ class GtkDistUpgradeView(DistUpgradeView,SimpleGladeApp): def getOpCacheProgress(self): return self._opCacheProgress def updateStatus(self, msg): - self.label_status.set_markup("%s" % msg) + self.label_status.set_text("%s" % msg) def setStep(self, step): # first update the "last" step as completed size = gtk.ICON_SIZE_MENU @@ -220,9 +231,9 @@ class GtkDistUpgradeView(DistUpgradeView,SimpleGladeApp): image = getattr(self,"image_step%i" % step) label = getattr(self,"label_step%i" % step) image.set_from_stock(gtk.STOCK_YES, size) + attr = pango.AttrWeight(pango.WEIGHT_BOLD, 0, -1) # we can't make it bold here without layout changes in the view :( - #attr = pango.AttrWeight(pango.WEIGHT_BOLD, 0, -1) - attr = pango.AttrStyle(pango.STYLE_ITALIC, 0, -1) + #attr = pango.AttrStyle(pango.STYLE_ITALIC, 0, -1) attrlist.insert(attr) label.set_property("attributes",attrlist) @@ -286,6 +297,15 @@ class GtkDistUpgradeView(DistUpgradeView,SimpleGladeApp): return True return False + def on_window_main_delete_event(self, widget, event): + #print "on_window_main_delete_event()" + summary = _("Are you sure you want cancel?") + msg = _("Canceling during a upgrade can leave the system in a " + "unstable state. It is strongly adviced to continue " + "the operation. ") + if self.askYesNoQuestion(summary, msg): + self.exit(1) + return True if __name__ == "__main__": view = GtkDistUpgradeView() diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 89107f95..66e5f077 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -387,12 +387,20 @@ class UpdateManager(SimpleGladeApp): def update_count(self): if len(self.packages) == 0: - text_header= _("<big><b>No updates available</b></big>") + text_header= "<big><b>"+_("Your system is up-to-date")+"</b></big>" text_download = "" + self.expander_details.set_sensitive(False) + self.treeview_update.set_sensitive(False) + self.label_downsize.hide() + self.button_cancel.grab_default() else: - text_header = gettext.ngettext("<big><b>You can install one update</b></big>", "<big><b>You can install %s updates</b></big>" % len(self.store), len(self.store)) + text_header = "<big><b>"+gettext.ngettext("You can install one update", "You can install %s updates" % len(self.store), len(self.store))+"</b></big>" text_download = _("Download size: %s" % apt_pkg.SizeToStr(self.dl_size)) + self.expander_details.set_sensitive(True) + self.treeview_update.set_sensitive(True) + self.label_downsize.show() + self.button_install.grab_default() self.label_header.set_markup(text_header) self.label_downsize.set_markup(text_download) @@ -665,7 +673,6 @@ class UpdateManager(SimpleGladeApp): text = "<big><b>%s</b></big>\n\n%s" % (_("Your system is up-to-date"), _("There are no updates available.")) self.label_header.set_markup(text) - self.store.append([False, _("Your system is up-to-date!"), None, None, None, None, None]) # make sure no install is possible self.button_install.set_sensitive(False) self.textview_changes.get_buffer().set_text("") diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index 80f82a12..c9b50999 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -26,7 +26,7 @@ <property name="border_width">6</property> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">12</property> + <property name="spacing">6</property> <child> <widget class="GtkVBox" id="vbox10"> @@ -37,7 +37,6 @@ <child> <widget class="GtkHBox" id="hbox3"> - <property name="border_width">6</property> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">12</property> @@ -67,7 +66,7 @@ <child> <widget class="GtkLabel" id="label_header"> <property name="visible">True</property> - <property name="label" translatable="yes" context="yes"><big><b>Available Updates</b></big></property> + <property name="label" translatable="yes" context="yes"><big><b>Install software updates</b></big></property> <property name="use_underline">True</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -251,7 +250,6 @@ <child> <widget class="GtkLabel" id="label_downsize"> - <property name="visible">True</property> <property name="label" translatable="yes"></property> <property name="use_underline">False</property> <property name="use_markup">False</property> @@ -753,7 +751,7 @@ <child> <widget class="GtkLabel" id="label16"> <property name="visible">True</property> - <property name="label" translatable="yes">_Install Updates</property> + <property name="label" translatable="yes">_Install</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -953,13 +951,13 @@ Need to get the changes from the central server</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> - <property name="has_separator">True</property> + <property name="has_separator">False</property> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox3"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="spacing">6</property> <child internal-child="action_area"> <widget class="GtkHButtonBox" id="dialog-action_area3"> @@ -1002,6 +1000,7 @@ Need to get the changes from the central server</property> <child> <widget class="GtkScrolledWindow" id="scrolledwindow5"> + <property name="border_width">6</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> |
