[gnome-photos/wip/rishi/edit-mode: 16/24] utils: Add an extension point for PhotosTool sub-classes



commit fbc8ed74ebc29126b0f72aea2d2684aa1f5fda02
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jun 2 20:49:13 2015 +0200

    utils: Add an extension point for PhotosTool sub-classes

 src/photos-utils.c |    4 ++++
 src/photos-utils.h |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-utils.c b/src/photos-utils.c
index 27c90a0..a027b21 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -45,6 +45,7 @@
 #include "photos-operation-insta-filter.h"
 #include "photos-query.h"
 #include "photos-source.h"
+#include "photos-tool.h"
 #include "photos-tracker-queue.h"
 #include "photos-utils.h"
 
@@ -552,6 +553,9 @@ photos_utils_ensure_extension_points (void)
       extension_point = g_io_extension_point_register (PHOTOS_BASE_ITEM_EXTENSION_POINT_NAME);
       g_io_extension_point_set_required_type (extension_point, PHOTOS_TYPE_BASE_ITEM);
 
+      extension_point = g_io_extension_point_register (PHOTOS_TOOL_EXTENSION_POINT_NAME);
+      g_io_extension_point_set_required_type (extension_point, PHOTOS_TYPE_TOOL);
+
       g_once_init_leave (&once_init_value, 1);
     }
 }
diff --git a/src/photos-utils.h b/src/photos-utils.h
index 25af28a..c4d6dab 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -48,6 +48,8 @@ G_BEGIN_DECLS
 #define PHOTOS_COLLECTION_SCREENSHOT \
   "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#image-category-screenshot";
 
+#define PHOTOS_TOOL_EXTENSION_POINT_NAME "photos-tool"
+
 void             photos_utils_border_pixbuf               (GdkPixbuf *pixbuf);
 
 GdkPixbuf       *photos_utils_center_pixbuf               (GdkPixbuf *pixbuf, gint size);


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