gnome-packagekit r196 - in trunk: data po src



Author: rhughes
Date: Fri May  2 17:21:10 2008
New Revision: 196
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=196&view=rev

Log:
from git

Modified:
   trunk/data/gpk-application.glade
   trunk/data/gpk-signature.glade
   trunk/data/gpk-update-viewer.glade
   trunk/po/ChangeLog
   trunk/po/POTFILES.in
   trunk/src/gpk-application.c
   trunk/src/gpk-auto-refresh.c
   trunk/src/gpk-backend-status.c
   trunk/src/gpk-common.c

Modified: trunk/data/gpk-application.glade
==============================================================================
--- trunk/data/gpk-application.glade	(original)
+++ trunk/data/gpk-application.glade	Fri May  2 17:21:10 2008
@@ -224,7 +224,7 @@
                               <widget class="GtkRadioMenuItem" id="menuitem_free_no">
                                 <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">_Only _non-free software</property>
+                                <property name="label" translatable="yes">Only _non-free software</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_as_radio">True</property>
                                 <property name="group">menuitem_free_yes</property>
@@ -246,6 +246,44 @@
                       </widget>
                     </child>
                     <child>
+                      <widget class="GtkMenuItem" id="menuitem_arch">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Architectures</property>
+                        <property name="use_underline">True</property>
+                        <child>
+                          <widget class="GtkMenu" id="menu1">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkRadioMenuItem" id="menuitem_arch_yes">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">_Only native architectures</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_as_radio">True</property>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioMenuItem" id="menuitem_arch_no">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">_Only non-native architectures</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_as_radio">True</property>
+                                <property name="group">menuitem_arch_yes</property>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioMenuItem" id="menuitem_arch_both">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">_No filter</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_as_radio">True</property>
+                                <property name="group">menuitem_arch_yes</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
                       <widget class="GtkCheckMenuItem" id="menuitem_basename">
                         <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>
@@ -739,10 +777,23 @@
                         <property name="visible">True</property>
                         <property name="spacing">5</property>
                         <child>
-                          <placeholder/>
+                          <widget class="Custom" id="button_remove">
+                            <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>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                          </packing>
                         </child>
                         <child>
-                          <placeholder/>
+                          <widget class="Custom" id="button_install">
+                            <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>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
                         </child>
                         <child>
                           <widget class="GtkButton" id="button_cancel2">

Modified: trunk/data/gpk-signature.glade
==============================================================================
--- trunk/data/gpk-signature.glade	(original)
+++ trunk/data/gpk-signature.glade	Fri May  2 17:21:10 2008
@@ -13,21 +13,27 @@
       <widget class="GtkVBox" id="vbox1">
         <property name="visible">True</property>
         <property name="border_width">10</property>
-        <property name="spacing">5</property>
+        <property name="spacing">12</property>
         <child>
           <widget class="GtkVBox" id="vbox2">
             <property name="visible">True</property>
             <property name="spacing">12</property>
             <child>
-              <widget class="GtkLabel" id="label1">
+              <widget class="GtkHBox" id="hbox1">
                 <property name="visible">True</property>
-                <property name="label" translatable="yes">Before this software can be installed, you must indicate that you trust
-the source of the packages.</property>
+                <child>
+                  <widget class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Do you trust the source of the packages?&lt;/b&gt;&lt;/big&gt;</property>
+                    <property name="use_markup">True</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="GtkTable" id="table1">

Modified: trunk/data/gpk-update-viewer.glade
==============================================================================
--- trunk/data/gpk-update-viewer.glade	(original)
+++ trunk/data/gpk-update-viewer.glade	Fri May  2 17:21:10 2008
@@ -68,89 +68,91 @@
                     <property name="column_spacing">6</property>
                     <property name="row_spacing">6</property>
                     <child>
-                      <widget class="GtkLabel" id="label_last_update">
+                      <widget class="GtkAlignment" id="alignment1">
                         <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label">Unknown....</property>
