gnome-packagekit r174 - in trunk: data libpackagekit-gnome man po src



Author: rhughes
Date: Mon Apr 14 13:08:13 2008
New Revision: 174
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=174&view=rev

Log:
from git

Modified:
   trunk/data/gnome-packagekit.schemas.in
   trunk/libpackagekit-gnome/Makefile.am
   trunk/libpackagekit-gnome/gpk-client.c
   trunk/libpackagekit-gnome/gpk-common.c
   trunk/libpackagekit-gnome/gpk-common.h
   trunk/libpackagekit-gnome/gpk-self-test.c
   trunk/man/Makefile.am
   trunk/po/fi.po
   trunk/src/gpk-application.c
   trunk/src/gpk-log.c
   trunk/src/gpk-update-viewer.c

Modified: trunk/data/gnome-packagekit.schemas.in
==============================================================================
--- trunk/data/gnome-packagekit.schemas.in	(original)
+++ trunk/data/gnome-packagekit.schemas.in	Mon Apr 14 13:08:13 2008
@@ -2,6 +2,18 @@
   <schemalist>
 
     <schema>
+      <key>/schemas/apps/gnome-packagekit/show_depends</key>
+      <applyto>/apps/gnome-packagekit/show_depends</applyto>
+      <owner>gnome-packagekit</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+        <short>Ask the user if additional packages should be installed</short>
+        <long>Ask the user if additional packages should be installed</long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/gnome-packagekit/notify_restart</key>
       <applyto>/apps/gnome-packagekit/notify_restart</applyto>
       <owner>gnome-packagekit</owner>

Modified: trunk/libpackagekit-gnome/Makefile.am
==============================================================================
--- trunk/libpackagekit-gnome/Makefile.am	(original)
+++ trunk/libpackagekit-gnome/Makefile.am	Mon Apr 14 13:08:13 2008
@@ -49,6 +49,7 @@
 	$(PACKAGEKIT_LIBS)					\
 	$(POLKIT_GNOME_LIBS)					\
 	$(LIBGLADE_LIBS)					\
+	$(GCONF_LIBS)						\
 	$(NULL)
 
 libpackagekit_gnome_la_LDFLAGS =				\
@@ -62,8 +63,6 @@
 	gpk-self-test
 
 gpk_self_test_SOURCES =						\
-	gpk-common.h						\
-	gpk-common.c						\
 	gpk-self-test.c						\
 	$(NULL)
 

Modified: trunk/libpackagekit-gnome/gpk-client.c
==============================================================================
--- trunk/libpackagekit-gnome/gpk-client.c	(original)
+++ trunk/libpackagekit-gnome/gpk-client.c	Mon Apr 14 13:08:13 2008
@@ -32,6 +32,7 @@
 #include <glib/gprintf.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
+#include <gconf/gconf-client.h>
 #include <pk-debug.h>
 #include <pk-client.h>
 #include <pk-package-id.h>
@@ -59,6 +60,7 @@
 	PkClient		*client_resolve;
 	PkClient		*client_signature;
 	GladeXML		*glade_xml;
+	GConfClient		*gconf_client;
 	gint			 pulse_timeout;
 	PkControl		*control;
 	PkRoleEnum		 roles;
@@ -234,11 +236,6 @@
 static void
 gpk_client_error_code_cb (PkClient *client, PkErrorCodeEnum code, const gchar *details, GpkClient *gclient)
 {
-	GtkWidget *widget;
-	const gchar *title;
-	gchar *title_bold;
-	gchar *details_safe;
-
 	g_return_if_fail (GPK_IS_CLIENT (gclient));
 
 	/* have we handled? */
@@ -250,22 +247,9 @@
 		pk_warning ("did not auth");
 	}
 
