aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2012-02-06 21:07:57 +0000
committerConor Curran <conor.curran@canonical.com>2012-02-06 21:07:57 +0000
commite0c43e050f0ec37d22111cc90b7fa1dc7f5c0da8 (patch)
tree8100ea76bbcacb8667b65db36848982666311cff /src
parent9954c4eb34c9c9c66d3010d7e1dced82b0747518 (diff)
downloadayatana-indicator-session-e0c43e050f0ec37d22111cc90b7fa1dc7f5c0da8.tar.gz
ayatana-indicator-session-e0c43e050f0ec37d22111cc90b7fa1dc7f5c0da8.tar.bz2
ayatana-indicator-session-e0c43e050f0ec37d22111cc90b7fa1dc7f5c0da8.zip
query for updates half complete
Diffstat (limited to 'src')
-rw-r--r--src/apt-watcher.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/apt-watcher.c b/src/apt-watcher.c
index 571b1c2..0165bf0 100644
--- a/src/apt-watcher.c
+++ b/src/apt-watcher.c
@@ -41,13 +41,16 @@ struct _AptWatcher
GDBusProxy * proxy;
};
-static void apt_watcher_show_apt_dialog (DbusmenuMenuitem* mi,
- guint timestamp,
- gpointer userdata);
-//static gboolean apt_watcher_start_apt_interaction (gpointer data);
-
G_DEFINE_TYPE (AptWatcher, apt_watcher, G_TYPE_OBJECT);
+static void
+get_updates_complete (GObject *source_object,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+
+}
+
static void apt_watcher_signal_cb ( GDBusProxy* proxy,
gchar* sender_name,
gchar* signal_name,
@@ -55,14 +58,19 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy,
gpointer user_data)
{
g_return_if_fail (APT_IS_WATCHER (user_data));
- //AptWatcher* self = APT_WATCHER (user_data);
+ AptWatcher* self = APT_WATCHER (user_data);
g_variant_ref_sink (parameters);
GVariant *value = g_variant_get_child_value (parameters, 0);
if (g_strcmp0(signal_name, "UpdatesChanged") == 0){
g_debug ("UpdatesChanged signal received");
-
+ self->pkclient = pk_client_new ();
+ pk_client_get_updates_async (self->pkclient,
+ PK_FILTER_ENUM_NONE,
+ NULL, NULL, NULL,
+ get_updates_complete,
+ self);
}
else if (g_strcmp0(signal_name, "RestartScheduled") == 0) {
g_debug ("RestartScheduled signal received");
@@ -190,7 +198,6 @@ static void
apt_watcher_init (AptWatcher *self)
{
self->current_state = UP_TO_DATE;
- self->pkclient = pk_client_new ();
g_timeout_add_seconds (60,
apt_watcher_start_apt_interaction,
self);