+                        <property name="xalign">1</property>
+                        <property name="xscale">0</property>
+                        <property name="yscale">0</property>
+                        <child>
+                          <widget class="GtkButton" id="button_history">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="label" translatable="yes">View History</property>
+                            <property name="response_id">0</property>
+                          </widget>
+                        </child>
                       </widget>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
                         <property name="top_attach">1</property>
                         <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label_last_refresh">
+                      <widget class="GtkAlignment" id="alignment_refresh">
                         <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label">Unknown....</property>
+                        <property name="xalign">1</property>
+                        <property name="xscale">0</property>
+                        <property name="yscale">0</property>
+                        <child>
+                          <widget class="Custom" id="button_refresh">
+                            <property name="visible">True</property>
+                          </widget>
+                        </child>
                       </widget>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
                       </packing>
                     </child>
                     <child>
                       <widget class="GtkLabel" id="label5">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Last update:</property>
+                        <property name="label" translatable="yes">Last refresh:</property>
                       </widget>
                       <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
                         <property name="x_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label5">
+                      <widget class="GtkLabel" id="label1">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Last refresh:</property>
+                        <property name="label" translatable="yes">Last update:</property>
                       </widget>
                       <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
                         <property name="x_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkAlignment" id="alignment_refresh">
+                      <widget class="GtkLabel" id="label_last_refresh">
                         <property name="visible">True</property>
-                        <property name="xalign">1</property>
-                        <property name="xscale">0</property>
-                        <property name="yscale">0</property>
-                        <child>
-                          <placeholder/>
-                        </child>
+                        <property name="xalign">0</property>
+                        <property name="label">Unknown....</property>
                       </widget>
                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkAlignment" id="alignment1">
+                      <widget class="GtkLabel" id="label_last_update">
                         <property name="visible">True</property>
-                        <property name="xalign">1</property>
-                        <property name="xscale">0</property>
-                        <property name="yscale">0</property>
-                        <child>
-                          <widget class="GtkButton" id="button_history">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="label" translatable="yes">View History</property>
-                            <property name="response_id">0</property>
-                          </widget>
-                        </child>
+                        <property name="xalign">0</property>
+                        <property name="label">Unknown....</property>
                       </widget>
                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
+                        <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">GTK_FILL</property>
                       </packing>
                     </child>
                   </widget>
@@ -179,9 +181,6 @@
                       </packing>
                     </child>
                     <child>
-                      <placeholder/>
-                    </child>
-                    <child>
                       <widget class="GtkButton" id="button_review">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -224,6 +223,15 @@
                         </child>
                       </widget>
                       <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="Custom" id="button_update_system">
+                        <property name="visible">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
@@ -398,7 +406,13 @@
                       </packing>
                     </child>
                     <child>
-                      <placeholder/>
+                      <widget class="Custom" id="button_update_packages">
+                        <property name="visible">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
                     </child>
                     <child>
                       <widget class="GtkButton" id="button_close2">
@@ -658,7 +672,7 @@
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkLabel" id="label1">
+                          <widget class="GtkLabel" id="label2">
                             <property name="visible">True</property>
                             <property name="label">  </property>
                           </widget>
@@ -691,7 +705,13 @@
                       </packing>
                     </child>
                     <child>
-                      <placeholder/>
+                      <widget class="Custom" id="button_restart">
+                        <property name="visible">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">1</property>
+                      </packing>
                     </child>
                     <child>
                       <widget class="GtkButton" id="button_overview2">
@@ -763,166 +783,6 @@
                 <property name="position">3</property>
               </packing>
             </child>
