gnome-packagekit r76 - in trunk: data src



Author: rhughes
Date: Fri Jan 18 23:13:03 2008
New Revision: 76
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=76&view=rev

Log:
from git

Modified:
   trunk/data/pk-update-viewer.glade
   trunk/src/pk-application.c
   trunk/src/pk-common-gui.c
   trunk/src/pk-common-gui.h
   trunk/src/pk-update-viewer.c

Modified: trunk/data/pk-update-viewer.glade
==============================================================================
--- trunk/data/pk-update-viewer.glade	(original)
+++ trunk/data/pk-update-viewer.glade	Fri Jan 18 23:13:03 2008
@@ -13,178 +13,852 @@
       <widget class="GtkVBox" id="vbox4">
         <property name="visible">True</property>
         <child>
-          <widget class="GtkVBox" id="vbox1">
+          <widget class="GtkNotebook" id="notebook_hidden">
             <property name="visible">True</property>
-            <property name="border_width">10</property>
-            <property name="spacing">5</property>
+            <property name="can_focus">True</property>
             <child>
-              <widget class="GtkVBox" id="vbox_rows">
+              <widget class="GtkVBox" id="vbox_preview">
                 <property name="visible">True</property>
-                <property name="spacing">10</property>
+                <property name="border_width">10</property>
+                <property name="spacing">5</property>
                 <child>
-                  <widget class="GtkScrolledWindow" id="scrolledwindow_packages">
+                  <widget class="GtkHBox" id="hbox4">
+                    <property name="visible">True</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <widget class="GtkLabel" id="label7">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">The following updates are available:</property>
+                        <property name="wrap">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkScrolledWindow" id="scrolledwindow_preview">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                    <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
                     <property name="shadow_type">GTK_SHADOW_IN</property>
                     <child>
-                      <widget class="GtkTreeView" id="treeview_updates">
+                      <widget class="GtkTreeView" id="treeview_preview">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
+                        <property name="headers_visible">False</property>
+                        <property name="enable_search">False</property>
                       </widget>
                     </child>
                   </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
                 </child>
-
                 <child>
-                  <widget class="GtkExpander" id="details_expander">
+                  <widget class="GtkHButtonBox" id="hbuttonbox1">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="expanded">False</property>
-                    <property name="spacing">6</property>
-
+                    <property name="spacing">5</property>
+                    <property name="layout_style">GTK_BUTTONBOX_END</property>
+                    <child>
+                      <widget class="GtkButton" id="button_help">
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="label">gtk-help</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="secondary">True</property>
+                      </packing>
+                    </child>
                     <child>
-                      <widget class="GtkScrolledWindow" id="details_scrolledwindow">
+                      <widget class="GtkButton" id="button_refresh">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
-                        <property name="shadow_type">GTK_SHADOW_IN</property>
-                        <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
+                        <property name="can_default">True</property>
+                        <property name="response_id">0</property>
                         <child>
-                          <widget class="GtkTextView" id="details_textview">
+                          <widget class="GtkAlignment" id="alignment1">
                             <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_WORD</property>
-                            <property name="cursor_visible">False</property>
-                            <property name="pixels_above_lines">0</property>
-                            <property name="pixels_below_lines">0</property>
-                            <property name="pixels_inside_wrap">0</property>
-                            <property name="left_margin">0</property>
-                            <property name="right_margin">0</property>
-                            <property name="indent">0</property>
-                            <property name="text"></property>
+                            <property name="xscale">0</property>
+                            <property name="yscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox1">
+                                <property name="visible">True</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image1">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-refresh</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label10">
+                                    <property name="visible">True</property>
+                                    <property name="label">Force _Refresh</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
                           </widget>
                         </child>
                       </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
                     </child>
-
                     <child>
-                      <widget class="GtkLabel" id="details_label">
+                      <widget class="GtkButton" id="button_apply2">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Details&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">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_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="response_id">0</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment8">
+                            <property name="visible">True</property>
+                            <property name="xscale">0</property>
+                            <property name="yscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox11">
+                                <property name="visible">True</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image10">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-apply</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label19">
+                                    <property name="visible">True</property>
+                                    <property name="label">_Update System</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
                       </widget>
                       <packing>
-                        <property name="type">label_item</property>
+                        <property name="position">2</property>
                       </packing>
                     </child>
-		  </widget>
+                    <child>
+                      <widget class="GtkButton" id="button_review">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="response_id">0</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment2">
+                            <property name="visible">True</property>
+                            <property name="xscale">0</property>
+                            <property name="yscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox2">
+                                <property name="visible">True</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image2">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-go-forward</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label11">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">_Review Updates</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_close3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="label">gtk-close</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                  </widget>
                   <packing>
-                    <property name="padding">12</property>
                     <property name="expand">False</property>
-                    <property name="fill">True</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </widget>
             </child>
             <child>
-              <widget class="GtkHButtonBox" id="hbuttonbox1">
+              <widget class="GtkLabel" id="label1">
                 <property name="visible">True</property>
-                <property name="spacing">5</property>
-                <property name="layout_style">GTK_BUTTONBOX_END</property>
+                <property name="label" translatable="yes">Preview</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox_details">
+                <property name="visible">True</property>
+                <property name="border_width">10</property>
                 <child>
-                  <widget class="GtkButton" id="button_help">
-                    <property name="visible">False</property>
+                  <widget class="GtkScrolledWindow" id="scrolledwindow_packages">
+                    <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="can_default">True</property>
-                    <property name="label">gtk-help</property>
-                    <property name="use_stock">True</property>
-                    <property name="response_id">0</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>
+                    <child>
+                      <widget class="GtkTreeView" id="treeview_updates">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="headers_visible">False</property>
+                      </widget>
+                    </child>
                   </widget>
-                  <packing>
-                    <property name="secondary">True</property>
-                  </packing>
                 </child>
                 <child>