-	gpk_client_set_page (gclient, GPK_CLIENT_PAGE_ERROR);
-
-	/* set bold title */
-	widget = glade_xml_get_widget (gclient->priv->glade_xml, "label_error_title");
-	title = gpk_error_enum_to_localised_text (code);
-	title_bold = g_strdup_printf ("<b>%s</b>", title);
-	gtk_label_set_label (GTK_LABEL (widget), title_bold);
-	g_free (title_bold);
-
-	widget = glade_xml_get_widget (gclient->priv->glade_xml, "label_error_message");
-	gtk_label_set_label (GTK_LABEL (widget), gpk_error_enum_to_localised_message (code));
-
-	widget = glade_xml_get_widget (gclient->priv->glade_xml, "label_error_details");
-	details_safe = g_markup_escape_text (details, -1);
-	gtk_label_set_label (GTK_LABEL (widget), details_safe);
-	g_free (details_safe);
+	//remove GPK_CLIENT_PAGE_ERROR?
+	gpk_error_dialog (gpk_error_enum_to_localised_text (code),
+			  gpk_error_enum_to_localised_message (code), details);
 }
 
 /**
@@ -280,7 +264,7 @@
 
 	g_return_if_fail (GPK_IS_CLIENT (gclient));
 
-	text = gpk_package_id_pretty (package_id, summary);
+	text = gpk_package_id_format_twoline (package_id, summary);
 	widget = glade_xml_get_widget (gclient->priv->glade_xml, "label_package");
 	gtk_label_set_markup (GTK_LABEL (widget), text);
 	g_free (text);
@@ -457,6 +441,22 @@
 }
 
 /**
+ * gpk_client_checkbutton_show_depends_cb:
+ **/
+static void
+gpk_client_checkbutton_show_depends_cb (GtkWidget *widget, GpkClient *gclient)
+{
+	gboolean checked;
+
+	g_return_if_fail (GPK_IS_CLIENT (gclient));
+
+	/* set the policy */
+	checked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+	pk_debug ("Changing %s to %i", GPK_CONF_SHOW_DEPENDS, checked);
+	gconf_client_set_bool (gclient->priv->gconf_client, GPK_CONF_SHOW_DEPENDS, checked, NULL);
+}
+
+/**
  * gpk_client_install_package_id:
  * @gclient: a valid #GpkClient instance
  * @package_id: a package_id such as <literal>hal-info;0.20;i386;fedora</literal>
@@ -514,12 +514,19 @@
 		goto skip_checks;
 	}
 
+	/* have we previously said we don't want to be shown the confirmation */
+	ret = gconf_client_get_bool (gclient->priv->gconf_client, GPK_CONF_SHOW_DEPENDS, NULL);
+	if (!ret) {
+		pk_debug ("we've said we don't want deps anymore");
+		goto skip_checks;
+	}
+
 	/* process package list */
 	string = g_string_new (_("The following packages also have to be downloaded:"));
 	g_string_append (string, "\n\n");
 	for (i=0; i<len; i++) {
 		item = pk_client_package_buffer_get_item (gclient->priv->client_resolve, i);
-		text = gpk_package_id_pretty_oneline (item->package_id, item->summary);
+		text = gpk_package_id_format_oneline (item->package_id, item->summary);
 		g_string_append_printf (string, "%s\n", text);
 		g_free (text);
 	}
@@ -533,8 +540,17 @@
 	/* show UI */
 	widget = glade_xml_get_widget (gclient->priv->glade_xml, "window_updates");
 	dialog = gtk_message_dialog_new (GTK_WINDOW (widget), GTK_DIALOG_DESTROY_WITH_PARENT,
-					 GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL,
-					 "%s", _("Download additional packages?"));
+					 GTK_MESSAGE_QUESTION, GTK_BUTTONS_CANCEL,
+					 "%s", _("Install additional packages?"));
+	/* add a specialist button */
+	gtk_dialog_add_button (GTK_DIALOG (dialog), _("Install"), GTK_RESPONSE_OK);
+
+	/* add a checkbutton for deps screen */
+	widget = gtk_check_button_new_with_label (_("Do not show me this again"));
+	g_signal_connect (widget, "clicked", G_CALLBACK (gpk_client_checkbutton_show_depends_cb), gclient);
+	gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), widget);
+	gtk_widget_show (widget);
+
 	gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", text);
 	button = gtk_dialog_run (GTK_DIALOG (dialog));
 	gtk_widget_destroy (GTK_WIDGET (dialog));