-            <child>
-              <widget class="GtkVBox" id="vbox_confirm2">
-                <property name="border_width">12</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkHBox" id="hbox20">
-                    <property name="visible">True</property>
-                    <property name="spacing">12</property>
-                    <child>
-                      <widget class="GtkImage" id="image17">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-dialog-error</property>
-                        <property name="icon_size">6</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">20</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkVBox" id="vbox5">
-                        <property name="visible">True</property>
-                        <property name="spacing">10</property>
-                        <child>
-                          <widget class="GtkHBox" id="hbox21">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkLabel" id="label_error_title">
-                                <property name="visible">True</property>
-                                <property name="label">&lt;b&gt;Update was cancelled&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="hbox22">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkLabel" id="label_error_message">
-                                <property name="visible">True</property>
-                                <property name="label">The transaction was cancelled before any actions were taken</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="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkExpander" id="expander1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox24">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label_error_details">
-                                    <property name="visible">True</property>
-                                    <property name="label">Geeky information about the error...</property>
-                                    <property name="use_markup">True</property>
-                                    <property name="wrap">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label27">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">&lt;b&gt;More details:&lt;/b&gt;</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="type">label_item</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="padding">5</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label3">
-                            <property name="visible">True</property>
-                            <property name="label">  </property>
-                          </widget>
-                          <packing>
-                            <property name="position">3</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="hbuttonbox6">
-                    <property name="visible">True</property>
-                    <property name="spacing">6</property>
-                    <property name="layout_style">GTK_BUTTONBOX_END</property>
-                    <child>
-                      <widget class="GtkButton" id="button_help5">
-                        <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_close5">
-                        <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">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">4</property>
-              </packing>
-            </child>
           </widget>
         </child>
       </widget>

Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in	(original)
+++ trunk/po/POTFILES.in	Fri May  2 17:21:10 2008
@@ -42,4 +42,6 @@
 src/gpk-update-viewer.c
 src/gpk-watch.c
 src/gpk-consolekit.c
-
+src/gpk-client-eula.c
+src/gpk-client-signature.c
+src/gpk-client-untrusted.c

Modified: trunk/src/gpk-application.c
==============================================================================
--- trunk/src/gpk-application.c	(original)
+++ trunk/src/gpk-application.c	Fri May  2 17:21:10 2008
@@ -80,7 +80,7 @@
 	PkControl		*control;
 	PkClient		*client_search;
 	PkClient		*client_action;
-	PkClient		*client_description;
+	PkClient		*client_details;
 	PkClient		*client_files;
 	GpkClient		*gclient;
 	PkConnection		*pconnection;
@@ -307,10 +307,10 @@
 }
 
 /**
- * gpk_application_description_cb:
+ * gpk_application_details_cb:
  **/
 static void