-                  <widget class="GtkButton" id="button_refresh">
+                  <widget class="GtkScrolledWindow" id="details_scrolledwindow">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="can_default">True</property>
-                    <property name="label">Force _Refresh</property>
-                    <property name="use_underline">True</property>
-                    <property name="response_id">0</property>
+                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                    <property name="shadow_type">GTK_SHADOW_IN</property>
+                    <child>
+                      <widget class="GtkTextView" id="details_textview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="editable">False</property>
+                        <property name="wrap_mode">GTK_WRAP_WORD</property>
+                        <property name="cursor_visible">False</property>
+                      </widget>
+                    </child>
                   </widget>
                   <packing>
+                    <property name="expand">False</property>
+                    <property name="padding">12</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkButton" id="button_close">
+                  <widget class="GtkHBox" id="hbox_reboot">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="can_default">True</property>
-                    <property name="label">gtk-cancel</property>
-                    <property name="use_stock">True</property>
-                    <property name="response_id">0</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <widget class="GtkImage" id="image9">
+                        <property name="visible">True</property>
+                        <property name="stock">gtk-dialog-info</property>
+                        <property name="icon_size">6</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;This update will require a reboot&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
                   </widget>
                   <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkButton" id="button_update">
+                  <widget class="GtkHButtonBox" id="hbuttonbox3">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="can_default">True</property>
-                    <property name="response_id">0</property>
+                    <property name="spacing">5</property>
+                    <property name="layout_style">GTK_BUTTONBOX_END</property>
                     <child>
-                      <widget class="GtkLabel" id="label25">
+                      <widget class="GtkButton" id="button_help2">
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="label">gtk-help</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="secondary">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_overview">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">Update _Package</property>
-                        <property name="use_underline">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="response_id">0</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment9">
+                            <property name="visible">True</property>
+                            <property name="xscale">0</property>
+                            <property name="yscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox8">
+                                <property name="visible">True</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image7">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-go-back</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label6">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">_Back to overview</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_update">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="response_id">0</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment3">
+                            <property name="visible">True</property>
+                            <property name="xscale">0</property>
+                            <property name="yscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox5">
+                                <property name="visible">True</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image4">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-add</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label12">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Update _Package</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
                       </widget>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_apply">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="response_id">0</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment4">
+                            <property name="visible">True</property>
+                            <property name="xscale">0</property>
+                            <property name="yscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox6">
+                                <property name="visible">True</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image5">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-apply</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label13">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">_Update System</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_close2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="label">gtk-close</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="position">4</property>
+                      </packing>
                     </child>
                   </widget>
                   <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
                     <property name="position">3</property>
                   </packing>
                 </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Details</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox_progress">
+                <property name="visible">True</property>
+                <property name="border_width">10</property>
+                <property name="spacing">5</property>
                 <child>
-                  <widget class="GtkButton" id="button_apply">
+                  <widget class="GtkScrolledWindow" id="scrolledwindow_history">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="can_default">True</property>
-                    <property name="label" translatable="yes">_Update System</property>
-                    <property name="use_underline">True</property>
-                    <property name="response_id">0</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>
+                    <child>
+                      <widget class="GtkTreeView" id="treeview_history">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="headers_visible">False</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkProgressBar" id="progressbar_subpercent">
+                    <property name="visible">True</property>
+                    <property name="pulse_step">0.10000000149</property>
                   </widget>
                   <packing>
-                    <property name="position">4</property>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHButtonBox" id="hbuttonbox4">
+                    <property name="visible">True</property>
+                    <property name="spacing">5</property>
+                    <property name="layout_style">GTK_BUTTONBOX_END</property>
+                    <child>
+                      <widget class="GtkButton" id="button_help3">
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="label">gtk-help</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="secondary">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_cancel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="response_id">0</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment7">
+                            <property name="visible">True</property>
+                            <property name="xscale">0</property>
+                            <property name="yscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox9">
+                                <property name="visible">True</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image8">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-cancel</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label17">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">_Cancel Update</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_close">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="label">gtk-close</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="pack_type">GTK_PACK_END</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
               </widget>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label3">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Progress</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox_confirm">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">10</property>
+                <property name="spacing">5</property>
+                <child>
+                  <widget class="GtkHBox" id="hbox14">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkImage" id="image13">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="icon_size">6</property>
+                        <property name="icon_name">computer</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="padding">20</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkVBox" id="vbox6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="spacing">20</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox17">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <widget class="GtkLabel" id="label16">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">&lt;b&gt;System Update Completed!&lt;/b&gt;</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox18">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <widget class="GtkLabel" id="label20">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">All selected updates have been successfully installed</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox_restart">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="spacing">5</property>
+                            <child>
+                              <widget class="GtkImage" id="image15">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="stock">gtk-dialog-info</property>
+                                <property name="icon_size">6</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label15">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">A system restart is recommended</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkHButtonBox" id="hbuttonbox5">
+                    <property name="visible">True</property>
+                    <property name="spacing">5</property>
+                    <property name="layout_style">GTK_BUTTONBOX_END</property>
+                    <child>
+                      <widget class="GtkButton" id="button_help4">
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="label">gtk-help</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="secondary">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_restart">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="response_id">0</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment11">
+                            <property name="visible">True</property>
+                            <property name="xscale">0</property>
+                            <property name="yscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox13">
+                                <property name="visible">True</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image12">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-refresh</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label14">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">_Restart computer now</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_close4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="label">gtk-close</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Confirm</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
               </packing>
             </child>
           </widget>

Modified: trunk/src/pk-application.c
==============================================================================
--- trunk/src/pk-application.c	(original)
+++ trunk/src/pk-application.c	Fri Jan 18 23:13:03 2008
@@ -227,7 +227,7 @@
  * pk_application_requires_finished_cb:
  **/
 static void
