summaryrefslogtreecommitdiff
path: root/src/config/Config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/Config.c')
-rw-r--r--src/config/Config.c161
1 files changed, 83 insertions, 78 deletions
diff --git a/src/config/Config.c b/src/config/Config.c
index 8c5fc92..4d9bba5 100644
--- a/src/config/Config.c
+++ b/src/config/Config.c
@@ -1,4 +1,4 @@
-/* Config.c generated by valac 0.34.7, the Vala compiler
+/* Config.c generated by valac 0.36.6, the Vala compiler
* generated from Config.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -82,6 +82,11 @@ typedef struct _ConfigurationEngineIface ConfigurationEngineIface;
#define TYPE_CONFIGURABLE_PROPERTY (configurable_property_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+enum {
+ CONFIG_FACADE_COLORS_CHANGED_SIGNAL,
+ CONFIG_FACADE_LAST_SIGNAL
+};
+static guint config_facade_signals[CONFIG_FACADE_LAST_SIGNAL] = {0};
struct _Dimensions {
gint width;
@@ -460,7 +465,7 @@ void config_facade_get_border_color (ConfigFacade* self, GdkRGBA* result);
void config_facade_set_bg_color (ConfigFacade* self, GdkRGBA* color);
void configuration_facade_set_bg_color_name (ConfigurationFacade* self, const gchar* color_name);
void config_facade_commit_bg_color (ConfigFacade* self);
-static void config_facade_finalize (GObject* obj);
+static void config_facade_finalize (GObject * obj);
void config_preconfigure (void);
void config_init (GError** error);
void config_terminate (void);
@@ -469,14 +474,14 @@ void config_terminate (void);
static void _config_facade_on_color_name_changed_configuration_facade_bg_color_name_changed (ConfigurationFacade* _sender, gpointer self) {
#line 55 "/home/jens/Source/shotwell/src/config/Config.vala"
config_facade_on_color_name_changed ((ConfigFacade*) self);
-#line 473 "Config.c"
+#line 478 "Config.c"
}
static ConfigFacade* config_facade_construct (GType object_type) {
ConfigFacade * self = NULL;
- GSettingsConfigurationEngine* _tmp0_ = NULL;
- GSettingsConfigurationEngine* _tmp1_ = NULL;
+ GSettingsConfigurationEngine* _tmp0_;
+ GSettingsConfigurationEngine* _tmp1_;
#line 53 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp0_ = gsettings_configuration_engine_new ();
#line 53 "/home/jens/Source/shotwell/src/config/Config.vala"
@@ -489,42 +494,42 @@ static ConfigFacade* config_facade_construct (GType object_type) {
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), "bg-color-name-changed", (GCallback) _config_facade_on_color_name_changed_configuration_facade_bg_color_name_changed, self, 0);
#line 52 "/home/jens/Source/shotwell/src/config/Config.vala"
return self;
-#line 493 "Config.c"
+#line 498 "Config.c"
}
static ConfigFacade* config_facade_new (void) {
#line 52 "/home/jens/Source/shotwell/src/config/Config.vala"
return config_facade_construct (CONFIG_TYPE_FACADE);
-#line 500 "Config.c"
+#line 505 "Config.c"
}
static gpointer _g_object_ref0 (gpointer self) {
#line 62 "/home/jens/Source/shotwell/src/config/Config.vala"
return self ? g_object_ref (self) : NULL;
-#line 507 "Config.c"
+#line 512 "Config.c"
}
ConfigFacade* config_facade_get_instance (void) {
ConfigFacade* result = NULL;
- ConfigFacade* _tmp0_ = NULL;
- ConfigFacade* _tmp2_ = NULL;
- ConfigFacade* _tmp3_ = NULL;
+ ConfigFacade* _tmp0_;
+ ConfigFacade* _tmp2_;
+ ConfigFacade* _tmp3_;
#line 59 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp0_ = config_facade_instance;
#line 59 "/home/jens/Source/shotwell/src/config/Config.vala"
if (_tmp0_ == NULL) {
-#line 520 "Config.c"
- ConfigFacade* _tmp1_ = NULL;
+#line 525 "Config.c"
+ ConfigFacade* _tmp1_;
#line 60 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp1_ = config_facade_new ();
#line 60 "/home/jens/Source/shotwell/src/config/Config.vala"
_g_object_unref0 (config_facade_instance);
#line 60 "/home/jens/Source/shotwell/src/config/Config.vala"
config_facade_instance = _tmp1_;
-#line 528 "Config.c"
+#line 533 "Config.c"
}
#line 62 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp2_ = config_facade_instance;
@@ -534,7 +539,7 @@ ConfigFacade* config_facade_get_instance (void) {
result = _tmp3_;
#line 62 "/home/jens/Source/shotwell/src/config/Config.vala"
return result;
-#line 538 "Config.c"
+#line 543 "Config.c"
}
@@ -542,14 +547,14 @@ static void config_facade_on_color_name_changed (ConfigFacade* self) {
#line 65 "/home/jens/Source/shotwell/src/config/Config.vala"
g_return_if_fail (CONFIG_IS_FACADE (self));
#line 66 "/home/jens/Source/shotwell/src/config/Config.vala"
- g_signal_emit_by_name (self, "colors-changed");
-#line 547 "Config.c"
+ g_signal_emit (self, config_facade_signals[CONFIG_FACADE_COLORS_CHANGED_SIGNAL], 0);
+#line 552 "Config.c"
}
static void config_facade_set_text_colors (ConfigFacade* self, GdkRGBA* bg_color) {
- GdkRGBA _tmp0_ = {0};
- gdouble _tmp1_ = 0.0;
+ GdkRGBA _tmp0_;
+ gdouble _tmp1_;
#line 69 "/home/jens/Source/shotwell/src/config/Config.vala"
g_return_if_fail (CONFIG_IS_FACADE (self));
#line 69 "/home/jens/Source/shotwell/src/config/Config.vala"
@@ -560,11 +565,11 @@ static void config_facade_set_text_colors (ConfigFacade* self, GdkRGBA* bg_color
_tmp1_ = _tmp0_.red;
#line 73 "/home/jens/Source/shotwell/src/config/Config.vala"
if (_tmp1_ > CONFIG_FACADE_BLACK_THRESHOLD) {
-#line 564 "Config.c"
- gchar* _tmp2_ = NULL;
- gchar* _tmp3_ = NULL;
- gchar* _tmp4_ = NULL;
- gchar* _tmp5_ = NULL;
+#line 569 "Config.c"
+ gchar* _tmp2_;
+ gchar* _tmp3_;
+ gchar* _tmp4_;
+ gchar* _tmp5_;
#line 74 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp2_ = g_strdup (CONFIG_FACADE_DARK_SELECTED_COLOR);
#line 74 "/home/jens/Source/shotwell/src/config/Config.vala"
@@ -589,12 +594,12 @@ static void config_facade_set_text_colors (ConfigFacade* self, GdkRGBA* bg_color
_g_free0 (self->priv->border_color);
#line 77 "/home/jens/Source/shotwell/src/config/Config.vala"
self->priv->border_color = _tmp5_;
-#line 593 "Config.c"
+#line 598 "Config.c"
} else {
- gchar* _tmp6_ = NULL;
- gchar* _tmp7_ = NULL;
- gchar* _tmp8_ = NULL;
- gchar* _tmp9_ = NULL;
+ gchar* _tmp6_;
+ gchar* _tmp7_;
+ gchar* _tmp8_;
+ gchar* _tmp9_;
#line 79 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp6_ = g_strdup (CONFIG_FACADE_LIGHT_SELECTED_COLOR);
#line 79 "/home/jens/Source/shotwell/src/config/Config.vala"
@@ -619,16 +624,16 @@ static void config_facade_set_text_colors (ConfigFacade* self, GdkRGBA* bg_color
_g_free0 (self->priv->border_color);
#line 82 "/home/jens/Source/shotwell/src/config/Config.vala"
self->priv->border_color = _tmp9_;
-#line 623 "Config.c"
+#line 628 "Config.c"
}
}
static void config_facade_get_colors (ConfigFacade* self) {
- gchar* _tmp0_ = NULL;
- const gchar* _tmp1_ = NULL;
- gboolean _tmp2_ = FALSE;
- const gchar* _tmp4_ = NULL;
+ gchar* _tmp0_;
+ const gchar* _tmp1_;
+ gboolean _tmp2_;
+ const gchar* _tmp4_;
GdkRGBA _tmp5_ = {0};
#line 86 "/home/jens/Source/shotwell/src/config/Config.vala"
g_return_if_fail (CONFIG_IS_FACADE (self));
@@ -644,15 +649,15 @@ static void config_facade_get_colors (ConfigFacade* self) {
_tmp2_ = is_color_parsable (_tmp1_);
#line 89 "/home/jens/Source/shotwell/src/config/Config.vala"
if (!_tmp2_) {
-#line 648 "Config.c"
- gchar* _tmp3_ = NULL;
+#line 653 "Config.c"
+ gchar* _tmp3_;
#line 90 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp3_ = g_strdup (CONFIG_FACADE_DEFAULT_BG_COLOR);
#line 90 "/home/jens/Source/shotwell/src/config/Config.vala"
_g_free0 (self->priv->bg_color);
#line 90 "/home/jens/Source/shotwell/src/config/Config.vala"
self->priv->bg_color = _tmp3_;
-#line 656 "Config.c"
+#line 661 "Config.c"
}
#line 92 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp4_ = self->priv->bg_color;
@@ -660,14 +665,14 @@ static void config_facade_get_colors (ConfigFacade* self) {
parse_color (_tmp4_, &_tmp5_);
#line 92 "/home/jens/Source/shotwell/src/config/Config.vala"
config_facade_set_text_colors (self, &_tmp5_);
-#line 664 "Config.c"
+#line 669 "Config.c"
}
void config_facade_get_bg_color (ConfigFacade* self, GdkRGBA* result) {
- const gchar* _tmp0_ = NULL;
- gboolean _tmp1_ = FALSE;
- const gchar* _tmp2_ = NULL;
+ const gchar* _tmp0_;
+ gboolean _tmp1_;
+ const gchar* _tmp2_;
GdkRGBA _tmp3_ = {0};
#line 95 "/home/jens/Source/shotwell/src/config/Config.vala"
g_return_if_fail (CONFIG_IS_FACADE (self));
@@ -679,7 +684,7 @@ void config_facade_get_bg_color (ConfigFacade* self, GdkRGBA* result) {
if (_tmp1_) {
#line 97 "/home/jens/Source/shotwell/src/config/Config.vala"
config_facade_get_colors (self);
-#line 683 "Config.c"
+#line 688 "Config.c"
}
#line 99 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp2_ = self->priv->bg_color;
@@ -689,22 +694,22 @@ void config_facade_get_bg_color (ConfigFacade* self, GdkRGBA* result) {
*result = _tmp3_;
#line 99 "/home/jens/Source/shotwell/src/config/Config.vala"
return;
-#line 693 "Config.c"
+#line 698 "Config.c"
}
void config_facade_get_selected_color (ConfigFacade* self, gboolean in_focus, GdkRGBA* result) {
- gboolean _tmp0_ = FALSE;
+ gboolean _tmp0_;
#line 102 "/home/jens/Source/shotwell/src/config/Config.vala"
g_return_if_fail (CONFIG_IS_FACADE (self));
#line 103 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp0_ = in_focus;
#line 103 "/home/jens/Source/shotwell/src/config/Config.vala"
if (_tmp0_) {
-#line 705 "Config.c"
- const gchar* _tmp1_ = NULL;
- gboolean _tmp2_ = FALSE;
- const gchar* _tmp3_ = NULL;
+#line 710 "Config.c"
+ const gchar* _tmp1_;
+ gboolean _tmp2_;
+ const gchar* _tmp3_;
GdkRGBA _tmp4_ = {0};
#line 104 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp1_ = self->priv->selected_color;
@@ -714,7 +719,7 @@ void config_facade_get_selected_color (ConfigFacade* self, gboolean in_focus, Gd
if (_tmp2_) {
#line 105 "/home/jens/Source/shotwell/src/config/Config.vala"
config_facade_get_colors (self);
-#line 718 "Config.c"
+#line 723 "Config.c"
}
#line 107 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp3_ = self->priv->selected_color;
@@ -724,11 +729,11 @@ void config_facade_get_selected_color (ConfigFacade* self, gboolean in_focus, Gd
*result = _tmp4_;
#line 107 "/home/jens/Source/shotwell/src/config/Config.vala"
return;
-#line 728 "Config.c"
+#line 733 "Config.c"
} else {
- const gchar* _tmp5_ = NULL;
- gboolean _tmp6_ = FALSE;
- const gchar* _tmp7_ = NULL;
+ const gchar* _tmp5_;
+ gboolean _tmp6_;
+ const gchar* _tmp7_;
GdkRGBA _tmp8_ = {0};
#line 109 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp5_ = self->priv->unfocused_selected_color;
@@ -738,7 +743,7 @@ void config_facade_get_selected_color (ConfigFacade* self, gboolean in_focus, Gd
if (_tmp6_) {
#line 110 "/home/jens/Source/shotwell/src/config/Config.vala"
config_facade_get_colors (self);
-#line 742 "Config.c"
+#line 747 "Config.c"
}
#line 112 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp7_ = self->priv->unfocused_selected_color;
@@ -748,15 +753,15 @@ void config_facade_get_selected_color (ConfigFacade* self, gboolean in_focus, Gd
*result = _tmp8_;
#line 112 "/home/jens/Source/shotwell/src/config/Config.vala"
return;
-#line 752 "Config.c"
+#line 757 "Config.c"
}
}
void config_facade_get_unselected_color (ConfigFacade* self, GdkRGBA* result) {
- const gchar* _tmp0_ = NULL;
- gboolean _tmp1_ = FALSE;
- const gchar* _tmp2_ = NULL;
+ const gchar* _tmp0_;
+ gboolean _tmp1_;
+ const gchar* _tmp2_;
GdkRGBA _tmp3_ = {0};
#line 116 "/home/jens/Source/shotwell/src/config/Config.vala"
g_return_if_fail (CONFIG_IS_FACADE (self));
@@ -768,7 +773,7 @@ void config_facade_get_unselected_color (ConfigFacade* self, GdkRGBA* result) {
if (_tmp1_) {
#line 118 "/home/jens/Source/shotwell/src/config/Config.vala"
config_facade_get_colors (self);
-#line 772 "Config.c"
+#line 777 "Config.c"
}
#line 120 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp2_ = self->priv->unselected_color;
@@ -778,14 +783,14 @@ void config_facade_get_unselected_color (ConfigFacade* self, GdkRGBA* result) {
*result = _tmp3_;
#line 120 "/home/jens/Source/shotwell/src/config/Config.vala"
return;
-#line 782 "Config.c"
+#line 787 "Config.c"
}
void config_facade_get_border_color (ConfigFacade* self, GdkRGBA* result) {
- const gchar* _tmp0_ = NULL;
- gboolean _tmp1_ = FALSE;
- const gchar* _tmp2_ = NULL;
+ const gchar* _tmp0_;
+ gboolean _tmp1_;
+ const gchar* _tmp2_;
GdkRGBA _tmp3_ = {0};
#line 123 "/home/jens/Source/shotwell/src/config/Config.vala"
g_return_if_fail (CONFIG_IS_FACADE (self));
@@ -797,7 +802,7 @@ void config_facade_get_border_color (ConfigFacade* self, GdkRGBA* result) {
if (_tmp1_) {
#line 125 "/home/jens/Source/shotwell/src/config/Config.vala"
config_facade_get_colors (self);
-#line 801 "Config.c"
+#line 806 "Config.c"
}
#line 127 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp2_ = self->priv->border_color;
@@ -807,17 +812,17 @@ void config_facade_get_border_color (ConfigFacade* self, GdkRGBA* result) {
*result = _tmp3_;
#line 127 "/home/jens/Source/shotwell/src/config/Config.vala"
return;
-#line 811 "Config.c"
+#line 816 "Config.c"
}
void config_facade_set_bg_color (ConfigFacade* self, GdkRGBA* color) {
guint8 col_tmp = 0U;
- GdkRGBA _tmp0_ = {0};
- gdouble _tmp1_ = 0.0;
- gchar* _tmp2_ = NULL;
- const gchar* _tmp3_ = NULL;
- GdkRGBA _tmp4_ = {0};
+ GdkRGBA _tmp0_;
+ gdouble _tmp1_;
+ gchar* _tmp2_;
+ const gchar* _tmp3_;
+ GdkRGBA _tmp4_;
#line 130 "/home/jens/Source/shotwell/src/config/Config.vala"
g_return_if_fail (CONFIG_IS_FACADE (self));
#line 130 "/home/jens/Source/shotwell/src/config/Config.vala"
@@ -842,19 +847,19 @@ void config_facade_set_bg_color (ConfigFacade* self, GdkRGBA* color) {
_tmp4_ = *color;
#line 136 "/home/jens/Source/shotwell/src/config/Config.vala"
config_facade_set_text_colors (self, &_tmp4_);
-#line 846 "Config.c"
+#line 851 "Config.c"
}
void config_facade_commit_bg_color (ConfigFacade* self) {
- const gchar* _tmp0_ = NULL;
+ const gchar* _tmp0_;
#line 139 "/home/jens/Source/shotwell/src/config/Config.vala"
g_return_if_fail (CONFIG_IS_FACADE (self));
#line 140 "/home/jens/Source/shotwell/src/config/Config.vala"
_tmp0_ = self->priv->bg_color;
#line 140 "/home/jens/Source/shotwell/src/config/Config.vala"
CONFIGURATION_FACADE_CLASS (config_facade_parent_class)->set_bg_color_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp0_);
-#line 858 "Config.c"
+#line 863 "Config.c"
}
@@ -866,8 +871,8 @@ static void config_facade_class_init (ConfigFacadeClass * klass) {
#line 18 "/home/jens/Source/shotwell/src/config/Config.vala"
G_OBJECT_CLASS (klass)->finalize = config_facade_finalize;
#line 18 "/home/jens/Source/shotwell/src/config/Config.vala"
- g_signal_new ("colors_changed", CONFIG_TYPE_FACADE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-#line 871 "Config.c"
+ config_facade_signals[CONFIG_FACADE_COLORS_CHANGED_SIGNAL] = g_signal_new ("colors-changed", CONFIG_TYPE_FACADE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 876 "Config.c"
}
@@ -884,11 +889,11 @@ static void config_facade_instance_init (ConfigFacade * self) {
self->priv->unfocused_selected_color = NULL;
#line 46 "/home/jens/Source/shotwell/src/config/Config.vala"
self->priv->border_color = NULL;
-#line 888 "Config.c"
+#line 893 "Config.c"
}
-static void config_facade_finalize (GObject* obj) {
+static void config_facade_finalize (GObject * obj) {
ConfigFacade * self;
#line 18 "/home/jens/Source/shotwell/src/config/Config.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONFIG_TYPE_FACADE, ConfigFacade);
@@ -904,7 +909,7 @@ static void config_facade_finalize (GObject* obj) {
_g_free0 (self->priv->border_color);
#line 18 "/home/jens/Source/shotwell/src/config/Config.vala"
G_OBJECT_CLASS (config_facade_parent_class)->finalize (obj);
-#line 908 "Config.c"
+#line 913 "Config.c"
}