-gpk_application_description_cb (PkClient *client, const gchar *package_id,
+gpk_application_details_cb (PkClient *client, const gchar *package_id,
 			       const gchar *license, PkGroupEnum group,
 			       const gchar *detail, const gchar *url,
 			       guint64 size, GpkApplication *application)
@@ -322,7 +322,7 @@
 
 	g_return_if_fail (PK_IS_APPLICATION (application));
 
-	pk_debug ("description = %s:%i:%s:%s", package_id, group, detail, url);
+	pk_debug ("details = %s:%i:%s:%s", package_id, group, detail, url);
 	widget = glade_xml_get_widget (application->priv->glade_xml, "vbox_description_pane");
 	gtk_widget_show (widget);
 
@@ -462,9 +462,8 @@
 	GtkTreeIter iter;
 	PkPackageId *ident;
 	gboolean valid = FALSE;
-	gboolean ret;
-	gchar *summary_new;
-	gchar *icon = NULL;
+	const gchar *summary_new;
+	const gchar *icon = NULL;
 	gchar *text;
 
 	g_return_if_fail (PK_IS_APPLICATION (application));
@@ -481,23 +480,22 @@
 
 	/* find localised summary */
 	ident = pk_package_id_new_from_string (package_id);
-	ret = pk_extra_get_localised_detail (application->priv->extra, ident->name, &summary_new);
-	if (!ret) {
+	summary_new = pk_extra_get_summary (application->priv->extra, ident->name);
+	if (summary_new == NULL) {
 		/* use the non-localised one */
-		summary_new = g_strdup (summary);
+		summary_new = summary;
 	}
 
 	/* get the icon */
-	ret = pk_extra_get_package_detail (application->priv->extra, ident->name, &icon, NULL);
-	if (ret) {
+	icon = pk_extra_get_icon_name (application->priv->extra, ident->name);
+	if (icon != NULL) {
 		/* check icon actually exists and is valid in this theme */
 		valid = gpk_icon_valid (icon);
 	}
 
 	/* nothing in the detail database or invalid */
 	if (valid == FALSE) {
-		g_free (icon);
-		icon = g_strdup (gpk_info_enum_to_icon_name (info));
+		icon = gpk_info_enum_to_icon_name (info);
 	}
 
 	/* use two lines */
@@ -512,8 +510,6 @@
 			    -1);
 
 	pk_package_id_free (ident);
-	g_free (summary_new);
-	g_free (icon);
 	g_free (text);
 
 	while (gtk_events_pending ())
@@ -871,7 +867,7 @@
 		g_error_free (error);
 		error = NULL;
 	}
-	ret = pk_client_cancel (application->priv->client_description, &error);
+	ret = pk_client_cancel (application->priv->client_details, &error);
 	if (!ret) {
 		pk_warning ("failed to cancel client: %s", error->message);
 		g_error_free (error);
@@ -1058,18 +1054,18 @@
 		gtk_widget_hide (widget);
 
 		/* cancel any previous request */
-		ret = pk_client_reset (application->priv->client_description, &error);
+		ret = pk_client_reset (application->priv->client_details, &error);
 		if (!ret) {
 			pk_warning ("failed to cancel, and adding to queue: %s", error->message);
 			g_error_free (error);
 			return FALSE;
 		}
 
-		/* get the description */
-		ret = pk_client_get_description (application->priv->client_description,
-						 application->priv->package, &error);
+		/* get the details */
+		ret = pk_client_get_details (application->priv->client_details,
+					     application->priv->package, &error);
 		if (!ret) {
-			pk_warning ("failed to get description: %s", error->message);
+			pk_warning ("failed to get details: %s", error->message);
 			g_error_free (error);
 		}
 		return ret;
@@ -1773,6 +1769,40 @@
 }
 
 /**
+ * gpk_application_menu_filter_arch_cb:
+ * @widget: The GtkWidget object
+ **/
+static void
+gpk_application_menu_filter_arch_cb (GtkWidget *widget, GpkApplication *application)
+{
+	const gchar *name;
+
+	g_return_if_fail (PK_IS_APPLICATION (application));
+
+	name = gtk_widget_get_name (widget);
+
+	/* only care about new state */
+	if (!gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget))) {
+		return;
+	}
+
+	/* set new filter */
+	if (g_str_has_suffix (name, "_yes")) {
+		pk_enums_add (application->priv->filters_current, PK_FILTER_ENUM_ARCH);
+		pk_enums_remove (application->priv->filters_current, PK_FILTER_ENUM_NOT_ARCH);
+	} else if (g_str_has_suffix (name, "_no")) {
+		pk_enums_remove (application->priv->filters_current, PK_FILTER_ENUM_ARCH);
+		pk_enums_add (application->priv->filters_current, PK_FILTER_ENUM_NOT_ARCH);
+	} else {
+		pk_enums_remove (application->priv->filters_current, PK_FILTER_ENUM_ARCH);
+		pk_enums_remove (application->priv->filters_current, PK_FILTER_ENUM_NOT_ARCH);
+	}
+
+	/* refresh the search results */
+	gpk_application_perform_search (application);
+}
+
+/**
  * gpk_application_menu_filter_basename_cb:
  * @widget: The GtkWidget object
  **/
@@ -2049,18 +2079,18 @@
 	g_signal_connect (application->priv->client_action, "repo-detail",
 			  G_CALLBACK (pk_application_repo_detail_cb), application);
 