-pk_application_requires_finished_cb (PkClient *client, PkStatusEnum status, guint runtime, PkApplication *application)
+pk_application_requires_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, PkApplication *application)
 {
 	guint length;
 	gchar *title;

Modified: trunk/src/pk-common-gui.c
==============================================================================
--- trunk/src/pk-common-gui.c	(original)
+++ trunk/src/pk-common-gui.c	Fri Jan 18 23:13:03 2008
@@ -42,6 +42,8 @@
 	{PK_INFO_ENUM_NORMAL,			"software-update-available"},
 	{PK_INFO_ENUM_IMPORTANT,		"software-update-urgent"},
 	{PK_INFO_ENUM_SECURITY,			"software-update-urgent"},
+	{PK_INFO_ENUM_BUGFIX,			"software-update-urgent"},
+	{PK_INFO_ENUM_ENHANCEMENT,		"software-update-urgent"},
 	{PK_INFO_ENUM_BLOCKED,			"help-browser"}, /* TODO: need better icon */
 	{PK_INFO_ENUM_DOWNLOADING,		"pk-package-download"},
 	{PK_INFO_ENUM_UPDATING,			"pk-package-update"},
@@ -125,6 +127,10 @@
 	{PK_GROUP_ENUM_VIRTUALIZATION,		"computer"},
 	{PK_GROUP_ENUM_SECURITY,		"network-wireless-encrypted"},
 	{PK_GROUP_ENUM_POWER_MANAGEMENT,	"battery"},
+	{PK_GROUP_ENUM_COMMUNICATION,		"folder-remote"},
+	{PK_GROUP_ENUM_NETWORK,			"network-wired"},
+	{PK_GROUP_ENUM_MAPS,			"applications-multimedia"},
+	{PK_GROUP_ENUM_REPOS,			"system-file-manager"},
 	{0, NULL},
 };
 
@@ -375,6 +381,7 @@
 
 	return escaped;
 }
+
 /**
  * pk_error_enum_to_localised_text:
  **/
@@ -603,6 +610,39 @@
 }
 
 /**
+ * pk_update_enum_to_localised_text:
+ **/
+gchar *
+pk_update_enum_to_localised_text (PkInfoEnum info, guint number)
+{
+	gchar *text = NULL;
+	switch (info) {
+	case PK_INFO_ENUM_LOW:
+		text = g_strdup_printf (ngettext ("%i trivial update", "%i trivial updates", number), number);
+		break;
+	case PK_INFO_ENUM_NORMAL:
+		text = g_strdup_printf (ngettext ("%i normal update", "%i normal updates", number), number);
+		break;
+	case PK_INFO_ENUM_IMPORTANT:
+		text = g_strdup_printf (ngettext ("%i important update", "%i important updates", number), number);
+		break;
+	case PK_INFO_ENUM_SECURITY:
+		text = g_strdup_printf (ngettext ("%i security update", "%i security updates", number), number);
+		break;
+	case PK_INFO_ENUM_BUGFIX:
+		text = g_strdup_printf (ngettext ("%i bug fix update", "%i bug fix updates", number), number);
+		break;
+	case PK_INFO_ENUM_ENHANCEMENT:
+		text = g_strdup_printf (ngettext ("%i enhancement update", "%i enhancement updates", number), number);
+		break;
+	default:
+		text = g_strdup_printf (ngettext ("%i unknown update", "%i unknown updates", number), number);
+		pk_warning ("update info unrecognised: %s", pk_info_enum_to_text (info));
+	}
+	return text;
+}
+
+/**
  * pk_info_enum_to_localised_text:
  **/
 const gchar *
