[gnome-photos] Split out the PHOTOS_ERROR error domain into a separate file



commit 93bb18213a88a04b9cd7635242ff71dc797fa500
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Feb 9 12:52:37 2017 +0100

    Split out the PHOTOS_ERROR error domain into a separate file
    
    We are going to add actual error codes that are not 0 in a subsequent
    commit.

 src/Makefile.am                         |    2 +
 src/photos-base-item.c                  |    1 +
 src/photos-camera-cache.c               |    1 +
 src/photos-create-collection-icon-job.c |    1 +
 src/photos-create-collection-job.c      |    1 +
 src/photos-error.c                      |   31 ++++++++++++++++++++++++++++
 src/photos-error.h                      |   34 +++++++++++++++++++++++++++++++
 src/photos-facebook-item.c              |    1 +
 src/photos-flickr-item.c                |    1 +
 src/photos-google-item.c                |    1 +
 src/photos-local-item.c                 |    1 +
 src/photos-share-point-email.c          |    1 +
 src/photos-share-point-google.c         |    1 +
 src/photos-utils.c                      |    8 +------
 src/photos-utils.h                      |    3 --
 15 files changed, 78 insertions(+), 10 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index c9af2f3..c5a9bce 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,6 +66,8 @@ gnome_photos_SOURCES = \
        photos-done-notification.h \
        photos-dropdown.c \
        photos-dropdown.h \
+       photos-error.c \
+       photos-error.h \
        photos-export-dialog.c \
        photos-export-dialog.h \
        photos-export-notification.c \
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 88b5f11..e3d8afe 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -45,6 +45,7 @@
 #include "photos-collection-icon-watcher.h"
 #include "photos-debug.h"
 #include "photos-delete-item-job.h"
+#include "photos-error.h"
 #include "photos-filterable.h"
 #include "photos-gegl.h"
 #include "photos-icons.h"
diff --git a/src/photos-camera-cache.c b/src/photos-camera-cache.c
index 7f0d3de..5b5614a 100644
--- a/src/photos-camera-cache.c
+++ b/src/photos-camera-cache.c
@@ -24,6 +24,7 @@
 #include <tracker-sparql.h>
 
 #include "photos-camera-cache.h"
+#include "photos-error.h"
 #include "photos-query-builder.h"
 #include "photos-search-context.h"
 #include "photos-tracker-queue.h"
diff --git a/src/photos-create-collection-icon-job.c b/src/photos-create-collection-icon-job.c
index 2c38938..aa11b2e 100644
--- a/src/photos-create-collection-icon-job.c
+++ b/src/photos-create-collection-icon-job.c
@@ -25,6 +25,7 @@
 
 #include "config.h"
 
+#include "photos-error.h"
 #include "photos-query.h"
 #include "photos-query-builder.h"
 #include "photos-create-collection-icon-job.h"
diff --git a/src/photos-create-collection-job.c b/src/photos-create-collection-job.c
index 2f2e279..50712e4 100644
--- a/src/photos-create-collection-job.c
+++ b/src/photos-create-collection-job.c
@@ -30,6 +30,7 @@
 #include <tracker-sparql.h>
 
 #include "photos-create-collection-job.h"
+#include "photos-error.h"
 #include "photos-query.h"
 #include "photos-query-builder.h"
 #include "photos-search-context.h"
diff --git a/src/photos-error.c b/src/photos-error.c
new file mode 100644
index 0000000..ffb6036
--- /dev/null
+++ b/src/photos-error.c
@@ -0,0 +1,31 @@
+/*
+ * 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-error.h"
+
+
+GQuark
+photos_error_error_quark (void)
+{
+  return g_quark_from_static_string ("gnome-photos-error-quark");
+}
diff --git a/src/photos-error.h b/src/photos-error.h
new file mode 100644
index 0000000..aa55a33
--- /dev/null
+++ b/src/photos-error.h
@@ -0,0 +1,34 @@
+/*
+ * 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_ERROR_H
+#define PHOTOS_ERROR_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+#define PHOTOS_ERROR (photos_error_error_quark ())
+
+GQuark           photos_error_error_quark                 (void);
+
+G_END_DECLS
+
+#endif /* PHOTOS_ERROR_H */
diff --git a/src/photos-facebook-item.c b/src/photos-facebook-item.c
index 704280a..5ba58d4 100644
--- a/src/photos-facebook-item.c
+++ b/src/photos-facebook-item.c
@@ -36,6 +36,7 @@
 
 #include "photos-base-manager.h"
 #include "photos-debug.h"
