[gnome-photos] search-match-manager: Make it a final class
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] search-match-manager: Make it a final class
- Date: Fri, 4 Mar 2016 17:20:40 +0000 (UTC)
commit 50026a095fb52a562cf58aad1fca2acdf577728d
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Mar 4 14:47:16 2016 +0100
search-match-manager: Make it a final class
src/photos-search-match-manager.c | 18 +++++++++++-------
src/photos-search-match-manager.h | 28 ++--------------------------
2 files changed, 13 insertions(+), 33 deletions(-)
---
diff --git a/src/photos-search-match-manager.c b/src/photos-search-match-manager.c
index 62c9508..8e898cb 100644
--- a/src/photos-search-match-manager.c
+++ b/src/photos-search-match-manager.c
@@ -34,11 +34,17 @@
#include "photos-search-match-manager.h"
-struct _PhotosSearchMatchManagerPrivate
+struct _PhotosSearchMatchManager
{
+ PhotosBaseManager parent_instance;
PhotosSearchController *srch_cntrlr;
};
+struct _PhotosSearchMatchManagerClass
+{
+ PhotosBaseManagerClass parent_class;
+};
+
enum
{
PROP_0,
@@ -46,7 +52,7 @@ enum
};
-G_DEFINE_TYPE_WITH_PRIVATE (PhotosSearchMatchManager, photos_search_match_manager, PHOTOS_TYPE_BASE_MANAGER);
+G_DEFINE_TYPE (PhotosSearchMatchManager, photos_search_match_manager, PHOTOS_TYPE_BASE_MANAGER);
static gchar *
@@ -66,7 +72,7 @@ photos_search_match_manager_get_filter (PhotosBaseManager *mngr, gint flags)
if (!(flags & PHOTOS_QUERY_FLAGS_SEARCH))
goto out;
- terms = photos_search_controller_get_terms (self->priv->srch_cntrlr);
+ terms = photos_search_controller_get_terms (self->srch_cntrlr);
n_terms = g_strv_length (terms);
if (n_terms == 0)
goto out;
@@ -110,7 +116,7 @@ photos_search_match_manager_dispose (GObject *object)
{
PhotosSearchMatchManager *self = PHOTOS_SEARCH_MATCH_MANAGER (object);
- g_clear_object (&self->priv->srch_cntrlr);
+ g_clear_object (&self->srch_cntrlr);
G_OBJECT_CLASS (photos_search_match_manager_parent_class)->dispose (object);
}
@@ -124,7 +130,7 @@ photos_search_match_manager_set_property (GObject *object, guint prop_id, const
switch (prop_id)
{
case PROP_SEARCH_CONTROLLER:
- self->priv->srch_cntrlr = PHOTOS_SEARCH_CONTROLLER (g_value_dup_object (value)); /* self is owned by
context */
+ self->srch_cntrlr = PHOTOS_SEARCH_CONTROLLER (g_value_dup_object (value)); /* self is owned by context
*/
break;
default:
@@ -141,8 +147,6 @@ photos_search_match_manager_init (PhotosSearchMatchManager *self)
const gchar *author_filter;
const gchar *title_filter;
- self->priv = photos_search_match_manager_get_instance_private (self);
-
author_filter = "fn:contains ("
" tracker:case-fold (tracker:coalesce (nco:fullname (?creator),
nco:fullname(?publisher))),"
" \"%s\")";
diff --git a/src/photos-search-match-manager.h b/src/photos-search-match-manager.h
index 4fbdbd9..7a88d0a 100644
--- a/src/photos-search-match-manager.h
+++ b/src/photos-search-match-manager.h
@@ -36,36 +36,12 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
PHOTOS_TYPE_SEARCH_MATCH_MANAGER, PhotosSearchMatchManager))
-#define PHOTOS_SEARCH_MATCH_MANAGER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), \
- PHOTOS_TYPE_SEARCH_MATCH_MANAGER, PhotosSearchMatchManagerClass))
-
#define PHOTOS_IS_SEARCH_MATCH_MANAGER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
PHOTOS_TYPE_SEARCH_MATCH_MANAGER))
-#define PHOTOS_IS_SEARCH_MATCH_MANAGER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), \
- PHOTOS_TYPE_SEARCH_MATCH_MANAGER))
-
-#define PHOTOS_SEARCH_MATCH_MANAGER_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), \
- PHOTOS_TYPE_SEARCH_MATCH_MANAGER, PhotosSearchMatchManagerClass))
-
-typedef struct _PhotosSearchMatchManager PhotosSearchMatchManager;
-typedef struct _PhotosSearchMatchManagerClass PhotosSearchMatchManagerClass;
-typedef struct _PhotosSearchMatchManagerPrivate PhotosSearchMatchManagerPrivate;
-
-struct _PhotosSearchMatchManager
-{
- PhotosBaseManager parent_instance;
- PhotosSearchMatchManagerPrivate *priv;
-};
-
-struct _PhotosSearchMatchManagerClass
-{
- PhotosBaseManagerClass parent_class;
-};
+typedef struct _PhotosSearchMatchManager PhotosSearchMatchManager;
+typedef struct _PhotosSearchMatchManagerClass PhotosSearchMatchManagerClass;
GType photos_search_match_manager_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]