diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:09:20 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:09:20 +0200 |
commit | 5e9f4eea451a77ba3b93db3747841ed2bd969e9f (patch) | |
tree | 75046a38ca68975261d853a2e56ff7bf6b3e1daa /plugins/common/Resources.c | |
parent | 18b52c2983a1b3409011f72d27f15de576c5eb1c (diff) |
New upstream version 0.30.1upstream/0.30.1
Diffstat (limited to 'plugins/common/Resources.c')
-rw-r--r-- | plugins/common/Resources.c | 444 |
1 files changed, 0 insertions, 444 deletions
diff --git a/plugins/common/Resources.c b/plugins/common/Resources.c deleted file mode 100644 index 828d6df..0000000 --- a/plugins/common/Resources.c +++ /dev/null @@ -1,444 +0,0 @@ -/* Resources.c generated by valac 0.40.4, 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_add4 (GdkPixbuf** * array, - int* length, - int* size, - GdkPixbuf* value); -GdkPixbuf** resources_load_from_resource (const gchar* resource_path, - int* result_length1); -static void _vala_array_add5 (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 55 "Resources.c" -} - - -static void -_vala_array_add4 (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 71 "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 77 "Resources.c" -} - - -GdkPixbuf** -resources_load_icon_set (GFile* icon_file, - int* result_length1) -{ - GdkPixbuf** result = NULL; - GdkPixbuf* icon = NULL; - GdkPixbuf* _tmp8_; - GdkPixbuf** _tmp14_; - gint _tmp14__length1; - 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 95 "Resources.c" - { - GdkPixbuf* _tmp0_ = NULL; - gchar* _tmp1_; - gchar* _tmp2_; - GdkPixbuf* _tmp3_; - GdkPixbuf* _tmp4_; - GdkPixbuf* _tmp5_; -#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp1_ = g_file_get_path (icon_file); -#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp2_ = _tmp1_; -#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp3_ = gdk_pixbuf_new_from_file (_tmp2_, &_inner_error_); -#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp4_ = _tmp3_; -#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _g_free0 (_tmp2_); -#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp0_ = _tmp4_; -#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 117 "Resources.c" - goto __catch4_g_error; - } -#line 43 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp5_ = _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 = _tmp5_; -#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _g_object_unref0 (_tmp0_); -#line 130 "Resources.c" - } - goto __finally4; - __catch4_g_error: - { - GError* err = NULL; - gchar* _tmp6_; - gchar* _tmp7_; -#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" - _tmp6_ = g_file_get_path (icon_file); -#line 45 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp7_ = _tmp6_; -#line 45 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - g_warning ("Resources.vala:45: couldn't load icon set from %s.", _tmp7_); -#line 45 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _g_free0 (_tmp7_); -#line 42 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _g_error_free0 (err); -#line 152 "Resources.c" - } - __finally4: -#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 165 "Resources.c" - } -#line 48 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp8_ = icon; -#line 48 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - if (_tmp8_ != NULL) { -#line 171 "Resources.c" - GdkPixbuf** icon_pixbuf_set = NULL; - GdkPixbuf** _tmp9_; - gint icon_pixbuf_set_length1; - gint _icon_pixbuf_set_size_; - GdkPixbuf** _tmp10_; - gint _tmp10__length1; - GdkPixbuf* _tmp11_; - GdkPixbuf* _tmp12_; - GdkPixbuf** _tmp13_; - gint _tmp13__length1; -#line 49 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp9_ = g_new0 (GdkPixbuf*, 0 + 1); -#line 49 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - icon_pixbuf_set = _tmp9_; -#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" - _tmp10_ = icon_pixbuf_set; -#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp10__length1 = icon_pixbuf_set_length1; -#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp11_ = icon; -#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp12_ = _g_object_ref0 (_tmp11_); -#line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _vala_array_add4 (&icon_pixbuf_set, &icon_pixbuf_set_length1, &_icon_pixbuf_set_size_, _tmp12_); -#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp13_ = icon_pixbuf_set; -#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp13__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 = _tmp13__length1; -#line 208 "Resources.c" - } -#line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - result = _tmp13_; -#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 216 "Resources.c" - } -#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp14_ = NULL; -#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp14__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 = _tmp14__length1; -#line 226 "Resources.c" - } -#line 54 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - result = _tmp14_; -#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 234 "Resources.c" -} - - -static void -_vala_array_add5 (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 250 "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 256 "Resources.c" -} - - -GdkPixbuf** -resources_load_from_resource (const gchar* resource_path, - int* result_length1) -{ - GdkPixbuf** result = NULL; - GdkPixbuf* icon = NULL; - GdkPixbuf* _tmp3_; - GdkPixbuf** _tmp9_; - gint _tmp9__length1; - 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 274 "Resources.c" - { - GdkPixbuf* _tmp0_ = NULL; - GdkPixbuf* _tmp1_; - GdkPixbuf* _tmp2_; -#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp1_ = gdk_pixbuf_new_from_resource (resource_path, &_inner_error_); -#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp0_ = _tmp1_; -#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 285 "Resources.c" - goto __catch5_g_error; - } -#line 60 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp2_ = _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 = _tmp2_; -#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _g_object_unref0 (_tmp0_); -#line 298 "Resources.c" - } - goto __finally5; - __catch5_g_error: - { - GError* _error_ = 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" - g_warning ("Resources.vala:62: Couldn't load icon set from %s", resource_path); -#line 59 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _g_error_free0 (_error_); -#line 312 "Resources.c" - } - __finally5: -#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 325 "Resources.c" - } -#line 65 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp3_ = icon; -#line 65 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - if (_tmp3_ != NULL) { -#line 331 "Resources.c" - GdkPixbuf** icon_pixbuf_set = NULL; - GdkPixbuf** _tmp4_; - gint icon_pixbuf_set_length1; - gint _icon_pixbuf_set_size_; - GdkPixbuf** _tmp5_; - gint _tmp5__length1; - GdkPixbuf* _tmp6_; - GdkPixbuf* _tmp7_; - GdkPixbuf** _tmp8_; - gint _tmp8__length1; -#line 66 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp4_ = g_new0 (GdkPixbuf*, 0 + 1); -#line 66 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - icon_pixbuf_set = _tmp4_; -#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" - _tmp5_ = icon_pixbuf_set; -#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp5__length1 = icon_pixbuf_set_length1; -#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp6_ = icon; -#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp7_ = _g_object_ref0 (_tmp6_); -#line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _vala_array_add5 (&icon_pixbuf_set, &icon_pixbuf_set_length1, &_icon_pixbuf_set_size_, _tmp7_); -#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp8_ = icon_pixbuf_set; -#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp8__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 = _tmp8__length1; -#line 368 "Resources.c" - } -#line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - result = _tmp8_; -#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 376 "Resources.c" - } -#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp9_ = NULL; -#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _tmp9__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 = _tmp9__length1; -#line 386 "Resources.c" - } -#line 71 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - result = _tmp9_; -#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 394 "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); -} - - - |