[gnome-packagekit] Do not use deprecated libpackagekit functionality
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Do not use deprecated libpackagekit functionality
- Date: Thu, 28 Nov 2013 17:02:01 +0000 (UTC)
commit f81237ca1696f198629a47e46fb7901b12690133
Author: Richard Hughes <richard hughsie com>
Date: Thu Nov 28 16:59:36 2013 +0000
Do not use deprecated libpackagekit functionality
src/gpk-prefs.c | 31 -------------------------------
src/gpk-update-viewer.c | 21 ---------------------
2 files changed, 0 insertions(+), 52 deletions(-)
---
diff --git a/src/gpk-prefs.c b/src/gpk-prefs.c
index ff242cf..82a1627 100644
--- a/src/gpk-prefs.c
+++ b/src/gpk-prefs.c
@@ -216,38 +216,12 @@ out:
}
/**
- * gpk_prefs_process_messages_cb:
- **/
-static void
-gpk_prefs_process_messages_cb (PkMessage *item, GpkPrefsPrivate *priv)
-{
- const gchar *title;
- gchar *details;
- GtkWindow *window;
- PkMessageEnum type;
-
- /* get data */
- g_object_get (item,
- "type", &type,
- "details", &details,
- NULL);
-
- /* show a modal window */
- window = GTK_WINDOW (gtk_builder_get_object (priv->builder, "dialog_prefs"));
- title = gpk_message_enum_to_localised_text (type);
- gpk_error_dialog_modal (window, title, details, NULL);
-
- g_free (details);
-}
-
-/**
* gpk_prefs_repo_enable_cb
**/
static void
gpk_prefs_repo_enable_cb (GObject *object, GAsyncResult *res, GpkPrefsPrivate *priv)
{
GError *error = NULL;
- GPtrArray *array;
GtkWindow *window;
PkClient *client = PK_CLIENT (object);
PkError *error_code = NULL;
@@ -271,11 +245,6 @@ gpk_prefs_repo_enable_cb (GObject *object, GAsyncResult *res, GpkPrefsPrivate *p
gpk_error_enum_to_localised_text (pk_error_get_code (error_code)),
pk_error_get_details (error_code));
goto out;
}
-
- /* process messages */
- array = pk_results_get_message_array (results);
- g_ptr_array_foreach (array, (GFunc) gpk_prefs_process_messages_cb, priv);
- g_ptr_array_unref (array);
out:
if (error_code != NULL)
g_object_unref (error_code);
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 0e2fad3..b36ed5a 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -53,7 +53,6 @@
#define GPK_UPDATE_VIEWER_MOBILE_SMALL_SIZE 512*1024 /* bytes */
static gboolean ignore_updates_changed = FALSE;
-static gboolean other_updates_held_back = FALSE;
static gchar *package_id_last = NULL;
static guint auto_shutdown_id = 0;
static guint size_total = 0;
@@ -477,9 +476,6 @@ gpk_update_viewer_update_packages_cb (PkTask *_task, GAsyncResult *res, gpointer
gpk_update_viewer_quit ();
goto out;
} else {
- /* we want the UI to update with the new list */
- if (other_updates_held_back)
- gpk_update_viewer_get_new_update_array ();
goto out;
}
@@ -2652,8 +2648,6 @@ gpk_update_viewer_get_updates_cb (PkClient *client, GAsyncResult *res, gpointer
GPtrArray *array = NULL;
GPtrArray *array_messages = NULL;
PkPackage *item;
- PkMessage *message;
- PkMessageEnum message_type;
gchar *text = NULL;
gboolean selected;
gboolean sensitive;
@@ -2690,21 +2684,6 @@ gpk_update_viewer_get_updates_cb (PkClient *client, GAsyncResult *res, gpointer
goto out;
}
- /* do we have any important messages we need to show? */
- other_updates_held_back = FALSE;
- array_messages = pk_results_get_message_array (results);
- for (i=0; i<array_messages->len; i++) {
- message = g_ptr_array_index (array_messages, i);
- g_object_get (message,
- "type", &message_type,
- NULL);
- if (message_type == PK_MESSAGE_ENUM_OTHER_UPDATES_HELD_BACK) {
- other_updates_held_back = TRUE;
- gtk_widget_show (info_updates);
- break;
- }
- }
-
/* get data */
sack = pk_results_get_package_sack (results);
pk_package_sack_sort (sack, PK_PACKAGE_SACK_SORT_TYPE_NAME);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]