[gnome-photos] organize-collection-dialog: Use the OrganizeCollectionView



commit 4f8f369dec522878c494d5ae20712c05e00e55ef
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Apr 27 18:10:43 2012 +0200

    organize-collection-dialog: Use the OrganizeCollectionView

 src/photos-organize-collection-dialog.c |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-organize-collection-dialog.c b/src/photos-organize-collection-dialog.c
index 45a5d57..69c8182 100644
--- a/src/photos-organize-collection-dialog.c
+++ b/src/photos-organize-collection-dialog.c
@@ -22,6 +22,13 @@
 #include "config.h"
 
 #include "photos-organize-collection-dialog.h"
+#include "photos-organize-collection-view.h"
+
+
+struct _PhotosOrganizeCollectionDialogPrivate
+{
+  GtkWidget *coll_view;
+};
 
 
 G_DEFINE_TYPE (PhotosOrganizeCollectionDialog, photos_organize_collection_dialog, GTK_TYPE_DIALOG);
@@ -30,10 +37,12 @@ G_DEFINE_TYPE (PhotosOrganizeCollectionDialog, photos_organize_collection_dialog
 static void
 photos_organize_collection_dialog_response (GtkDialog *dialog, gint response_id)
 {
+  PhotosOrganizeCollectionDialog *self = PHOTOS_ORGANIZE_COLLECTION_DIALOG (dialog);
+
   if (response_id != GTK_RESPONSE_ACCEPT)
     return;
 
-  /* TODO: OrganizeCollectionView */
+  photos_organize_collection_view_add_collection (PHOTOS_ORGANIZE_COLLECTION_VIEW (self->priv->coll_view));
 }
 
 
@@ -44,6 +53,11 @@ photos_organize_collection_dialog_init (PhotosOrganizeCollectionDialog *self)
   GtkWidget *content_area;
   GtkWidget *sw;
 
+  self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+                                            PHOTOS_TYPE_ORGANIZE_COLLECTION_DIALOG,
+                                            PhotosOrganizeCollectionDialogPrivate);
+  priv = self->priv;
+
   gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT);
   gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_OK, GTK_RESPONSE_OK);
   gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_OK);
@@ -55,9 +69,10 @@ photos_organize_collection_dialog_init (PhotosOrganizeCollectionDialog *self)
   gtk_widget_set_margin_right (sw, 5);
   gtk_widget_set_margin_bottom (sw, 3);
 
-  /* TODO: OrganizeCollectionView */
-
+  priv->coll_view = photos_organize_collection_view_new ();
+  gtk_container_add (GTK_CONTAINER (sw), priv->coll_view);
   gtk_container_add (GTK_CONTAINER (content_area), sw);
+
   gtk_widget_show_all (GTK_WIDGET (self));
 }
 
@@ -68,6 +83,8 @@ photos_organize_collection_dialog_class_init (PhotosOrganizeCollectionDialogClas
   GtkDialogClass *dialog_class = GTK_DIALOG_CLASS (class);
 
   dialog_class->response = photos_organize_collection_dialog_response;
+
+  g_type_class_add_private (class, sizeof (PhotosOrganizeCollectionDialogPrivate));
 }
 
 



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