@@ -913,6 +929,9 @@
 	gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
 					   PK_DATA G_DIR_SEPARATOR_S "icons");
 
+	/* use gconf for session settings */
+	gclient->priv->gconf_client = gconf_client_get_default ();
+
 	/* get actions */
 	gclient->priv->control = pk_control_new ();
 	gclient->priv->roles = pk_control_get_actions (gclient->priv->control);
@@ -1000,6 +1019,7 @@
 	g_object_unref (gclient->priv->client_resolve);
 	g_object_unref (gclient->priv->client_signature);
 	g_object_unref (gclient->priv->control);
+	g_object_unref (gclient->priv->gconf_client);
 
 	G_OBJECT_CLASS (gpk_client_parent_class)->finalize (object);
 }

Modified: trunk/libpackagekit-gnome/gpk-common.c
==============================================================================
--- trunk/libpackagekit-gnome/gpk-common.c	(original)
+++ trunk/libpackagekit-gnome/gpk-common.c	Mon Apr 14 13:08:13 2008
@@ -196,10 +196,12 @@
 }
 
 /**
- * gpk_package_id_pretty:
+ * gpk_package_id_format_twoline:
+ *
+ * Return value: "<b>GTK Toolkit</b>\ngtk2-2.12.2 (i386)"
  **/
 gchar *
-gpk_package_id_pretty (const gchar *package_id, const gchar *summary)
+gpk_package_id_format_twoline (const gchar *package_id, const gchar *summary)
 {
 	PkPackageId *ident;
 	gchar *text;
@@ -212,31 +214,34 @@
 		return NULL;
 	}
 
-	string = g_string_new (ident->name);
+	/* optional */
+	if (pk_strzero (summary)) {
+		string = g_string_new (ident->name);
+	} else {
+		string = g_string_new ("");
+		g_string_append_printf (string, "<b>%s</b>\n%s", summary, ident->name);
+	}
+
+	/* some backends don't provide this */
 	if (ident->version != NULL) {
 		g_string_append_printf (string, "-%s", ident->version);
 	}
 	if (ident->arch != NULL) {
 		g_string_append_printf (string, " (%s)", ident->arch);
 	}
-	g_string_prepend (string, "<b>");
-	g_string_append (string, "</b>");
 
-	/* ITS4: ignore, we generated this */
-	if (pk_strzero (summary) == FALSE) {
-		g_string_append_printf (string, "\n%s", summary);
-	}
 	text = g_string_free (string, FALSE);
-
 	pk_package_id_free (ident);
 	return text;
 }
 
 /**
- * gpk_package_id_pretty_oneline:
+ * gpk_package_id_format_oneline:
+ *
+ * Return value: "<b>GTK Toolkit</b> (gtk2)"
  **/
 gchar *
