[gnome-photos] Split out the GQuarks into a separate file
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] Split out the GQuarks into a separate file
- Date: Tue, 14 Feb 2017 14:51:52 +0000 (UTC)
commit ecc7035470b5e65a36d0af081b4f92ed92495590
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Feb 10 20:24:41 2017 +0100
Split out the GQuarks into a separate file
We will need some of them in both the application and thumbnailer
processes. Moving them into a separate file keeps the build
dependencies of the thumbnailer in control.
src/Makefile.am | 2 +
src/photos-gegl.c | 2 +-
src/photos-properties-dialog.c | 1 +
src/photos-quarks.c | 66 ++++++++++++++++++++++++++++++++++++++++
src/photos-quarks.h | 49 +++++++++++++++++++++++++++++
src/photos-utils.c | 42 -------------------------
src/photos-utils.h | 19 -----------
7 files changed, 119 insertions(+), 62 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index c1e1327..75a9264 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -176,6 +176,8 @@ gnome_photos_SOURCES = \
photos-print-setup.h \
photos-properties-dialog.c \
photos-properties-dialog.h \
+ photos-quarks.c \
+ photos-quarks.h \
photos-query.c \
photos-query.h \
photos-query-builder.h \
diff --git a/src/photos-gegl.c b/src/photos-gegl.c
index fe23994..77b42d4 100644
--- a/src/photos-gegl.c
+++ b/src/photos-gegl.c
@@ -23,7 +23,7 @@
#include "photos-debug.h"
#include "photos-gegl.h"
-#include "photos-utils.h"
+#include "photos-quarks.h"
static GeglBuffer *
diff --git a/src/photos-properties-dialog.c b/src/photos-properties-dialog.c
index c6500b5..22129b4 100644
--- a/src/photos-properties-dialog.c
+++ b/src/photos-properties-dialog.c
@@ -35,6 +35,7 @@
#include "photos-camera-cache.h"
#include "photos-local-item.h"
#include "photos-properties-dialog.h"
+#include "photos-quarks.h"
#include "photos-query-builder.h"
#include "photos-search-context.h"
#include "photos-tracker-queue.h"
diff --git a/src/photos-quarks.c b/src/photos-quarks.c
new file mode 100644
index 0000000..6983080
--- /dev/null
+++ b/src/photos-quarks.c
@@ -0,0 +1,66 @@
+/*
+ * Photos - access, organize and share your photos on GNOME
+ * Copyright © 2013 – 2017 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+
+#include "config.h"
+
+#include "photos-quarks.h"
+
+
+GQuark
+photos_quarks_flash_off_quark (void)
+{
+ return g_quark_from_static_string ("http://www.tracker-project.org/temp/nmm#flash-off");
+}
+
+
+GQuark
+photos_quarks_flash_on_quark (void)
+{
+ return g_quark_from_static_string ("http://www.tracker-project.org/temp/nmm#flash-on");
+}
+
+
+GQuark
+photos_quarks_orientation_bottom_quark (void)
+{
+ return g_quark_from_static_string
("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#orientation-bottom");
+}
+
+
+GQuark
+photos_quarks_orientation_left_quark (void)
+{
+ return g_quark_from_static_string
("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#orientation-left");
+}
+
+
+GQuark
+photos_quarks_orientation_right_quark (void)
+{
+ return g_quark_from_static_string
("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#orientation-right");
+}
+
+
+GQuark
+photos_quarks_orientation_top_quark (void)
+{
+ return g_quark_from_static_string
("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#orientation-top");
+}
diff --git a/src/photos-quarks.h b/src/photos-quarks.h
new file mode 100644
index 0000000..7386473
--- /dev/null
+++ b/src/photos-quarks.h
@@ -0,0 +1,49 @@
+/*
+ * Photos - access, organize and share your photos on GNOME
+ * Copyright © 2013 – 2017 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#ifndef PHOTOS_QUARKS_H
+#define PHOTOS_QUARKS_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+#define PHOTOS_FLASH_OFF (photos_quarks_flash_off_quark ())
+#define PHOTOS_FLASH_ON (photos_quarks_flash_on_quark ())
+#define PHOTOS_ORIENTATION_BOTTOM (photos_quarks_orientation_bottom_quark ())
+#define PHOTOS_ORIENTATION_LEFT (photos_quarks_orientation_left_quark ())
+#define PHOTOS_ORIENTATION_RIGHT (photos_quarks_orientation_right_quark ())
+#define PHOTOS_ORIENTATION_TOP (photos_quarks_orientation_top_quark ())
+
+GQuark photos_quarks_flash_off_quark (void);
+
+GQuark photos_quarks_flash_on_quark (void);
+
+GQuark photos_quarks_orientation_bottom_quark (void);
+
+GQuark photos_quarks_orientation_left_quark (void);
+
+GQuark photos_quarks_orientation_right_quark (void);
+
+GQuark photos_quarks_orientation_top_quark (void);
+
+G_END_DECLS
+
+#endif /* PHOTOS_QUARKS_H */
diff --git a/src/photos-utils.c b/src/photos-utils.c
index c83b1cc..7f0a505 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -788,20 +788,6 @@ photos_utils_get_controller (PhotosWindowMode mode,
}
-GQuark
-photos_utils_flash_off_quark (void)
-{
- return g_quark_from_static_string ("http://www.tracker-project.org/temp/nmm#flash-off");
-}
-
-
-GQuark
-photos_utils_flash_on_quark (void)
-{
- return g_quark_from_static_string ("http://www.tracker-project.org/temp/nmm#flash-on");
-}
-
-
gchar *
photos_utils_get_extension_from_mime_type (const gchar *mime_type)
{
@@ -982,34 +968,6 @@ photos_utils_object_list_free_full (GList *objects)
}
-GQuark
-photos_utils_orientation_bottom_quark (void)
-{
- return g_quark_from_static_string
("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#orientation-bottom");
-}
-
-
-GQuark
-photos_utils_orientation_left_quark (void)
-{
- return g_quark_from_static_string
("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#orientation-left");
-}
-
-
-GQuark
-photos_utils_orientation_right_quark (void)
-{
- return g_quark_from_static_string
("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#orientation-right");
-}
-
-
-GQuark
-photos_utils_orientation_top_quark (void)
-{
- return g_quark_from_static_string
("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#orientation-top");
-}
-
-
static void
photos_utils_update_executed (GObject *source_object, GAsyncResult *res, gpointer user_data)
{
diff --git a/src/photos-utils.h b/src/photos-utils.h
index ed7dc78..01af9ee 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -43,13 +43,6 @@
G_BEGIN_DECLS
-#define PHOTOS_FLASH_OFF (photos_utils_flash_off_quark ())
-#define PHOTOS_FLASH_ON (photos_utils_flash_on_quark ())
-#define PHOTOS_ORIENTATION_BOTTOM (photos_utils_orientation_bottom_quark ())
-#define PHOTOS_ORIENTATION_LEFT (photos_utils_orientation_left_quark ())
-#define PHOTOS_ORIENTATION_RIGHT (photos_utils_orientation_right_quark ())
-#define PHOTOS_ORIENTATION_TOP (photos_utils_orientation_top_quark ())
-
#define PHOTOS_BASE_ITEM_EXTENSION_POINT_NAME "photos-base-item"
#define PHOTOS_SHARE_POINT_EXTENSION_POINT_NAME "photos-share-point"
#define PHOTOS_SHARE_POINT_ONLINE_EXTENSION_POINT_NAME "photos-share-point-online"
@@ -108,10 +101,6 @@ gdouble photos_utils_eval_radial_line (gdouble crop_center_x
gdouble corner_y,
gdouble event_x);
-GQuark photos_utils_flash_off_quark (void);
-
-GQuark photos_utils_flash_on_quark (void);
-
void photos_utils_get_controller (PhotosWindowMode mode,
PhotosOffsetController **out_offset_cntrlr,
PhotosTrackerController **out_trk_cntrlr);
@@ -139,14 +128,6 @@ void photos_utils_list_box_header_func (GtkListBoxRow *row,
void photos_utils_object_list_free_full (GList *objects);
-GQuark photos_utils_orientation_bottom_quark (void);
-
-GQuark photos_utils_orientation_left_quark (void);
-
-GQuark photos_utils_orientation_right_quark (void);
-
-GQuark photos_utils_orientation_top_quark (void);
-
void photos_utils_set_edited_name (const gchar *urn, const gchar *title);
void photos_utils_set_favorite (const gchar *urn, gboolean is_favorite);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]