@@ -611,10 +651,10 @@
 	const gchar *text = NULL;
 	switch (info) {
 	case PK_INFO_ENUM_LOW:
-		text = _("Bugfix update");
+		text = _("Trivial update");
 		break;
 	case PK_INFO_ENUM_NORMAL:
-		text = _("Update");
+		text = _("Normal update");
 		break;
 	case PK_INFO_ENUM_IMPORTANT:
 		text = _("Important update");
@@ -622,6 +662,12 @@
 	case PK_INFO_ENUM_SECURITY:
 		text = _("Security update");
 		break;
+	case PK_INFO_ENUM_BUGFIX:
+		text = _("Bug fix update");
+		break;
+	case PK_INFO_ENUM_ENHANCEMENT:
+		text = _("Enhancement update");
+		break;
 	case PK_INFO_ENUM_BLOCKED:
 		text = _("Blocked update");
 		break;
@@ -889,6 +935,18 @@
 	case PK_GROUP_ENUM_POWER_MANAGEMENT:
 		text = _("Power management");
 		break;
+	case PK_GROUP_ENUM_COMMUNICATION:
+		text = _("Communication");
+		break;
+	case PK_GROUP_ENUM_NETWORK:
+		text = _("Network");
+		break;
+	case PK_GROUP_ENUM_MAPS:
+		text = _("Maps");
+		break;
+	case PK_GROUP_ENUM_REPOS:
+		text = _("Software sources");
+		break;
 	case PK_GROUP_ENUM_UNKNOWN:
 		text = _("Unknown group");
 		break;

Modified: trunk/src/pk-common-gui.h
==============================================================================
--- trunk/src/pk-common-gui.h	(original)
+++ trunk/src/pk-common-gui.h	Fri Jan 18 23:13:03 2008
@@ -80,6 +80,8 @@
 const gchar	*pk_group_enum_to_localised_text	(PkGroupEnum	 group);
 const gchar	*pk_group_enum_to_icon_name		(PkGroupEnum	 group);
 gchar		*pk_size_to_si_size_text		(guint64	 size);
+gchar		*pk_update_enum_to_localised_text	(PkInfoEnum	 info,
+							 guint		 number);
 gchar		*pk_time_to_localised_string		(guint		 time_secs);
 
 G_END_DECLS

Modified: trunk/src/pk-update-viewer.c
==============================================================================
--- trunk/src/pk-update-viewer.c	(original)
+++ trunk/src/pk-update-viewer.c	Fri Jan 18 23:13:03 2008
@@ -42,14 +42,27 @@
 #include "pk-statusbar.h"
 
 static GladeXML *glade_xml = NULL;
-static GtkListStore *list_store = NULL;
+static GtkListStore *list_store_preview = NULL;
+static GtkListStore *list_store_history = NULL;
+static GtkListStore *list_store_details = NULL;
 static PkClient *client = NULL;
 static PkTaskList *tlist = NULL;
 static gchar *package = NULL;
 static PkStatusbar *statusbar = NULL;
 
-enum
-{
+enum {
+	PREVIEW_COLUMN_ICON,
+	PREVIEW_COLUMN_TEXT,
+	PREVIEW_COLUMN_LAST
+};
+
+enum {
+	HISTORY_COLUMN_ICON,
+	HISTORY_COLUMN_TEXT,
+	HISTORY_COLUMN_LAST
+};
+
+enum {
 	PACKAGES_COLUMN_ICON,
 	PACKAGES_COLUMN_TEXT,
 	PACKAGES_COLUMN_ID,
@@ -79,24 +92,83 @@
 		/* make the refresh button non-clickable until we have completed */
 		widget = glade_xml_get_widget (glade_xml, "button_apply");
 		gtk_widget_set_sensitive (widget, FALSE);
-
+		widget = glade_xml_get_widget (glade_xml, "button_apply2");
+		gtk_widget_set_sensitive (widget, FALSE);
 		widget = glade_xml_get_widget (glade_xml, "button_refresh");
 		gtk_widget_set_sensitive (widget, FALSE);
 	}
 }
 
+typedef enum {
+	PAGE_PREVIEW,
+	PAGE_DETAILS,
+	PAGE_PROGRESS,
+	PAGE_CONFIRM,
+	PAGE_LAST
+} PkPageEnum;
+
+/**
+ * pk_updates_apply_cb:
+ **/
+static void
+pk_updates_set_page (PkPageEnum page)
+{
+	GtkWidget *notebook;
+	GtkWidget *widget;
+
+	notebook = glade_xml_get_widget (glade_xml, "notebook_hidden");
+
+	/* preview */
+	widget = glade_xml_get_widget (glade_xml, "vbox_preview");
+	if (page == PAGE_PREVIEW) {
+		gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
+		gtk_widget_show (widget);
+	} else {
+		gtk_widget_hide (widget);
+	}
+
+	/* details */
+	widget = glade_xml_get_widget (glade_xml, "vbox_details");
+	if (page == PAGE_DETAILS) {
+		gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 1);
+		gtk_widget_show (widget);
+	} else {
+		gtk_widget_hide (widget);
+	}
+
+	/* progress */
+	widget = glade_xml_get_widget (glade_xml, "vbox_progress");
+	if (page == PAGE_PROGRESS) {
+		gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 2);
+		gtk_widget_show (widget);
+	} else {
+		gtk_widget_hide (widget);
+	}
+
+	/* confirm */
+	widget = glade_xml_get_widget (glade_xml, "vbox_confirm");
+	if (page == PAGE_CONFIRM) {
+		gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 3);
+		gtk_widget_show (widget);
+	} else {
+		gtk_widget_hide (widget);
+	}
+}
+
 /**
  * pk_updates_apply_cb:
  **/
 static void
 pk_updates_apply_cb (GtkWidget *widget, gpointer data)
 {
-	GMainLoop *loop = (GMainLoop *) data;
+//	GMainLoop *loop = (GMainLoop *) data;
 	pk_debug ("Doing the system update");
 
 	pk_client_reset (client);
 	pk_client_update_system (client);
-	g_main_loop_quit (loop);
+
+	/* set correct view */
+	pk_updates_set_page (PAGE_PROGRESS);
 }
 
 /**
@@ -108,7 +180,7 @@
 	gboolean ret;
 
 	/* clear existing list */
-	gtk_list_store_clear (list_store);
+	gtk_list_store_clear (list_store_details);
 
 	/* make the refresh button non-clickable */
 	gtk_widget_set_sensitive (widget, FALSE);
@@ -116,6 +188,10 @@
 	/* make the apply button non-clickable until we get completion */
 	widget = glade_xml_get_widget (glade_xml, "button_apply");
 	gtk_widget_set_sensitive (widget, FALSE);
+	widget = glade_xml_get_widget (glade_xml, "button_apply2");
+	gtk_widget_set_sensitive (widget, FALSE);
+	widget = glade_xml_get_widget (glade_xml, "button_review");
+	gtk_widget_set_sensitive (widget, FALSE);
 
 	/* we can't click this if we havn't finished */
 	pk_client_reset (client);
@@ -130,8 +206,7 @@
  * pk_button_close_cb:
  **/
 static void
-pk_button_close_cb (GtkWidget	*widget,
-		     gpointer data)
+pk_button_close_cb (GtkWidget *widget, gpointer data)
 {
 	GMainLoop *loop = (GMainLoop *) data;
 
@@ -143,6 +218,26 @@
 }
 
 /**
+ * pk_button_review_cb:
+ **/
+static void
+pk_button_review_cb (GtkWidget *widget, gpointer data)
+{
+	/* set correct view */
+	pk_updates_set_page (PAGE_DETAILS);
+}
+
+/**
+ * pk_button_overview_cb:
+ **/
+static void
+pk_button_overview_cb (GtkWidget *widget, gpointer data)
+{
+	/* set correct view */
+	pk_updates_set_page (PAGE_PREVIEW);
+}
+
+/**
  * pk_updates_package_cb:
  **/
 static void
@@ -155,24 +250,33 @@
 	const gchar *icon_name;
 
 	pk_client_get_role (client, &role, NULL);
+	pk_debug ("package = %s:%s:%s", pk_info_enum_to_text (info), package_id, summary);
 