+#include "photos-error.h"
 #include "photos-facebook-item.h"
 #include "photos-search-context.h"
 #include "photos-source.h"
diff --git a/src/photos-flickr-item.c b/src/photos-flickr-item.c
index c14bdc5..4e17936 100644
--- a/src/photos-flickr-item.c
+++ b/src/photos-flickr-item.c
@@ -36,6 +36,7 @@
 
 #include "photos-base-manager.h"
 #include "photos-debug.h"
+#include "photos-error.h"
 #include "photos-flickr-item.h"
 #include "photos-search-context.h"
 #include "photos-source.h"
diff --git a/src/photos-google-item.c b/src/photos-google-item.c
index 3813051..140fef2 100644
--- a/src/photos-google-item.c
+++ b/src/photos-google-item.c
@@ -34,6 +34,7 @@
 
 #include "photos-base-manager.h"
 #include "photos-debug.h"
+#include "photos-error.h"
 #include "photos-google-item.h"
 #include "photos-search-context.h"
 #include "photos-source.h"
diff --git a/src/photos-local-item.c b/src/photos-local-item.c
index fce0b89..0fbc860 100644
--- a/src/photos-local-item.c
+++ b/src/photos-local-item.c
@@ -31,6 +31,7 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 
+#include "photos-error.h"
 #include "photos-local-item.h"
 #include "photos-utils.h"
 
diff --git a/src/photos-share-point-email.c b/src/photos-share-point-email.c
index 19aed7a..357299e 100644
--- a/src/photos-share-point-email.c
+++ b/src/photos-share-point-email.c
@@ -26,6 +26,7 @@
 #include <glib/gi18n.h>
 
 #include "photos-base-item.h"
+#include "photos-error.h"
 #include "photos-filterable.h"
 #include "photos-share-point-email.h"
 #include "photos-utils.h"
diff --git a/src/photos-share-point-google.c b/src/photos-share-point-google.c
index fd5290a..4fba463 100644
--- a/src/photos-share-point-google.c
+++ b/src/photos-share-point-google.c
@@ -28,6 +28,7 @@
 
 #include "photos-application.h"
 #include "photos-base-item.h"
+#include "photos-error.h"
 #include "photos-filterable.h"
 #include "photos-item-manager.h"
 #include "photos-search-context.h"
diff --git a/src/photos-utils.c b/src/photos-utils.c
index a9f2b35..db90ea3 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -37,6 +37,7 @@
 #include <libgd/gd.h>
 
 #include "photos-application.h"
+#include "photos-error.h"
 #include "photos-facebook-item.h"
 #include "photos-flickr-item.h"
 #include "photos-google-item.h"
@@ -748,13 +749,6 @@ photos_utils_equal_double (gdouble a, gdouble b)
 }
 
 
-GQuark
-photos_utils_error_quark (void)
-{
-  return g_quark_from_static_string ("gnome-photos-error-quark");
-}
-
-
 gdouble
 photos_utils_eval_radial_line (gdouble crop_center_x,
                                gdouble crop_center_y,
diff --git a/src/photos-utils.h b/src/photos-utils.h
index 836693a..53923d9 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -43,7 +43,6 @@
 
 G_BEGIN_DECLS
 
-#define PHOTOS_ERROR (photos_utils_error_quark ())
 #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 ())
@@ -108,8 +107,6 @@ void             photos_utils_ensure_extension_points     (void);
 
 gboolean         photos_utils_equal_double                (gdouble a, gdouble b);
 
-GQuark           photos_utils_error_quark                 (void);
-
 gdouble          photos_utils_eval_radial_line            (gdouble crop_center_x,
                                                            gdouble crop_center_y,
                                                            gdouble corner_x,


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