-gpk_package_id_pretty_oneline (const gchar *package_id, const gchar *summary)
+gpk_package_id_format_oneline (const gchar *package_id, const gchar *summary)
 {
 	PkPackageId *ident;
 	gchar *text;
@@ -1159,7 +1164,7 @@
 #include <libselftest.h>
 
 void
-libst_common_gui (LibSelfTest *test)
+libst_common (LibSelfTest *test)
 {
 	gchar *text;
 	guint i;
@@ -1318,7 +1323,7 @@
 	 ****************     package name text        **************
 	 ************************************************************/
 	libst_title (test, "package id pretty null");
-	text = gpk_package_id_pretty (NULL, NULL);
+	text = gpk_package_id_format_twoline (NULL, NULL);
 	if (text == NULL) {
 		libst_success (test, NULL);
 	} else {
@@ -1327,8 +1332,8 @@
 
 	/************************************************************/
 	libst_title (test, "package id pretty valid package id, no summary");
-	text = gpk_package_id_pretty ("simon;0.0.1;i386;data", NULL);
-	if (text != NULL && strcmp (text, "<b>simon-0.0.1 (i386)</b>") == 0) {
+	text = gpk_package_id_format_twoline ("simon;0.0.1;i386;data", NULL);
+	if (text != NULL && strcmp (text, "simon-0.0.1 (i386)") == 0) {
 		libst_success (test, NULL);
 	} else {
 		libst_failed (test, "failed, got %s", text);
@@ -1337,8 +1342,8 @@
 
 	/************************************************************/
 	libst_title (test, "package id pretty valid package id, no summary 2");
-	text = gpk_package_id_pretty ("simon;0.0.1;;data", NULL);
-	if (text != NULL && strcmp (text, "<b>simon-0.0.1</b>") == 0) {
+	text = gpk_package_id_format_twoline ("simon;0.0.1;;data", NULL);
+	if (text != NULL && strcmp (text, "simon-0.0.1") == 0) {
 		libst_success (test, NULL);
 	} else {
 		libst_failed (test, "failed, got %s", text);
@@ -1347,8 +1352,8 @@
 
 	/************************************************************/
 	libst_title (test, "package id pretty valid package id, no summary 3");
-	text = gpk_package_id_pretty ("simon;;;data", NULL);
-	if (text != NULL && strcmp (text, "<b>simon</b>") == 0) {
+	text = gpk_package_id_format_twoline ("simon;;;data", NULL);
+	if (text != NULL && strcmp (text, "simon") == 0) {
 		libst_success (test, NULL);
 	} else {
 		libst_failed (test, "failed, got %s", text);
@@ -1357,8 +1362,8 @@
 
 	/************************************************************/
 	libst_title (test, "package id pretty valid package id, no summary 4");
-	text = gpk_package_id_pretty ("simon;0.0.1;;data", "dude");
-	if (text != NULL && strcmp (text, "<b>simon-0.0.1</b>\ndude") == 0) {
+	text = gpk_package_id_format_twoline ("simon;0.0.1;;data", "dude");
+	if (text != NULL && strcmp (text, "<b>dude</b>\nsimon-0.0.1") == 0) {
 		libst_success (test, NULL);
 	} else {
 		libst_failed (test, "failed, got %s", text);

Modified: trunk/libpackagekit-gnome/gpk-common.h
==============================================================================
--- trunk/libpackagekit-gnome/gpk-common.h	(original)
+++ trunk/libpackagekit-gnome/gpk-common.h	Mon Apr 14 13:08:13 2008
@@ -42,14 +42,15 @@
 #define GPK_CONF_AUTO_UPDATE			"/apps/gnome-packagekit/auto_update"
 #define GPK_CONF_UPDATE_BATTERY			"/apps/gnome-packagekit/update_battery"
 #define GPK_CONF_REPO_SHOW_DETAILS		"/apps/gnome-packagekit/repo/show_details"
+#define GPK_CONF_SHOW_DEPENDS			"/apps/gnome-packagekit/show_depends"
 
 #define GPK_CONF_APPLICATION_FILTER_BASENAME	"/apps/gnome-packagekit/application/filter_basename"
 #define GPK_CONF_APPLICATION_FILTER_NEWEST	"/apps/gnome-packagekit/application/filter_newest"
 
 gchar		*gpk_package_get_name			(const gchar	*package_id);
-gchar		*gpk_package_id_pretty			(const gchar	*package_id,
+gchar		*gpk_package_id_format_twoline		(const gchar	*package_id,
 							 const gchar	*summary);
-gchar		*gpk_package_id_pretty_oneline		(const gchar	*package_id,
+gchar		*gpk_package_id_format_oneline		(const gchar	*package_id,
 							 const gchar	*summary);
 gchar		*gpk_package_id_name_version		(const gchar	*package_id);
 

Modified: trunk/libpackagekit-gnome/gpk-self-test.c
==============================================================================
--- trunk/libpackagekit-gnome/gpk-self-test.c	(original)
+++ trunk/libpackagekit-gnome/gpk-self-test.c	Mon Apr 14 13:08:13 2008
@@ -23,9 +23,10 @@
 #include <glib-object.h>
 #include <libselftest.h>
 #include <pk-debug.h>
+#include "gpk-common.h"
 
 /* prototypes */
-void libst_common_gui (LibSelfTest *test);
+void libst_common (LibSelfTest *test);
 
 int
 main (int argc, char **argv)
@@ -40,7 +41,7 @@
 	pk_debug_init (TRUE);
 
 	/* tests go here */
-	libst_common_gui (&test);
+	libst_common (&test);
 
 	return (libst_finish (&test));
 }

Modified: trunk/man/Makefile.am
==============================================================================
--- trunk/man/Makefile.am	(original)
+++ trunk/man/Makefile.am	Mon Apr 14 13:08:13 2008
@@ -25,16 +25,12 @@
 if HAVE_DOCBOOK2MAN
 gpk-application.1: gpk-application.sgml
 	docbook2man $? > /dev/null
-
 gpk-backend-status.1: gpk-backend-status.sgml
 	docbook2man $? > /dev/null
-
 gpk-install-local-file.1: gpk-install-local-file.sgml
 	docbook2man $? > /dev/null
-
 gpk-install-package-name.1: gpk-install-package-name.sgml
 	docbook2man $? > /dev/null
-
 gpk-install-provide-file.1: gpk-install-provide-file.sgml
 	docbook2man $? > /dev/null
 gpk-prefs.1: gpk-prefs.sgml

Modified: trunk/src/gpk-application.c
==============================================================================
--- trunk/src/gpk-application.c	(original)
+++ trunk/src/gpk-application.c	Mon Apr 14 13:08:13 2008
@@ -41,11 +41,11 @@
 #include <pk-connection.h>
 #include <pk-package-id.h>
 #include <pk-extra.h>
-#include <pk-extra-obj.h>
 
 #include <gpk-client.h>
 #include <gpk-common.h>
 #include <gpk-gnome.h>
+#include <gpk-error.h>
 
 #include "gpk-statusbar.h"
 #include "gpk-application.h"
@@ -172,34 +172,6 @@
 }
 
 /**
- * gpk_application_error_message:
- **/
-static void
-gpk_application_error_message (GpkApplication *application, const gchar *title, const gchar *details)
-{
-	GtkWidget *main_window;
-	GtkWidget *dialog;
-	gchar *escaped_details = NULL;
-
-	g_return_if_fail (PK_IS_APPLICATION (application));
-
-	pk_warning ("error %s:%s", title, details);
-	main_window = glade_xml_get_widget (application->priv->glade_xml, "window_manager");
-
-	dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), GTK_DIALOG_DESTROY_WITH_PARENT,
-					 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", title);
-
-	/* we need to be careful of markup */
-	if (details != NULL) {
-		escaped_details = g_markup_escape_text (details, -1);
-		gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", escaped_details);
-		g_free (escaped_details);
-	}
-	gtk_dialog_run (GTK_DIALOG (dialog));
-	gtk_widget_destroy (GTK_WIDGET (dialog));
-}
-
-/**
  * gpk_application_install:
  **/
 static gboolean
@@ -234,7 +206,8 @@
 	if (!ret) {
 		pk_warning ("failed to install package: %s", error->message);
 		/* ick, we failed so pretend we didn't do the action */
-		gpk_application_error_message (application, _("The package could not be installed"), error->message);
+		gpk_error_dialog (_("The package could not be installed"),
+				  _("Running the transaction failed"), error->message);
 		g_error_free (error);
 	}
 	return ret;
@@ -301,8 +274,8 @@
 	if (!ret) {
 		pk_warning ("failed to reset client: %s", error->message);
 		/* ick, we failed so pretend we didn't do the action */
-		gpk_application_error_message (application,
-					      _("The package could not be removed"), error->message);
+		gpk_error_dialog (_("The package could not be removed"),
+				  _("Running the transaction failed"), error->message);
 		g_error_free (error);
 	}
 	return ret;
@@ -360,7 +333,7 @@
 	g_string_append (text, "\n\n");
 	for (i=0; i<length; i++) {
 		item = pk_client_package_buffer_get_item (client, i);
-		message = gpk_package_id_pretty_oneline (item->package_id, item->summary);
+		message = gpk_package_id_format_oneline (item->package_id, item->summary);
 		g_string_append_printf (text, "%s\n", message);
 		g_free (message);
 	}
@@ -568,11 +541,14 @@
  **/
 static void
 gpk_application_package_cb (PkClient *client, PkInfoEnum info, const gchar *package_id,
-			   const gchar *summary, GpkApplication *application)
+			    const gchar *summary, GpkApplication *application)
 {
 	GtkTreeIter iter;
-	PkExtraObj *eobj;
+	PkPackageId *ident;
 	gboolean valid = FALSE;
+	gboolean ret;
+	gchar *summary_new;
+	gchar *icon = NULL;
 	gchar *text;
 
 	g_return_if_fail (PK_IS_APPLICATION (application));
@@ -587,30 +563,41 @@
 	/* mark as got so we don't warn */
 	application->priv->has_package = TRUE;
 
-	/* get convenience object */
-	eobj = pk_extra_obj_new_from_package_id_summary (package_id, summary);
+	/* 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) {
+		/* use the non-localised one */
+		summary_new = g_strdup (summary);
+	}
 
-	/* check icon actually exists and is valid in this theme */
-	valid = gpk_icon_valid (eobj->icon);
+	/* get the icon */
+	ret = pk_extra_get_package_detail (application->priv->extra, ident->name, &icon, NULL);
+	if (ret) {
+		/* 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 (eobj->icon);
-		eobj->icon = g_strdup (gpk_info_enum_to_icon_name (info));
+		g_free (icon);
+		icon = g_strdup (gpk_info_enum_to_icon_name (info));
 	}
 
-	text = g_markup_printf_escaped ("<b>%s-%s (%s)</b>\n%s", eobj->id->name,
-					eobj->id->version, eobj->id->arch, eobj->summary);
+	/* use two lines */
+	text = gpk_package_id_format_twoline (package_id, summary);
 
 	gtk_list_store_append (application->priv->packages_store, &iter);
 	gtk_list_store_set (application->priv->packages_store, &iter,
 			    PACKAGES_COLUMN_INSTALLED, (info == PK_INFO_ENUM_INSTALLED),
 			    PACKAGES_COLUMN_TEXT, text,
 			    PACKAGES_COLUMN_ID, package_id,
-			    PACKAGES_COLUMN_IMAGE, eobj->icon,
+			    PACKAGES_COLUMN_IMAGE, icon,
 			    -1);
 
-	pk_extra_obj_free (eobj);
+	pk_package_id_free (ident);
+	g_free (summary_new);
+	g_free (icon);
 	g_free (text);
 }
 
@@ -627,8 +614,8 @@
 		return;
 	}
 
-	gpk_application_error_message (application,
-				      gpk_error_enum_to_localised_text (code), details);
+	gpk_error_dialog (gpk_error_enum_to_localised_text (code),
+			  gpk_error_enum_to_localised_message (code), details);
 }
 
 /**
@@ -812,8 +799,8 @@
 	if (!ret) {
 		pk_debug ("invalid input text, will fail");
 		/* TODO - make the dialog turn red... */
-		gpk_application_error_message (application, _("Invalid search text"),
-					      _("The search text contains invalid characters"));
+		gpk_error_dialog (_("Invalid search text"),
+				  _("The search text contains invalid characters"), NULL);
 		return FALSE;
 	}
 	pk_debug ("find %s", package);
@@ -839,8 +826,8 @@
 	}
 
 	if (!ret) {
-		gpk_application_error_message (application,
-					      _("The search could not be completed"), error->message);
+		gpk_error_dialog (_("The search could not be completed"),
+				  _("Running the transaction failed"), error->message);
 		g_error_free (error);
 		return FALSE;
 	}
@@ -898,8 +885,8 @@
 		/* switch around buttons */
 		gpk_application_set_find_cancel_buttons (application, FALSE);
 	} else {
-		gpk_application_error_message (application,
-					      _("The group could not be queried"), error->message);
+		gpk_error_dialog (_("The group could not be queried"),
+				  _("Running the transaction failed"), error->message);
 		g_error_free (error);
 	}
 	return ret;
@@ -1670,7 +1657,8 @@
 	/* can we cancel what we are doing? */
 	ret = pk_client_reset (application->priv->client_action, &error);
 	if (!ret) {
-		gpk_application_error_message (application, _("Package list could not be refreshed"), error->message);
+		gpk_error_dialog (_("Package list could not be refreshed"),
+				  _("Failed to reset"), error->message);
 		g_error_free (error);
 		return;
 	}
@@ -1678,7 +1666,8 @@
 	/* try to refresh the cache */
 	ret = pk_client_refresh_cache (application->priv->client_action, FALSE, &error);
 	if (!ret) {
-		gpk_application_error_message (application, _("The package could not be installed"), error->message);
+		gpk_error_dialog (_("The package could not be installed"),
+				  _("Running the transaction failed"), error->message);
 		g_error_free (error);
 		return;
 	}

Modified: trunk/src/gpk-log.c
==============================================================================
--- trunk/src/gpk-log.c	(original)
+++ trunk/src/gpk-log.c	Mon Apr 14 13:08:13 2008
@@ -262,7 +262,7 @@
 	const gchar *info_text;
 
 	info_text = gpk_info_enum_to_localised_text (info);
-	text = gpk_package_id_pretty (package_id, summary);
+	text = gpk_package_id_format_twoline (package_id, summary);
 	icon_name = gpk_info_enum_to_icon_name (info);
 
 	gtk_list_store_append (list_store_details, &iter);

Modified: trunk/src/gpk-update-viewer.c
==============================================================================
--- trunk/src/gpk-update-viewer.c	(original)
+++ trunk/src/gpk-update-viewer.c	Mon Apr 14 13:08:13 2008
@@ -774,7 +774,7 @@
 		  pk_info_enum_to_text (info), package_id, summary);
 
 	if (role == PK_ROLE_ENUM_GET_UPDATES) {
-		text = gpk_package_id_pretty (package_id, summary);
+		text = gpk_package_id_format_twoline (package_id, summary);
 		icon_name = gpk_info_enum_to_icon_name (info);
 		gtk_list_store_append (list_store_details, &iter);
 		gtk_list_store_set (list_store_details, &iter,
@@ -790,7 +790,7 @@
 
 	if (role == PK_ROLE_ENUM_UPDATE_SYSTEM ||
 	    role == PK_ROLE_ENUM_UPDATE_PACKAGES) {
-		text = gpk_package_id_pretty (package_id, summary);
+		text = gpk_package_id_format_twoline (package_id, summary);
 		widget = glade_xml_get_widget (glade_xml, "progress_package_label");
 		gtk_label_set_markup (GTK_LABEL (widget), text);
 
@@ -1290,7 +1290,7 @@
 	for (i=0;i<length;i++) {
 		item = pk_client_package_buffer_get_item (client, i);
 		if (item->info == PK_INFO_ENUM_BLOCKED) {
-			text = gpk_package_id_pretty_oneline (item->package_id, item->summary);
+			text = gpk_package_id_format_oneline (item->package_id, item->summary);
 			g_string_append_printf (string, "%s\n", text);
 			g_free (text);
 			exists = TRUE;



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