-	if (role != PK_ROLE_ENUM_GET_UPDATES) {
-		pk_debug ("not in get_updates");
+	if (role == PK_ROLE_ENUM_GET_UPDATES) {
+		text = pk_package_id_pretty (package_id, summary);
+		icon_name = pk_info_enum_to_icon_name (info);
+		gtk_list_store_append (list_store_details, &iter);
+		gtk_list_store_set (list_store_details, &iter,
+				    PACKAGES_COLUMN_TEXT, text,
+				    PACKAGES_COLUMN_ID, package_id,
+				    PACKAGES_COLUMN_ICON, icon_name,
+				    PACKAGES_COLUMN_INFO, info,
+				    -1);
+		g_free (text);
 		return;
 	}
 
-	pk_debug ("package = %s:%s:%s", pk_info_enum_to_text (info), package_id, summary);
-
-	text = pk_package_id_pretty (package_id, summary);
-	icon_name = pk_info_enum_to_icon_name (info);
-	gtk_list_store_append (list_store, &iter);
-	gtk_list_store_set (list_store, &iter,
-			    PACKAGES_COLUMN_TEXT, text,
-			    PACKAGES_COLUMN_ID, package_id,
-			    PACKAGES_COLUMN_ICON, icon_name,
-			    PACKAGES_COLUMN_INFO, info,
-			    -1);
-	g_free (text);
+	if (role == PK_ROLE_ENUM_UPDATE_SYSTEM) {
+		text = pk_package_id_pretty (package_id, summary);
+		icon_name = pk_info_enum_to_icon_name (info);
+		gtk_list_store_append (list_store_history, &iter);
+		gtk_list_store_set (list_store_history, &iter,
+				    HISTORY_COLUMN_TEXT, text,
+				    HISTORY_COLUMN_ICON, icon_name,
+				    -1);
+		g_free (text);
+		return;
+	}
 }
 
 /**
@@ -204,8 +308,14 @@
 	gchar **u;
 	gboolean has_title;
 
+	/* initially we are hidden */
+	widget = glade_xml_get_widget (glade_xml, "details_scrolledwindow");
+	gtk_widget_show (widget);
+
 	/* Grr, need to look up the info from the packages list */
 	widget = glade_xml_get_widget (glade_xml, "treeview_updates");
+	gtk_widget_set_size_request (GTK_WIDGET (widget), 500, 200);
+
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
 	if (gtk_tree_selection_get_selected (selection, &model, &treeiter)) {
 		gtk_tree_model_get (model, &treeiter,
@@ -260,7 +370,7 @@
 		g_free (obsoletes_pretty);
 	}
 
-        ident = pk_package_id_new_from_string (package_id);
+	ident = pk_package_id_new_from_string (package_id);
 	ADD_LINE(_("Repository"), ident->data);
 
 	if (!pk_strzero (update_text)) {
@@ -312,15 +422,11 @@
 
 	if (restart == PK_RESTART_ENUM_SESSION ||
 	    restart == PK_RESTART_ENUM_SYSTEM) {
-		gtk_text_buffer_insert (buffer, &iter, "\n\n", -1);
-		text = g_strdup_printf ("%12s ", "");
-		gtk_text_buffer_insert_with_tags (buffer, &iter, text, -1, space_tag, NULL);
-		g_free (text);
-		gtk_text_buffer_insert (buffer, &iter, " ", -1);
-		gtk_text_buffer_insert_with_tags (buffer, &iter,
-						  _("This update will require a reboot."), -1,
-						  bold_tag, NULL);
-		gtk_text_buffer_insert (buffer, &iter, "\n", -1);
+		widget = glade_xml_get_widget (glade_xml, "hbox_reboot");
+		gtk_widget_show (widget);
+	} else {
+		widget = glade_xml_get_widget (glade_xml, "hbox_reboot");
+		gtk_widget_hide (widget);
 	}
 
 	gtk_text_view_set_buffer (tv, buffer);
@@ -392,7 +498,7 @@
 		return FALSE;
 
 	gtk_text_view_window_to_buffer_coords (tv, GTK_TEXT_WINDOW_WIDGET,
-                                               event->x, event->y, &x, &y);
+					       event->x, event->y, &x, &y);
 	gtk_text_view_get_iter_at_location (tv, &iter, x, y);
 
 	follow_if_link (widget, &iter);
@@ -581,15 +687,13 @@
 	GtkTreeModel *model;
 	GtkTreeIter iter;
 	gchar *package_id;
-	GtkWidget *button;
 	GtkWidget *widget;
-	GtkTextBuffer *buffer;
 
-	widget = glade_xml_get_widget (glade_xml, "details_textview");
-	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
-	gtk_text_buffer_set_text (buffer, "", -1);
-
-	button = glade_xml_get_widget (glade_xml, "button_update");
+	/* hide the widgets until we have data */
+	widget = glade_xml_get_widget (glade_xml, "details_scrolledwindow");
+	gtk_widget_hide (widget);
+	widget = glade_xml_get_widget (glade_xml, "hbox_reboot");
+	gtk_widget_hide (widget);
 
 	/* This will only work in single or browse selection mode! */
 	if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
@@ -605,11 +709,12 @@
 		pk_client_reset (client);
 		pk_client_get_update_detail (client, package);
 
-                gtk_widget_set_sensitive (button, TRUE);
+		widget = glade_xml_get_widget (glade_xml, "button_update");
+		gtk_widget_set_sensitive (widget, TRUE);
 	} else {
 		g_print ("no row selected.\n");
-
-                gtk_widget_set_sensitive (button, FALSE);
+		widget = glade_xml_get_widget (glade_xml, "button_update");
+		gtk_widget_set_sensitive (widget, FALSE);
 	}
 }
 
@@ -626,29 +731,36 @@
  * pk_updates_set_aux_status:
  **/
 static void
-pk_updates_set_aux_status (PkClient *client, const gchar *message)
+pk_updates_set_aux_status (PkClient *client, const gchar *icon, const gchar *message)
 {
+	GtkWidget *tree_view;
+	GtkTreeSelection *selection;
 	GtkTreeIter iter;
 	gchar *markup;
 
 	markup = g_strdup_printf ("<b>%s</b>", message);
-	gtk_list_store_append (list_store, &iter);
-	gtk_list_store_set (list_store, &iter,
+	gtk_list_store_append (list_store_preview, &iter);
+	gtk_list_store_set (list_store_preview, &iter,
 			    PACKAGES_COLUMN_TEXT, markup,
-			    PACKAGES_COLUMN_ICON, "dialog-information",
+			    PACKAGES_COLUMN_ICON, icon,
 			    -1);
 	g_free (markup);
+
+	tree_view = glade_xml_get_widget (glade_xml, "treeview_preview");
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
+	gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE);
 }
 
 /**
  * pk_updates_finished_cb:
  **/
 static void
