[gnome-packagekit/glib2-merge-candidate: 13/13] trivial: remove a FIXME that is not true anymore
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-packagekit/glib2-merge-candidate: 13/13] trivial: remove a FIXME that is not true anymore
- Date: Fri, 9 Oct 2009 12:05:21 +0000 (UTC)
commit 90a34574f60c7785b6f5fe86e1217c91689025fb
Author: Richard Hughes <richard hughsie com>
Date: Fri Oct 9 12:49:27 2009 +0100
trivial: remove a FIXME that is not true anymore
src/gpk-dbus-task.c | 83 ---------------------------------------------------
src/gpk-hardware.c | 14 +-------
2 files changed, 2 insertions(+), 95 deletions(-)
---
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index 7d6b0c8..663e2e6 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -383,86 +383,6 @@ gpk_dbus_task_install_package_ids (GpkDbusTask *dtask)
(GAsyncReadyCallback) gpk_dbus_task_install_packages_cb, dtask);
}
-#if 0
-
-/**
- * gpk_dbus_task_finished_cb:
- **/
-static void
-gpk_dbus_task_finished_cb (PkClient *client, PkExitEnum exit_enum, guint runtime, GpkDbusTask *dtask)
-{
- PkRoleEnum role = PK_ROLE_ENUM_UNKNOWN;
- gboolean ret;
- guint len;
- guint i;
- const gchar *name = NULL;
- GError *error_dbus = NULL;
- GError *error_local = NULL;
- GPtrArray *array = NULL;
- const PkItemPackage *item;
- gboolean already_installed = FALSE;
- gchar *title = NULL;
- gchar *message = NULL;
- gchar *text = NULL;
- gchar *id = NULL;
- gchar *info_url = NULL;
- GtkResponseType button;
- gchar *package_id = NULL;
-
- if (exit_enum != PK_EXIT_ENUM_SUCCESS) {
-
- /* show finished? */
- if (!dtask->priv->show_finished)
- gpk_modal_dialog_close (dtask->priv->dialog);
-
- /* fail the transaction and set the correct error */
- error = gpk_dbus_task_error_from_exit_enum (exit_enum);
- dbus_g_method_return_error (dtask->priv->context, error_dbus);
- goto out;
- }
-
- /* from InstallPackageIds */
- if (role == PK_ROLE_ENUM_INSTALL_PACKAGES ||
- role == PK_ROLE_ENUM_INSTALL_FILES) {
-
- /* show summary? */
- if (dtask->priv->show_finished) {
- array = pk_results_get_package_array (client);
- /* TRANSLATORS: list the packages we just installed */
- gpk_modal_dialog_setup (dtask->priv->dialog, GPK_MODAL_DIALOG_PAGE_FINISHED, GPK_MODAL_DIALOG_PACKAGE_LIST);
- gpk_modal_dialog_set_message (dtask->priv->dialog, _("The following packages were installed:"));
-
- /* filter out installed */
- for (i=0; i<array->len; i++) {
- item = g_ptr_array_index (array, i);
- if (item->info != PK_INFO_ENUM_INSTALLING) {
- pk_item_list_remove_index (list, i);
- i--;
- }
- }
- gpk_modal_dialog_set_package_list (dtask->priv->dialog, array);
- gpk_modal_dialog_present (dtask->priv->dialog);
- g_object_unref (list);
- } else {
- gpk_modal_dialog_close (dtask->priv->dialog);
- }
-
- /* done! */
- egg_debug ("doing async return");
- dbus_g_method_return (dtask->priv->context, TRUE); /* FIXME: we send true? */
- goto out;
- }
-
-out:
- if (error != NULL)
- g_error_free (error);
- if (error_local != NULL)
- g_error_free (error_local);
- if (array != NULL)
- g_ptr_array_unref (array);
-}
-#endif
-
/**
* gpk_dbus_task_set_status:
**/
@@ -976,7 +896,6 @@ gpk_dbus_task_install_package_names_resolve_cb (PkTask *task, GAsyncResult *res,
array = pk_results_get_package_array (results);
if (array->len == 0) {
if (!dtask->priv->show_warning) {
- //FIXME: shows package_id in UI
/* TRANSLATORS: couldn't resolve name to package */
title = g_strdup_printf (_("Could not find packages"));
info_url = gpk_vendor_get_not_found_url (dtask->priv->vendor, GPK_VENDOR_URL_TYPE_DEFAULT);
@@ -1018,7 +937,6 @@ gpk_dbus_task_install_package_names_resolve_cb (PkTask *task, GAsyncResult *res,
/* already installed? */
if (already_installed) {
if (dtask->priv->show_warning) {
- //FIXME: shows package_id in UI
/* TRANSLATORS: title: package is already installed */
gpk_modal_dialog_setup (dtask->priv->dialog, GPK_MODAL_DIALOG_PAGE_WARNING, 0);
gpk_modal_dialog_set_title (dtask->priv->dialog, _("Failed to install packages"));
@@ -1193,7 +1111,6 @@ gpk_dbus_task_install_provide_files_search_file_cb (PkClient *client, GAsyncResu
/* get results */
array = pk_results_get_package_array (results);
- //FIXME: do something
/* found nothing? */
if (array->len == 0) {
diff --git a/src/gpk-hardware.c b/src/gpk-hardware.c
index 2149562..4947ebd 100644
--- a/src/gpk-hardware.c
+++ b/src/gpk-hardware.c
@@ -102,17 +102,6 @@ out:
}
/**
- * gpk_hardware_install_package:
- **/
-static void
-gpk_hardware_install_package (GpkHardware *hardware)
-{
- /* FIXME: this needs to be async and connect up to the repo signature stuff */
- pk_client_install_packages_async (PK_CLIENT(hardware->priv->task), TRUE, hardware->priv->package_ids, NULL, NULL, NULL,
- (GAsyncReadyCallback) gpk_hardware_install_packages_cb, hardware);
-}
-
-/**
* gpk_hardware_libnotify_cb:
**/
static void
@@ -121,7 +110,8 @@ gpk_hardware_libnotify_cb (NotifyNotification *notification, gchar *action, gpoi
GpkHardware *hardware = GPK_HARDWARE (data);
if (g_strcmp0 (action, GPK_HARDWARE_INSTALL_ACTION) == 0) {
- gpk_hardware_install_package (hardware);
+ pk_client_install_packages_async (PK_CLIENT(hardware->priv->task), TRUE, hardware->priv->package_ids, NULL, NULL, NULL,
+ (GAsyncReadyCallback) gpk_hardware_install_packages_cb, hardware);
} else if (g_strcmp0 (action, GPK_HARDWARE_DONT_PROMPT_ACTION) == 0) {
egg_debug ("set %s to FALSE", GPK_CONF_ENABLE_CHECK_HARDWARE);
gconf_client_set_bool (hardware->priv->gconf_client, GPK_CONF_ENABLE_CHECK_HARDWARE, FALSE, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]