summaryrefslogtreecommitdiff
path: root/plugins/common/Resources.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/common/Resources.c')
-rw-r--r--plugins/common/Resources.c417
1 files changed, 417 insertions, 0 deletions
diff --git a/plugins/common/Resources.c b/plugins/common/Resources.c
new file mode 100644
index 0000000..dc7428b
--- /dev/null
+++ b/plugins/common/Resources.c
@@ -0,0 +1,417 @@
+/* Resources.c generated by valac 0.32.1, the Vala compiler
+ * generated from Resources.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later). See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+
+
+
+#define RESOURCES_WEBSITE_NAME _ ("Visit the Shotwell home page")
+#define RESOURCES_WEBSITE_URL "https://wiki.gnome.org/Apps/Shotwell"
+#define RESOURCES_LICENSE "\n" \
+"Shotwell is free software; you can redistribute it and/or modify it un" \
+"der the \n" \
+"terms of the GNU Lesser General Public License as published by the Fre" \
+"e \n" \
+"Software Foundation; either version 2.1 of the License, or (at your op" \
+"tion) \n" \
+"any later version.\n" \
+"\n" \
+"Shotwell is distributed in the hope that it will be useful, but WITHOU" \
+"T \n" \
+"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or " \
+"FITNESS\n" \
+"FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License f" \
+"or \n" \
+"more details.\n" \
+"\n" \
+"You should have received a copy of the GNU Lesser General Public Licen" \
+"se \n" \
+"along with Shotwell; if not, write to the Free Software Foundation, In" \
+"c., \n" \
+"51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n"
+#define RESOURCES_TRANSLATORS _ ("translator-credits")
+GdkPixbuf** resources_load_icon_set (GFile* icon_file, int* result_length1);
+static void _vala_array_add2 (GdkPixbuf*** array, int* length, int* size, GdkPixbuf* value);
+GdkPixbuf** resources_load_from_resource (const gchar* resource_path, int* result_length1);
+static void _vala_array_add3 (GdkPixbuf*** array, int* length, int* size, GdkPixbuf* value);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 40 "Resources.c"
+}
+
+
+static void _vala_array_add2 (GdkPixbuf*** array, int* length, int* size, GdkPixbuf* value) {
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if ((*length) == (*size)) {
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ *size = (*size) ? (2 * (*size)) : 4;
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ *array = g_renew (GdkPixbuf*, *array, (*size) + 1);
+#line 51 "Resources.c"
+ }
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ (*array)[(*length)++] = value;
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ (*array)[*length] = NULL;
+#line 57 "Resources.c"
+}
+
+
+GdkPixbuf** resources_load_icon_set (GFile* icon_file, int* result_length1) {
+ GdkPixbuf** result = NULL;
+ GdkPixbuf* icon = NULL;
+ GdkPixbuf* _tmp10_ = NULL;
+ GdkPixbuf** _tmp16_ = NULL;
+ gint _tmp16__length1 = 0;
+ GError * _inner_error_ = NULL;
+#line 40 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ g_return_val_if_fail ((icon_file == NULL) || G_IS_FILE (icon_file), NULL);
+#line 41 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ icon = NULL;
+#line 72 "Resources.c"
+ {
+ GdkPixbuf* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ GdkPixbuf* _tmp4_ = NULL;
+ GdkPixbuf* _tmp5_ = NULL;
+ GdkPixbuf* _tmp6_ = NULL;
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp1_ = icon_file;
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp2_ = g_file_get_path (_tmp1_);
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp3_ = _tmp2_;
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp4_ = gdk_pixbuf_new_from_file (_tmp3_, &_inner_error_);
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp5_ = _tmp4_;
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_free0 (_tmp3_);
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp0_ = _tmp5_;
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 97 "Resources.c"
+ goto __catch9_g_error;
+ }
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp6_ = _tmp0_;
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp0_ = NULL;
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (icon);
+#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ icon = _tmp6_;
+#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (_tmp0_);
+#line 110 "Resources.c"
+ }
+ goto __finally9;
+ __catch9_g_error:
+ {
+ GError* err = NULL;
+ GFile* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ err = _inner_error_;
+#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _inner_error_ = NULL;
+#line 45 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp7_ = icon_file;
+#line 45 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp8_ = g_file_get_path (_tmp7_);
+#line 45 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp9_ = _tmp8_;
+#line 45 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ g_warning ("Resources.vala:45: couldn't load icon set from %s.", _tmp9_);
+#line 45 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_free0 (_tmp9_);
+#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_error_free0 (err);
+#line 135 "Resources.c"
+ }
+ __finally9:
+#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (icon);
+#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ g_clear_error (&_inner_error_);
+#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ return NULL;
+#line 148 "Resources.c"
+ }
+#line 48 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp10_ = icon;
+#line 48 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (_tmp10_ != NULL) {
+#line 154 "Resources.c"
+ GdkPixbuf** icon_pixbuf_set = NULL;
+ GdkPixbuf** _tmp11_ = NULL;
+ gint icon_pixbuf_set_length1 = 0;
+ gint _icon_pixbuf_set_size_ = 0;
+ GdkPixbuf** _tmp12_ = NULL;
+ gint _tmp12__length1 = 0;
+ GdkPixbuf* _tmp13_ = NULL;
+ GdkPixbuf* _tmp14_ = NULL;
+ GdkPixbuf** _tmp15_ = NULL;
+ gint _tmp15__length1 = 0;
+#line 49 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp11_ = g_new0 (GdkPixbuf*, 0 + 1);
+#line 49 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ icon_pixbuf_set = _tmp11_;
+#line 49 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ icon_pixbuf_set_length1 = 0;
+#line 49 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _icon_pixbuf_set_size_ = icon_pixbuf_set_length1;
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp12_ = icon_pixbuf_set;
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp12__length1 = icon_pixbuf_set_length1;
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp13_ = icon;
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp14_ = _g_object_ref0 (_tmp13_);
+#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _vala_array_add2 (&icon_pixbuf_set, &icon_pixbuf_set_length1, &_icon_pixbuf_set_size_, _tmp14_);
+#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp15_ = icon_pixbuf_set;
+#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp15__length1 = icon_pixbuf_set_length1;
+#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (result_length1) {
+#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ *result_length1 = _tmp15__length1;
+#line 191 "Resources.c"
+ }
+#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ result = _tmp15_;
+#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (icon);
+#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ return result;
+#line 199 "Resources.c"
+ }
+#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp16_ = NULL;
+#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp16__length1 = 0;
+#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (result_length1) {
+#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ *result_length1 = _tmp16__length1;
+#line 209 "Resources.c"
+ }
+#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ result = _tmp16_;
+#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (icon);
+#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ return result;
+#line 217 "Resources.c"
+}
+
+
+static void _vala_array_add3 (GdkPixbuf*** array, int* length, int* size, GdkPixbuf* value) {
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if ((*length) == (*size)) {
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ *size = (*size) ? (2 * (*size)) : 4;
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ *array = g_renew (GdkPixbuf*, *array, (*size) + 1);
+#line 228 "Resources.c"
+ }
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ (*array)[(*length)++] = value;
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ (*array)[*length] = NULL;
+#line 234 "Resources.c"
+}
+
+
+GdkPixbuf** resources_load_from_resource (const gchar* resource_path, int* result_length1) {
+ GdkPixbuf** result = NULL;
+ GdkPixbuf* icon = NULL;
+ GdkPixbuf* _tmp5_ = NULL;
+ GdkPixbuf** _tmp11_ = NULL;
+ gint _tmp11__length1 = 0;
+ GError * _inner_error_ = NULL;
+#line 57 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ g_return_val_if_fail (resource_path != NULL, NULL);
+#line 58 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ icon = NULL;
+#line 249 "Resources.c"
+ {
+ GdkPixbuf* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ GdkPixbuf* _tmp2_ = NULL;
+ GdkPixbuf* _tmp3_ = NULL;
+#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp1_ = resource_path;
+#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp2_ = gdk_pixbuf_new_from_resource (_tmp1_, &_inner_error_);
+#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp0_ = _tmp2_;
+#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 263 "Resources.c"
+ goto __catch10_g_error;
+ }
+#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp3_ = _tmp0_;
+#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp0_ = NULL;
+#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (icon);
+#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ icon = _tmp3_;
+#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (_tmp0_);
+#line 276 "Resources.c"
+ }
+ goto __finally10;
+ __catch10_g_error:
+ {
+ GError* _error_ = NULL;
+ const gchar* _tmp4_ = NULL;
+#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _error_ = _inner_error_;
+#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _inner_error_ = NULL;
+#line 62 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp4_ = resource_path;
+#line 62 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ g_warning ("Resources.vala:62: Couldn't load icon set from %s", _tmp4_);
+#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_error_free0 (_error_);
+#line 293 "Resources.c"
+ }
+ __finally10:
+#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (icon);
+#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ g_clear_error (&_inner_error_);
+#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ return NULL;
+#line 306 "Resources.c"
+ }
+#line 65 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp5_ = icon;
+#line 65 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (_tmp5_ != NULL) {
+#line 312 "Resources.c"
+ GdkPixbuf** icon_pixbuf_set = NULL;
+ GdkPixbuf** _tmp6_ = NULL;
+ gint icon_pixbuf_set_length1 = 0;
+ gint _icon_pixbuf_set_size_ = 0;
+ GdkPixbuf** _tmp7_ = NULL;
+ gint _tmp7__length1 = 0;
+ GdkPixbuf* _tmp8_ = NULL;
+ GdkPixbuf* _tmp9_ = NULL;
+ GdkPixbuf** _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+#line 66 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp6_ = g_new0 (GdkPixbuf*, 0 + 1);
+#line 66 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ icon_pixbuf_set = _tmp6_;
+#line 66 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ icon_pixbuf_set_length1 = 0;
+#line 66 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _icon_pixbuf_set_size_ = icon_pixbuf_set_length1;
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp7_ = icon_pixbuf_set;
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp7__length1 = icon_pixbuf_set_length1;
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp8_ = icon;
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp9_ = _g_object_ref0 (_tmp8_);
+#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _vala_array_add3 (&icon_pixbuf_set, &icon_pixbuf_set_length1, &_icon_pixbuf_set_size_, _tmp9_);
+#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp10_ = icon_pixbuf_set;
+#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp10__length1 = icon_pixbuf_set_length1;
+#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (result_length1) {
+#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ *result_length1 = _tmp10__length1;
+#line 349 "Resources.c"
+ }
+#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ result = _tmp10_;
+#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (icon);
+#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ return result;
+#line 357 "Resources.c"
+ }
+#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp11_ = NULL;
+#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _tmp11__length1 = 0;
+#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ if (result_length1) {
+#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ *result_length1 = _tmp11__length1;
+#line 367 "Resources.c"
+ }
+#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ result = _tmp11_;
+#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ _g_object_unref0 (icon);
+#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala"
+ return result;
+#line 375 "Resources.c"
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+