-pk_updates_finished_cb (PkClient *client, PkStatusEnum status, guint runtime, gpointer data)
+pk_updates_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, gpointer data)
 {
 	GtkWidget *widget;
 	PkRoleEnum role;
 	guint length;
+	PkRestartEnum restart;
 
 	pk_client_get_role (client, &role, NULL);
 
@@ -656,10 +768,6 @@
 	pk_statusbar_hide (statusbar);
 
 	if (role == PK_ROLE_ENUM_REFRESH_CACHE) {
-		/* hide the details for now */
-		widget = glade_xml_get_widget (glade_xml, "details_expander");
-		gtk_expander_set_expanded (GTK_EXPANDER (widget), FALSE);
-
 		pk_client_reset (client);
 		pk_client_set_use_buffer (client, TRUE);
 		pk_client_get_updates (client);
@@ -674,18 +782,41 @@
 	/* make the refresh button clickable now we have completed */
 	widget = glade_xml_get_widget (glade_xml, "button_apply");
 	gtk_widget_set_sensitive (widget, TRUE);
-
+	widget = glade_xml_get_widget (glade_xml, "button_apply2");
+	gtk_widget_set_sensitive (widget, TRUE);
+	widget = glade_xml_get_widget (glade_xml, "button_review");
+	gtk_widget_set_sensitive (widget, TRUE);
 	widget = glade_xml_get_widget (glade_xml, "button_refresh");
 	gtk_widget_set_sensitive (widget, TRUE);
 
+	/* hide the cancel */
+	if (role == PK_ROLE_ENUM_UPDATE_SYSTEM) {
+		widget = glade_xml_get_widget (glade_xml, "button_cancel");
+		gtk_widget_hide (widget);
+
+		/* go onto the success page */
+		if (exit == PK_EXIT_ENUM_SUCCESS) {
+
+			/* do we have to show any widgets? */
+			restart = pk_client_get_require_restart (client);
+			if (restart == PK_RESTART_ENUM_SYSTEM ||
+			    restart == PK_RESTART_ENUM_SESSION) {
+				pk_debug ("showing reboot widgets");
+				widget = glade_xml_get_widget (glade_xml, "hbox_restart");
+				gtk_widget_show (widget);
+				widget = glade_xml_get_widget (glade_xml, "button_restart");
+				gtk_widget_show (widget);
+			}
+
+			/* set correct view */
+			pk_updates_set_page (PAGE_CONFIRM);
+		}
+	}
+
 	/* we don't need to do anything here */
 	if (role == PK_ROLE_ENUM_UPDATE_PACKAGE) {
 		/* clear existing list */
-		gtk_list_store_clear (list_store);
-
-		/* hide the details for now */
-		widget = glade_xml_get_widget (glade_xml, "details_expander");
-		gtk_expander_set_expanded (GTK_EXPANDER (widget), FALSE);
+		gtk_list_store_clear (list_store_details);
 
 		/* get the new update list */
 		pk_client_reset (client);
@@ -694,21 +825,91 @@
 		return;
 	}
 
+	/* clear existing lists */
+	gtk_list_store_clear (list_store_preview);
+
 	length = pk_client_package_buffer_get_size (client);
 	if (length == 0) {
-		/* clear existing list */
-		gtk_list_store_clear (list_store);
-
 		/* put a message in the listbox */
-		pk_updates_set_aux_status (client, _("There are no updates available!"));
+		pk_updates_set_aux_status (client, "dialog-information", _("There are no updates available!"));
 
 		/* if no updates then hide apply */
-		widget = glade_xml_get_widget (glade_xml, "button_apply");
+		widget = glade_xml_get_widget (glade_xml, "button_review");
+		gtk_widget_hide (widget);
+		widget = glade_xml_get_widget (glade_xml, "button_apply2");
 		gtk_widget_hide (widget);
 	} else {
+
+		PkPackageItem *item;
+		guint i;
+		guint num_low = 0;
+		guint num_normal = 0;
+		guint num_important = 0;
+		guint num_security = 0;
+		guint num_bugfix = 0;
+		guint num_enhancement = 0;
+		const gchar *icon;
+		gchar *text;
+
+		for (i=0;i<length;i++) {
+			item = pk_client_package_buffer_get_item (client, i);
+			if (item->info == PK_INFO_ENUM_LOW) {
+				num_low++;
+			} else if (item->info == PK_INFO_ENUM_IMPORTANT) {
+				num_important++;
+			} else if (item->info == PK_INFO_ENUM_SECURITY) {
+				num_security++;
+			} else if (item->info == PK_INFO_ENUM_BUGFIX) {
+				num_bugfix++;
+			} else if (item->info == PK_INFO_ENUM_ENHANCEMENT) {
+				num_enhancement++;
+			} else {
+				num_normal++;
+			}
+		}
+
+		/* add to preview box in order of priority */
+		if (num_security > 0) {
+			icon = pk_info_enum_to_icon_name (PK_INFO_ENUM_SECURITY);
+			text = pk_update_enum_to_localised_text (PK_INFO_ENUM_SECURITY, num_security);
+			pk_updates_set_aux_status (client, icon, text);
+			g_free (text);
+		}
+		if (num_important > 0) {
+			icon = pk_info_enum_to_icon_name (PK_INFO_ENUM_IMPORTANT);
+			text = pk_update_enum_to_localised_text (PK_INFO_ENUM_IMPORTANT, num_important);
+			pk_updates_set_aux_status (client, icon, text);
+			g_free (text);
+		}
+		if (num_bugfix > 0) {
+			icon = pk_info_enum_to_icon_name (PK_INFO_ENUM_BUGFIX);
+			text = pk_update_enum_to_localised_text (PK_INFO_ENUM_BUGFIX, num_bugfix);
+			pk_updates_set_aux_status (client, icon, text);
+			g_free (text);
+		}
+		if (num_enhancement > 0) {
+			icon = pk_info_enum_to_icon_name (PK_INFO_ENUM_ENHANCEMENT);
+			text = pk_update_enum_to_localised_text (PK_INFO_ENUM_ENHANCEMENT, num_enhancement);
+			pk_updates_set_aux_status (client, icon, text);
+			g_free (text);
+		}
+		if (num_low > 0) {
+			icon = pk_info_enum_to_icon_name (PK_INFO_ENUM_LOW);
+			text = pk_update_enum_to_localised_text (PK_INFO_ENUM_LOW, num_low);
+			pk_updates_set_aux_status (client, icon, text);
+			g_free (text);
+		}
+		if (num_normal > 0) {
+			icon = pk_info_enum_to_icon_name (PK_INFO_ENUM_NORMAL);
+			text = pk_update_enum_to_localised_text (PK_INFO_ENUM_NORMAL, num_normal);
+			pk_updates_set_aux_status (client, icon, text);
+			g_free (text);
+		}
+
 		/* set visible and sensitive */
-		widget = glade_xml_get_widget (glade_xml, "button_apply");
-		gtk_widget_set_sensitive (widget, TRUE);
+		widget = glade_xml_get_widget (glade_xml, "button_review");
+		gtk_widget_show (widget);
+		widget = glade_xml_get_widget (glade_xml, "button_apply2");
 		gtk_widget_show (widget);
 	}
 }
@@ -720,6 +921,16 @@
 pk_updates_progress_changed_cb (PkClient *client, guint percentage, guint subpercentage,
 				guint elapsed, guint remaining, gpointer data)
 {
+	GtkWidget *widget;
+	widget = glade_xml_get_widget (glade_xml, "progressbar_subpercent");
+
+	if (subpercentage == PK_CLIENT_PERCENTAGE_INVALID) {
+		gtk_widget_hide (widget);
+	} else {
+		gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (widget), (gfloat) subpercentage / 100.0);
+		gtk_widget_show (widget);
+	}
+
 	pk_statusbar_set_percentage (statusbar, percentage);
 	pk_statusbar_set_remaining (statusbar, remaining);
 }