-	application->priv->client_description = pk_client_new ();
-	g_signal_connect (application->priv->client_description, "description",
-			  G_CALLBACK (gpk_application_description_cb), application);
-	g_signal_connect (application->priv->client_description, "error-code",
+	application->priv->client_details = pk_client_new ();
+	g_signal_connect (application->priv->client_details, "details",
+			  G_CALLBACK (gpk_application_details_cb), application);
+	g_signal_connect (application->priv->client_details, "error-code",
 			  G_CALLBACK (gpk_application_error_code_cb), application);
-	g_signal_connect (application->priv->client_description, "finished",
+	g_signal_connect (application->priv->client_details, "finished",
 			  G_CALLBACK (gpk_application_finished_cb), application);
-	g_signal_connect (application->priv->client_description, "progress-changed",
+	g_signal_connect (application->priv->client_details, "progress-changed",
 			  G_CALLBACK (gpk_application_progress_changed_cb), application);
-	g_signal_connect (application->priv->client_description, "status-changed",
+	g_signal_connect (application->priv->client_details, "status-changed",
 			  G_CALLBACK (gpk_application_status_changed_cb), application);
-	g_signal_connect (application->priv->client_description, "allow-cancel",
+	g_signal_connect (application->priv->client_details, "allow-cancel",
 			  G_CALLBACK (gpk_application_allow_cancel_cb), application);
 
 	application->priv->client_files = pk_client_new ();
@@ -2190,6 +2220,17 @@
 	g_signal_connect (widget, "toggled",
 			  G_CALLBACK (gpk_application_menu_filter_free_cb), application);
 
+	/* arch filter */
+	widget = glade_xml_get_widget (application->priv->glade_xml, "menuitem_arch_yes");
+	g_signal_connect (widget, "toggled",
+			  G_CALLBACK (gpk_application_menu_filter_arch_cb), application);
+	widget = glade_xml_get_widget (application->priv->glade_xml, "menuitem_arch_no");
+	g_signal_connect (widget, "toggled",
+			  G_CALLBACK (gpk_application_menu_filter_arch_cb), application);
+	widget = glade_xml_get_widget (application->priv->glade_xml, "menuitem_arch_both");
+	g_signal_connect (widget, "toggled",
+			  G_CALLBACK (gpk_application_menu_filter_arch_cb), application);
+
 	widget = glade_xml_get_widget (application->priv->glade_xml, "vbox_description_pane");
 	gtk_widget_hide (widget);
 
@@ -2213,7 +2254,7 @@
 	widget = glade_xml_get_widget (application->priv->glade_xml, "notebook_description");
 	g_signal_connect (widget, "switch-page",
 			  G_CALLBACK (gpk_application_notebook_changed_cb), application);
-	if (pk_enums_contain (application->priv->roles, PK_ROLE_ENUM_GET_DESCRIPTION) == FALSE) {
+	if (pk_enums_contain (application->priv->roles, PK_ROLE_ENUM_GET_DETAILS) == FALSE) {
 		vbox = glade_xml_get_widget (application->priv->glade_xml, "vbox_description");
 		page = gtk_notebook_page_num (GTK_NOTEBOOK (widget), vbox);
 		gtk_notebook_remove_page (GTK_NOTEBOOK (widget), page);
@@ -2323,6 +2364,10 @@
 		widget = glade_xml_get_widget (application->priv->glade_xml, "menuitem_free");
 		gtk_widget_hide (widget);
 	}
+	if (pk_enums_contain (application->priv->filters, PK_FILTER_ENUM_ARCH) == FALSE) {
+		widget = glade_xml_get_widget (application->priv->glade_xml, "menuitem_arch");
+		gtk_widget_hide (widget);
+	}
 
 	/* BASENAME, use by default, or hide */
 	widget = glade_xml_get_widget (application->priv->glade_xml, "menuitem_basename");
@@ -2464,7 +2509,7 @@
 	g_object_unref (application->priv->control);
 	g_object_unref (application->priv->client_search);
 	g_object_unref (application->priv->client_action);
-	g_object_unref (application->priv->client_description);
+	g_object_unref (application->priv->client_details);
 	g_object_unref (application->priv->client_files);
 	g_object_unref (application->priv->pconnection);
 	g_object_unref (application->priv->statusbar);

Modified: trunk/src/gpk-auto-refresh.c
==============================================================================
--- trunk/src/gpk-auto-refresh.c	(original)
+++ trunk/src/gpk-auto-refresh.c	Fri May  2 17:21:10 2008
@@ -39,7 +39,6 @@
 
 #include <pk-debug.h>
 #include <pk-control.h>
-#include <pk-network.h>
 #include "gpk-common.h"
 #include "gpk-auto-refresh.h"
 
@@ -81,7 +80,6 @@
 	DBusGProxy		*proxy_gpm;
 	DBusGConnection		*connection;
 	PkControl		*control;
-	PkNetwork		*network;
 };
 
 enum {
@@ -360,15 +358,15 @@
 }
 
 /**
- * gpk_auto_refresh_network_changed_cb:
+ * gpk_auto_refresh_network_status_changed_cb:
  **/
 static void
-gpk_auto_refresh_network_changed_cb (PkNetwork *network, gboolean online, GpkAutoRefresh *arefresh)
+gpk_auto_refresh_network_status_changed_cb (PkControl *control, PkNetworkEnum state, GpkAutoRefresh *arefresh)
 {
 	g_return_if_fail (PK_IS_AUTO_REFRESH (arefresh));
 
-	pk_debug ("setting online %i", online);
-	arefresh->priv->network_active = online;
+	arefresh->priv->network_active = pk_enums_contain (state, PK_NETWORK_ENUM_ONLINE);
+	pk_debug ("setting online %i", arefresh->priv->network_active);
 	gpk_auto_refresh_change_state (arefresh);
 }
 
@@ -512,6 +510,7 @@
 {
 	guint value;
 	GError *error = NULL;
+	PkNetworkEnum state;
 
 	arefresh->priv = GPK_AUTO_REFRESH_GET_PRIVATE (arefresh);
 	arefresh->priv->on_battery = FALSE;
@@ -528,6 +527,12 @@
 
 	/* we need to query the last cache refresh time */
 	arefresh->priv->control = pk_control_new ();
+	g_signal_connect (arefresh->priv->control, "network-state-changed",
+			  G_CALLBACK (gpk_auto_refresh_network_status_changed_cb), arefresh);
+	state = pk_control_get_network_state (arefresh->priv->control);
+	if (pk_enums_contain (state, PK_NETWORK_ENUM_ONLINE)) {
+		arefresh->priv->network_active = TRUE;
+	}
 
 	/* connect to session bus */
 	arefresh->priv->connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
@@ -549,15 +554,6 @@
 			  G_CALLBACK (pk_connection_gpm_changed_cb), arefresh);
 	libgbus_assign (arefresh->priv->gbus_gpm, LIBGBUS_SESSION, GPM_DBUS_SERVICE);
 
-	/* we don't start the daemon for this, it's just a wrapper for
-	 * NetworkManager or alternative */
-	arefresh->priv->network = pk_network_new ();
-	g_signal_connect (arefresh->priv->network, "online",
-			  G_CALLBACK (gpk_auto_refresh_network_changed_cb), arefresh);
-	if (pk_network_is_online (arefresh->priv->network)) {
-		arefresh->priv->network_active = TRUE;
-	}
-
 	/* we check this in case we miss one of the async signals */
 	g_timeout_add_seconds (GPK_AUTO_REFRESH_PERIODIC_CHECK, gpk_auto_refresh_timeout_cb, arefresh);
 
@@ -581,7 +577,6 @@
 	g_return_if_fail (arefresh->priv != NULL);
 
 	g_object_unref (arefresh->priv->control);
-	g_object_unref (arefresh->priv->network);
 	g_object_unref (arefresh->priv->gbus_gs);
 	g_object_unref (arefresh->priv->gbus_gpm);
 	g_object_unref (arefresh->priv->gconf_client);

Modified: trunk/src/gpk-backend-status.c
==============================================================================
--- trunk/src/gpk-backend-status.c	(original)
+++ trunk/src/gpk-backend-status.c	Fri May  2 17:21:10 2008
@@ -154,7 +154,7 @@
 		widget = glade_xml_get_widget (glade_xml, "image_get_update_detail");
 		gtk_image_set_from_icon_name (GTK_IMAGE (widget), "gtk-apply", GTK_ICON_SIZE_MENU);
 	}
-	if (pk_enums_contain (roles, PK_ROLE_ENUM_GET_DESCRIPTION)) {
+	if (pk_enums_contain (roles, PK_ROLE_ENUM_GET_DETAILS)) {
 		widget = glade_xml_get_widget (glade_xml, "image_get_description");
 		gtk_image_set_from_icon_name (GTK_IMAGE (widget), "gtk-apply", GTK_ICON_SIZE_MENU);
 	}

Modified: trunk/src/gpk-common.c
==============================================================================
--- trunk/src/gpk-common.c	(original)
+++ trunk/src/gpk-common.c	Fri May  2 17:21:10 2008
@@ -94,7 +94,7 @@
 	{PK_ROLE_ENUM_ROLLBACK,			"pk-rollback"},
 	{PK_ROLE_ENUM_GET_DEPENDS,		"pk-package-info"},
 	{PK_ROLE_ENUM_GET_UPDATE_DETAIL,	"pk-package-info"},
-	{PK_ROLE_ENUM_GET_DESCRIPTION,		"pk-package-info"},
+	{PK_ROLE_ENUM_GET_DETAILS,		"pk-package-info"},
 	{PK_ROLE_ENUM_GET_REQUIRES,		"pk-package-info"},
 	{PK_ROLE_ENUM_GET_UPDATES,		"pk-package-info"},
 	{PK_ROLE_ENUM_SEARCH_DETAILS,		"pk-package-search"},
@@ -370,6 +370,9 @@
 	case PK_ERROR_ENUM_GROUP_NOT_FOUND:
 		text = _("The group was not found");
 		break;
+	case PK_ERROR_ENUM_GROUP_LIST_INVALID:
+		text = _("The group list was invalid");
+		break;
 	case PK_ERROR_ENUM_DEP_RESOLUTION_FAILED:
 		text = _("Dependency resolution failed");
 		break;
@@ -503,6 +506,11 @@
 		text = _("The group type was not found.\n"
 			 "Please check your group list and try again.");
 		break;
+	case PK_ERROR_ENUM_GROUP_LIST_INVALID:
+		text = _("The group list could not be loaded.\n"
+			 "Refreshing your cache may help, although this is normally a software "
+			 "source error.");
+		break;
 	case PK_ERROR_ENUM_DEP_RESOLUTION_FAILED:
 		text = _("A package could not be found that allows the task to complete.\n"
 			 "More information is available in the detailed report.");
@@ -925,8 +933,8 @@
 	case PK_ROLE_ENUM_GET_UPDATE_DETAIL:
 		text = _("Getting update detail");
 		break;
-	case PK_ROLE_ENUM_GET_DESCRIPTION:
-		text = _("Getting description");
+	case PK_ROLE_ENUM_GET_DETAILS:
+		text = _("Getting details");
 		break;
 	case PK_ROLE_ENUM_GET_REQUIRES:
 		text = _("Getting requires");
@@ -1025,8 +1033,8 @@
 	case PK_ROLE_ENUM_GET_UPDATE_DETAIL:
 		text = _("Got update detail");
 		break;
-	case PK_ROLE_ENUM_GET_DESCRIPTION:
-		text = _("Got description");
+	case PK_ROLE_ENUM_GET_DETAILS:
+		text = _("Got details");
 		break;
 	case PK_ROLE_ENUM_GET_REQUIRES:
 		text = _("Got requires");



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