[gnome-packagekit/glib2: 75/79] moo
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-packagekit/glib2: 75/79] moo
- Date: Tue, 6 Oct 2009 09:51:02 +0000 (UTC)
commit a2867293fb96cc2de924b84cb64a8d310b537656
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 5 14:41:27 2009 +0100
moo
src/gpk-application.c | 3 +++
src/gpk-check-update.c | 3 +++
src/gpk-firmware.c | 3 +++
src/gpk-hardware.c | 3 +++
src/gpk-log.c | 3 +++
src/gpk-repo.c | 5 +++++
src/gpk-service-pack.c | 3 +++
src/gpk-update-viewer.c | 19 +++++++++----------
src/gpk-watch.c | 3 +++
9 files changed, 35 insertions(+), 10 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index 440441c..5f9326c 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -3698,6 +3698,9 @@ gpk_application_init (GpkApplication *application)
/* this is what we use mainly */
application->priv->task = PK_TASK(gpk_task_new ());
+ g_object_set (application->priv->task,
+ "background", FALSE,
+ NULL);
/* get properties */
pk_control_get_properties_async (application->priv->control, NULL, (GAsyncReadyCallback) pk_backend_status_get_properties_cb, application);
diff --git a/src/gpk-check-update.c b/src/gpk-check-update.c
index 0142f7a..db23a5f 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -1481,6 +1481,9 @@ gpk_check_update_init (GpkCheckUpdate *cupdate)
/* use an asynchronous query object */
cupdate->priv->task = PK_TASK(pk_task_new ());
+ g_object_set (cupdate->priv->task,
+ "background", TRUE,
+ NULL);
cupdate->priv->control = pk_control_new ();
g_signal_connect (cupdate->priv->control, "updates-changed",
diff --git a/src/gpk-firmware.c b/src/gpk-firmware.c
index a3170ad..4d949ef 100644
--- a/src/gpk-firmware.c
+++ b/src/gpk-firmware.c
@@ -1003,6 +1003,9 @@ gpk_firmware_init (GpkFirmware *firmware)
firmware->priv->gconf_client = gconf_client_get_default ();
firmware->priv->consolekit = egg_console_kit_new ();
firmware->priv->task = PK_TASK(gpk_task_new ());
+ g_object_set (firmware->priv->task,
+ "background", TRUE,
+ NULL);
/* setup watch for new hardware */
file = g_file_new_for_path (GPK_FIRMWARE_MISSING_DIR);
diff --git a/src/gpk-hardware.c b/src/gpk-hardware.c
index 52f0434..2149562 100644
--- a/src/gpk-hardware.c
+++ b/src/gpk-hardware.c
@@ -288,6 +288,9 @@ gpk_hardware_init (GpkHardware *hardware)
return;
}
hardware->priv->task = PK_TASK(gpk_task_new ());
+ g_object_set (hardware->priv->task,
+ "background", TRUE,
+ NULL);
hardware->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (error != NULL) {
diff --git a/src/gpk-log.c b/src/gpk-log.c
index 550e378..c0684d1 100644
--- a/src/gpk-log.c
+++ b/src/gpk-log.c
@@ -696,6 +696,9 @@ main (int argc, char *argv[])
GPK_DATA G_DIR_SEPARATOR_S "icons");
client = pk_client_new ();
+ g_object_set (client,
+ "background", FALSE,
+ NULL);
/* get UI */
builder = gtk_builder_new ();
diff --git a/src/gpk-repo.c b/src/gpk-repo.c
index 702b0dd..d37f8f6 100644
--- a/src/gpk-repo.c
+++ b/src/gpk-repo.c
@@ -617,7 +617,12 @@ main (int argc, char *argv[])
gconf_client = gconf_client_get_default ();
loop = g_main_loop_new (NULL, FALSE);
+
client = pk_client_new ();
+ g_object_set (client,
+ "background", FALSE,
+ NULL);
+
control = pk_control_new ();
g_signal_connect (control, "repo-list-changed",
G_CALLBACK (gpk_repo_repo_list_changed_cb), NULL);
diff --git a/src/gpk-service-pack.c b/src/gpk-service-pack.c
index f5f15e3..dfbe7ba 100644
--- a/src/gpk-service-pack.c
+++ b/src/gpk-service-pack.c
@@ -732,6 +732,9 @@ main (int argc, char *argv[])
G_CALLBACK (gpk_pack_message_received_cb), NULL);
client = pk_client_new ();
+ g_object_set (client,
+ "background", FALSE,
+ NULL);
/* get UI */
builder = gtk_builder_new ();
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 824e957..1603354 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -375,6 +375,9 @@ gpk_update_viewer_update_packages_cb (PkTask *_task, GAsyncResult *res, GMainLoo
window = GTK_WINDOW (gtk_builder_get_object (builder, "dialog_updates"));
gpk_error_dialog_modal (window, gpk_error_enum_to_localised_text (error_item->code),
gpk_error_enum_to_localised_message (error_item->code), error_item->details);
+
+ /* re-enable the package list */
+ gpk_update_viewer_undisable_packages ();
goto out;
}
@@ -1809,13 +1812,6 @@ gpk_update_viewer_finished_cb (PkClient *client, PkExitEnum exit, guint runtime,
return;
}
- /* we've just agreed to auth or a EULA */
- if (role == PK_ROLE_ENUM_INSTALL_SIGNATURE ||
- role == PK_ROLE_ENUM_ACCEPT_EULA) {
- if (exit != PK_EXIT_ENUM_SUCCESS)
- gpk_update_viewer_undisable_packages ();
- }
-
/* we pressed cancel */
if (exit != PK_EXIT_ENUM_SUCCESS) {
gpk_update_viewer_undisable_packages ();
@@ -2150,6 +2146,8 @@ gpk_update_viewer_get_updates_cb (PkClient *client, GAsyncResult *res, GMainLoop
update_array = pk_results_get_package_array (results);
/* sort by name */
+ treeview = GTK_TREE_VIEW (gtk_builder_get_object (builder, "treeview_updates"));
+ model = gtk_tree_view_get_model (treeview);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), GPK_UPDATES_COLUMN_ID, GTK_SORT_ASCENDING);
/* get the download sizes */
@@ -2174,8 +2172,6 @@ gpk_update_viewer_get_updates_cb (PkClient *client, GAsyncResult *res, GMainLoop
gtk_widget_set_sensitive (widget, TRUE);
/* set info */
- treeview = GTK_TREE_VIEW (gtk_builder_get_object (builder, "treeview_updates"));
- model = gtk_tree_view_get_model (treeview);
gpk_update_viewer_reconsider_info (model);
out:
@@ -2721,6 +2717,9 @@ main (int argc, char *argv[])
/* this is what we use mainly */
task = PK_TASK(gpk_task_new ());
+ g_object_set (task,
+ "background", FALSE,
+ NULL);
/* get properties */
pk_control_get_properties_async (control, NULL, (GAsyncReadyCallback) gpk_update_viewer_get_properties_cb, loop);
@@ -2855,7 +2854,7 @@ main (int argc, char *argv[])
g_main_loop_unref (loop);
if (update_array != NULL)
- g_object_unref (update_array);
+ g_ptr_array_unref (update_array);
g_strfreev (install_package_ids);
g_object_unref (array_store_updates);
diff --git a/src/gpk-watch.c b/src/gpk-watch.c
index f9c19c2..91bb2fd 100644
--- a/src/gpk-watch.c
+++ b/src/gpk-watch.c
@@ -1717,6 +1717,9 @@ gpk_watch_init (GpkWatch *watch)
watch->priv->cached_messages = g_ptr_array_new_with_free_func ((GDestroyNotify) gpk_watch_cached_message_free);
watch->priv->restart_package_names = g_ptr_array_new_with_free_func (g_free);
watch->priv->task = PK_TASK(gpk_task_new ());
+ g_object_set (watch->priv->task,
+ "background", TRUE,
+ NULL);
watch->priv->dialog = gpk_modal_dialog_new ();
gpk_modal_dialog_set_window_icon (watch->priv->dialog, "pk-package-installed");
g_signal_connect (watch->priv->dialog, "cancel",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]