[gnome-photos] application: Invoke the media server miner to refresh the cache



commit 2bb509aef414e40099e1cc764d901e3e862988d3
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Sep 5 15:46:01 2014 +0200

    application: Invoke the media server miner to refresh the cache
    
    Fixes: https://bugzilla.gnome.org/728913

 src/photos-application.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 993d543..71922d4 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -73,6 +73,7 @@ struct _PhotosApplicationPrivate
   GomMiner *facebook_miner;
   GomMiner *flickr_miner;
   GomMiner *google_miner;
+  GomMiner *media_server_miner;
   GtkWidget *main_window;
   PhotosBaseManager *item_mngr;
   PhotosCameraCache *camera_cache;
@@ -459,6 +460,9 @@ photos_application_refresh_miners (PhotosApplication *self)
 
   if (photos_source_manager_has_provider_type (PHOTOS_SOURCE_MANAGER (priv->state->src_mngr), "google"))
     photos_application_refresh_miner_now (self, priv->google_miner);
+
+  if (photos_source_manager_has_provider_type (PHOTOS_SOURCE_MANAGER (priv->state->src_mngr), 
"media_server"))
+    photos_application_refresh_miner_now (self, priv->media_server_miner);
 }
 
 
@@ -832,6 +836,13 @@ photos_application_startup (GApplication *application)
                                                          NULL,
                                                          NULL);
 
+  priv->media_server_miner = gom_miner_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
+                                                               G_DBUS_PROXY_FLAGS_NONE,
+                                                               "org.gnome.OnlineMiners.MediaServer",
+                                                               "/org/gnome/OnlineMiners/MediaServer",
+                                                               NULL,
+                                                               NULL);
+
   tracker_extract_priority_proxy_new_for_bus (G_BUS_TYPE_SESSION,
                                               G_DBUS_PROXY_FLAGS_NONE,
                                               "org.freedesktop.Tracker1.Miner.Extract",
@@ -970,6 +981,7 @@ photos_application_dispose (GObject *object)
   g_clear_object (&priv->facebook_miner);
   g_clear_object (&priv->flickr_miner);
   g_clear_object (&priv->google_miner);
+  g_clear_object (&priv->media_server_miner);
   g_clear_object (&priv->item_mngr);
   g_clear_object (&priv->camera_cache);
   g_clear_object (&priv->mode_cntrlr);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]