[gnome-photos] view-embed: Some cleanups
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] view-embed: Some cleanups
- Date: Fri, 10 Aug 2012 10:55:57 +0000 (UTC)
commit e3812cd969b444a88db99dd03c4040f9b0577700
Author: Debarshi Ray <debarshir gnome org>
Date: Sun Aug 5 19:29:05 2012 +0200
view-embed: Some cleanups
Original patch from Cosimo Cecchi for gnome-documents.
src/photos-view-embed.c | 30 ++++++------------------------
1 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/src/photos-view-embed.c b/src/photos-view-embed.c
index 701ea39..57c93e1 100644
--- a/src/photos-view-embed.c
+++ b/src/photos-view-embed.c
@@ -66,19 +66,6 @@ G_DEFINE_TYPE (PhotosViewEmbed, photos_view_embed, CLUTTER_TYPE_BOX);
static void
-photos_view_embed_destroy_preview (PhotosViewEmbed *self)
-{
- PhotosViewEmbedPrivate *priv = self->priv;
-
- if (priv->loader_cancellable != NULL)
- {
- g_cancellable_cancel (priv->loader_cancellable);
- g_clear_object (&priv->loader_cancellable);
- }
-}
-
-
-static void
photos_view_embed_item_load (GObject *source_object, GAsyncResult *res, gpointer user_data)
{
PhotosViewEmbed *self = PHOTOS_VIEW_EMBED (user_data);
@@ -103,8 +90,6 @@ photos_view_embed_active_changed (PhotosBaseManager *manager, GObject *object, g
if (object == NULL)
return;
- photos_view_embed_destroy_preview (self);
-
/* TODO: CollectionManager */
photos_mode_controller_set_window_mode (priv->mode_cntrlr, PHOTOS_WINDOW_MODE_PREVIEW);
@@ -118,12 +103,6 @@ photos_view_embed_active_changed (PhotosBaseManager *manager, GObject *object, g
static void
-photos_view_embed_destroy_preview_child (PhotosViewEmbed *self)
-{
-}
-
-
-static void
photos_view_embed_fullscreen_changed (PhotosModeController *mode_cntrlr, gboolean fullscreen, gpointer user_data)
{
}
@@ -166,9 +145,14 @@ photos_view_embed_prepare_for_overview (PhotosViewEmbed *self)
GtkAdjustment *vadjustment;
GtkWidget *vscrollbar;
- photos_view_embed_destroy_preview (self);
photos_base_manager_set_active_object (priv->item_mngr, NULL);
+ if (priv->loader_cancellable != NULL)
+ {
+ g_cancellable_cancel (priv->loader_cancellable);
+ g_clear_object (&priv->loader_cancellable);
+ }
+
photos_error_box_move_out (PHOTOS_ERROR_BOX (priv->error_box));
if (priv->view == NULL)
@@ -254,8 +238,6 @@ photos_view_embed_prepare_for_preview (PhotosViewEmbed *self)
priv->scrolled_win_preview,
NULL);
}
- else
- photos_view_embed_destroy_preview_child (self);
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), priv->preview_page);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]