@@ -735,10 +946,10 @@
 	/* hide buttons if we are updating */
 	if (pk_task_list_contains_role (tlist, PK_ROLE_ENUM_UPDATE_SYSTEM) == TRUE) {
 		/* clear existing list */
-		gtk_list_store_clear (list_store);
+		gtk_list_store_clear (list_store_details);
 
 		/* put a message in the listbox */
-		pk_updates_set_aux_status (client, _("There is an update already in progress!"));
+		pk_updates_set_aux_status (client, "dialog-information", _("There is an update already in progress!"));
 
 		/* if doing it then hide apply and refresh */
 		widget = glade_xml_get_widget (glade_xml, "button_apply");
@@ -748,34 +959,6 @@
 	}
 }
 
-static void
-expander_toggled (GtkWidget  *widget,
-		  GParamSpec *pspec,
-		  gpointer    data)
-{
-	GtkWidget *dialog;
-	GtkWidget *child, *tv;
-	gboolean expanded;
-	GtkRequisition req, req2;
-	gint width, height;
-
-	dialog = gtk_widget_get_toplevel (widget);
-	child = gtk_bin_get_child (GTK_BIN (widget));
-	tv = glade_xml_get_widget (glade_xml, "details_textview");
-
-	g_object_get (widget, "expanded", &expanded, NULL);
-	if (GTK_WIDGET_DRAWABLE (widget)) {
-		gtk_window_get_size (GTK_WINDOW (dialog), &width, &height);
-		gtk_widget_size_request (child, &req);
-		gtk_widget_size_request (tv, &req2);
-	}
-
-	if (expanded)
-		gtk_window_resize (GTK_WINDOW (dialog), width, height - req.height);
-	else
-		gtk_window_resize (GTK_WINDOW (dialog), width, height + req.height);
-}
-
 /**
  * pk_updates_error_message:
  **/
@@ -855,7 +1038,7 @@
 
 	/* add application specific icons to search path */
 	gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
-                                           PK_DATA G_DIR_SEPARATOR_S "icons");
+					   PK_DATA G_DIR_SEPARATOR_S "icons");
 
 	loop = g_main_loop_new (NULL, FALSE);
 
@@ -893,11 +1076,24 @@
 	/* Hide window first so that the dialogue resizes itself without redrawing */
 	gtk_widget_hide (main_window);
 
