gnome-packagekit r107 - trunk/src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-packagekit r107 - trunk/src
- Date: Sun, 2 Mar 2008 23:41:03 +0000 (GMT)
Author: rhughes
Date: Sun Mar 2 23:41:02 2008
New Revision: 107
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=107&view=rev
Log:
from git
Modified:
trunk/src/pk-application.c
trunk/src/pk-progress.c
Modified: trunk/src/pk-application.c
==============================================================================
--- trunk/src/pk-application.c (original)
+++ trunk/src/pk-application.c Sun Mar 2 23:41:02 2008
@@ -147,7 +147,7 @@
{
GtkWidget *main_window;
GtkWidget *dialog;
- gchar *escaped_details;
+ gchar *escaped_details = NULL;
g_return_if_fail (application != NULL);
g_return_if_fail (PK_IS_APPLICATION (application));
@@ -155,15 +155,17 @@
pk_warning ("error %s:%s", title, details);
main_window = glade_xml_get_widget (application->priv->glade_xml, "window_manager");
- /* we need to format this */
- escaped_details = g_markup_escape_text (details, -1);
-
dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, title);
- gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), escaped_details);
+
+ /* 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));
- g_free (escaped_details);
}
/**
@@ -286,7 +288,7 @@
dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING, GTK_BUTTONS_CANCEL, title);
gtk_dialog_add_buttons (GTK_DIALOG (dialog), _("Remove all packages"), -8, NULL);
- gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), message);
+ gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", message);
g_signal_connect (dialog, "response", G_CALLBACK (pk_application_requires_dialog_cb), application);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
@@ -577,11 +579,6 @@
}
}
}
-
- /* panic */
- if (status == PK_EXIT_ENUM_FAILED) {
- pk_application_error_message (application, _("The action did not complete"), NULL);
- }
}
/**
@@ -900,6 +897,8 @@
/* refresh the search as the items may have changed */
gtk_list_store_clear (application->priv->packages_store);
+ /* cancel this, we don't care about old results that are pending */
+ pk_client_cancel (application->priv->client_search, NULL);
pk_client_reset (application->priv->client_search, NULL);
ret = pk_client_search_group (application->priv->client_search, "none", id, NULL);
/* ick, we failed so pretend we didn't do the action */
Modified: trunk/src/pk-progress.c
==============================================================================
--- trunk/src/pk-progress.c (original)
+++ trunk/src/pk-progress.c Sun Mar 2 23:41:02 2008
@@ -91,13 +91,20 @@
{
GtkWidget *main_window;
GtkWidget *dialog;
+ gchar *escaped_details = NULL;
pk_warning ("error %s:%s", title, details);
main_window = glade_xml_get_widget (progress->priv->glade_xml, "window_progress");
dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, title);
- gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), details);
+
+ 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));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]