-	/* set apply insensitive until we finished */
-	widget = glade_xml_get_widget (glade_xml, "button_apply");
-	gtk_widget_set_sensitive (widget, FALSE);
-	widget = glade_xml_get_widget (glade_xml, "button_update");
-	gtk_widget_set_sensitive (widget, FALSE);
+	/* hide the tabs */
+	widget = glade_xml_get_widget (glade_xml, "notebook_hidden");
+	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);
+	gtk_notebook_set_show_border (GTK_NOTEBOOK (widget), FALSE);
+
+	/* hide until we have updates */
+	widget = glade_xml_get_widget (glade_xml, "hbox_reboot");
+	gtk_widget_hide (widget);
+
+	/* hide from finished page until we have updates */
+	widget = glade_xml_get_widget (glade_xml, "hbox_restart");
+	gtk_widget_hide (widget);
+	widget = glade_xml_get_widget (glade_xml, "button_restart");
+	gtk_widget_hide (widget);
+
+	/* hide until we have reboot notifier */
+	widget = glade_xml_get_widget (glade_xml, "button_review");
+	gtk_widget_hide (widget);
 
 	/* Get the main window quit */
 	g_signal_connect (main_window, "delete_event",
@@ -906,14 +1102,43 @@
 	widget = glade_xml_get_widget (glade_xml, "button_close");
 	g_signal_connect (widget, "clicked",
 			  G_CALLBACK (pk_button_close_cb), loop);
+	gtk_widget_set_tooltip_text(widget, _("Close without updating"));
+	widget = glade_xml_get_widget (glade_xml, "button_close2");
+	g_signal_connect (widget, "clicked",
+			  G_CALLBACK (pk_button_close_cb), loop);
+	widget = glade_xml_get_widget (glade_xml, "button_close3");
+	g_signal_connect (widget, "clicked",
+			  G_CALLBACK (pk_button_close_cb), loop);
+	widget = glade_xml_get_widget (glade_xml, "button_close4");
+	g_signal_connect (widget, "clicked",
+			  G_CALLBACK (pk_button_close_cb), loop);
+
+	widget = glade_xml_get_widget (glade_xml, "button_review");
+	g_signal_connect (widget, "clicked",
+			  G_CALLBACK (pk_button_review_cb), loop);
+	gtk_widget_set_tooltip_text(widget, _("Review the update list"));
+
+	widget = glade_xml_get_widget (glade_xml, "button_overview");
+	g_signal_connect (widget, "clicked",
+			  G_CALLBACK (pk_button_overview_cb), loop);
+	gtk_widget_set_tooltip_text(widget, _("Back to overview"));
+
 	widget = glade_xml_get_widget (glade_xml, "button_apply");
 	g_signal_connect (widget, "clicked",
 			  G_CALLBACK (pk_updates_apply_cb), loop);
 	gtk_widget_set_tooltip_text(widget, _("Apply all updates"));
+	gtk_widget_set_sensitive (widget, FALSE);
+
+	widget = glade_xml_get_widget (glade_xml, "button_apply2");
+	g_signal_connect (widget, "clicked",
+			  G_CALLBACK (pk_updates_apply_cb), loop);
+	gtk_widget_set_tooltip_text(widget, _("Apply all updates"));
+	gtk_widget_set_sensitive (widget, FALSE);
+
 	widget = glade_xml_get_widget (glade_xml, "button_refresh");
 	g_signal_connect (widget, "clicked",
 			  G_CALLBACK (pk_updates_refresh_cb), NULL);
-	gtk_widget_set_tooltip_text(widget, _("Refresh package list"));
+	gtk_widget_set_tooltip_text(widget, _("Refreshing is not normally required but will retrieve the latest application and update lists"));
 	widget = glade_xml_get_widget (glade_xml, "button_help");
 	g_signal_connect (widget, "clicked",
 			  G_CALLBACK (pk_button_help_cb), NULL);
@@ -930,18 +1155,34 @@
 			  G_CALLBACK (pk_button_update_cb), NULL);
 	gtk_widget_set_tooltip_text(widget, _("Update selected package"));
 
-	widget = glade_xml_get_widget (glade_xml, "details_expander");
-	g_signal_connect (widget, "activate",
-			  G_CALLBACK (expander_toggled), NULL);
-
 	/* create list stores */
-	list_store = gtk_list_store_new (PACKAGES_COLUMN_LAST, G_TYPE_STRING,
-					 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT);
+	list_store_details = gtk_list_store_new (PACKAGES_COLUMN_LAST, G_TYPE_STRING,
+						 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT);
+	list_store_preview = gtk_list_store_new (PREVIEW_COLUMN_LAST, G_TYPE_STRING, G_TYPE_STRING);
+	list_store_history = gtk_list_store_new (PREVIEW_COLUMN_LAST, G_TYPE_STRING, G_TYPE_STRING);
+
+	/* create preview tree view */
+	widget = glade_xml_get_widget (glade_xml, "treeview_preview");
+	gtk_tree_view_set_model (GTK_TREE_VIEW (widget),
+				 GTK_TREE_MODEL (list_store_preview));
+
+	/* add columns to the tree view */
+	pk_treeview_add_columns (GTK_TREE_VIEW (widget));
+	gtk_tree_view_columns_autosize (GTK_TREE_VIEW (widget));
+
+	/* create history tree view */
+	widget = glade_xml_get_widget (glade_xml, "treeview_history");
+	gtk_tree_view_set_model (GTK_TREE_VIEW (widget),
+				 GTK_TREE_MODEL (list_store_history));
+
+	/* add columns to the tree view */
+	pk_treeview_add_columns (GTK_TREE_VIEW (widget));
+	gtk_tree_view_columns_autosize (GTK_TREE_VIEW (widget));
 
 	/* create package tree view */
 	widget = glade_xml_get_widget (glade_xml, "treeview_updates");
 	gtk_tree_view_set_model (GTK_TREE_VIEW (widget),
-				 GTK_TREE_MODEL (list_store));
+				 GTK_TREE_MODEL (list_store_details));
 
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
 	g_signal_connect (selection, "changed",
@@ -960,10 +1201,13 @@
 	widget = glade_xml_get_widget (glade_xml, "button_refresh");
 	gtk_widget_set_sensitive (widget, FALSE);
 
-	/* make the apply button non-clickable until we get completion */
-	widget = glade_xml_get_widget (glade_xml, "button_apply");
+	widget = glade_xml_get_widget (glade_xml, "button_update");
 	gtk_widget_set_sensitive (widget, FALSE);
 
+	/* assume we don't get this yet */
+	widget = glade_xml_get_widget (glade_xml, "progressbar_subpercent");
+	gtk_widget_hide (widget);
+
 	/* get the update list */
 	pk_client_get_updates (client);
 	gtk_widget_show (main_window);
@@ -972,7 +1216,9 @@
 	g_main_loop_unref (loop);
 
 	g_object_unref (glade_xml);
-	g_object_unref (list_store);
+	g_object_unref (list_store_preview);
+	g_object_unref (list_store_history);
+	g_object_unref (list_store_details);
 	g_object_unref (client);
 	g_object_unref (pconnection);
 	g_object_unref (role_list);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]