diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
commit | 709e2d6f5652ec90c194a4ec2b530bebc6f952cb (patch) | |
tree | 496b2f3899e1d5728ee9ae76095cc5056c317447 /src/config/Config.c | |
parent | f1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff) | |
parent | 5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff) |
Merge branch 'release/0.28.3-1'0.28.3-1
Diffstat (limited to 'src/config/Config.c')
-rw-r--r-- | src/config/Config.c | 597 |
1 files changed, 334 insertions, 263 deletions
diff --git a/src/config/Config.c b/src/config/Config.c index 4d9bba5..7dd8334 100644 --- a/src/config/Config.c +++ b/src/config/Config.c @@ -1,4 +1,4 @@ -/* Config.c generated by valac 0.36.6, the Vala compiler +/* Config.c generated by valac 0.40.4, the Vala compiler * generated from Config.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -15,6 +15,7 @@ * the preconfigure() method, implement it, and ensure in init() that it's been called. */ + #include <glib.h> #include <glib-object.h> #include <stdlib.h> @@ -60,6 +61,11 @@ typedef struct _Dimensions Dimensions; typedef struct _ConfigFacade ConfigFacade; typedef struct _ConfigFacadeClass ConfigFacadeClass; typedef struct _ConfigFacadePrivate ConfigFacadePrivate; +enum { + CONFIG_FACADE_0_PROPERTY, + CONFIG_FACADE_NUM_PROPERTIES +}; +static GParamSpec* config_facade_properties[CONFIG_FACADE_NUM_PROPERTIES]; #define _g_free0(var) (var = (g_free (var), NULL)) #define TYPE_GSETTINGS_CONFIGURATION_ENGINE (gsettings_configuration_engine_get_type ()) @@ -84,9 +90,9 @@ typedef struct _ConfigurationEngineIface ConfigurationEngineIface; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) enum { CONFIG_FACADE_COLORS_CHANGED_SIGNAL, - CONFIG_FACADE_LAST_SIGNAL + CONFIG_FACADE_NUM_SIGNALS }; -static guint config_facade_signals[CONFIG_FACADE_LAST_SIGNAL] = {0}; +static guint config_facade_signals[CONFIG_FACADE_NUM_SIGNALS] = {0}; struct _Dimensions { gint width; @@ -147,6 +153,10 @@ struct _ConfigurationFacadeClass { void (*set_auto_import_from_library) (ConfigurationFacade* self, gboolean auto_import); gchar* (*get_bg_color_name) (ConfigurationFacade* self); void (*set_bg_color_name) (ConfigurationFacade* self, const gchar* color_name); + gchar* (*get_transparent_background_type) (ConfigurationFacade* self); + void (*set_transparent_background_type) (ConfigurationFacade* self, const gchar* type); + gchar* (*get_transparent_background_color) (ConfigurationFacade* self); + void (*set_transparent_background_color) (ConfigurationFacade* self, const gchar* color_name); gboolean (*get_commit_metadata_to_masters) (ConfigurationFacade* self); void (*set_commit_metadata_to_masters) (ConfigurationFacade* self, gboolean commit_metadata); gchar* (*get_desktop_background) (ConfigurationFacade* self); @@ -298,6 +308,8 @@ struct _ConfigFacadePrivate { typedef enum { CONFIGURABLE_PROPERTY_AUTO_IMPORT_FROM_LIBRARY = 0, CONFIGURABLE_PROPERTY_BG_COLOR_NAME, + CONFIGURABLE_PROPERTY_TRANSPARENT_BACKGROUND_TYPE, + CONFIGURABLE_PROPERTY_TRANSPARENT_BACKGROUND_COLOR, CONFIGURABLE_PROPERTY_COMMIT_METADATA_TO_MASTERS, CONFIGURABLE_PROPERTY_DESKTOP_BACKGROUND_FILE, CONFIGURABLE_PROPERTY_DESKTOP_BACKGROUND_MODE, @@ -416,15 +428,6 @@ GType raw_developer_get_type (void) G_GNUC_CONST; GType fuzzy_property_state_get_type (void) G_GNUC_CONST; GType config_facade_get_type (void) G_GNUC_CONST; #define CONFIG_FACADE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CONFIG_TYPE_FACADE, ConfigFacadePrivate)) -enum { - CONFIG_FACADE_DUMMY_PROPERTY -}; -#define CONFIG_FACADE_SLIDESHOW_DELAY_MAX 30.0 -#define CONFIG_FACADE_SLIDESHOW_DELAY_MIN 1.0 -#define CONFIG_FACADE_SLIDESHOW_DELAY_DEFAULT 3.0 -#define CONFIG_FACADE_SLIDESHOW_TRANSITION_DELAY_MAX 1.0 -#define CONFIG_FACADE_SLIDESHOW_TRANSITION_DELAY_MIN 0.1 -#define CONFIG_FACADE_SLIDESHOW_TRANSITION_DELAY_DEFAULT 0.3 #define CONFIG_FACADE_WIDTH_DEFAULT 1024 #define CONFIG_FACADE_HEIGHT_DEFAULT 768 #define CONFIG_FACADE_SIDEBAR_MIN_POSITION 180 @@ -448,22 +451,37 @@ GType gsettings_configuration_engine_get_type (void) G_GNUC_CONST; GType configurable_property_get_type (void) G_GNUC_CONST; GQuark configuration_error_quark (void); GType configuration_engine_get_type (void) G_GNUC_CONST; -ConfigurationFacade* configuration_facade_construct (GType object_type, ConfigurationEngine* engine); +ConfigurationFacade* configuration_facade_construct (GType object_type, + ConfigurationEngine* engine); static void config_facade_on_color_name_changed (ConfigFacade* self); -static void _config_facade_on_color_name_changed_configuration_facade_bg_color_name_changed (ConfigurationFacade* _sender, gpointer self); +static void _config_facade_on_color_name_changed_configuration_facade_bg_color_name_changed (ConfigurationFacade* _sender, + gpointer self); +static void _config_facade_on_color_name_changed_configuration_facade_transparent_background_type_changed (ConfigurationFacade* _sender, + gpointer self); +static void _config_facade_on_color_name_changed_configuration_facade_transparent_background_color_changed (ConfigurationFacade* _sender, + gpointer self); ConfigFacade* config_facade_get_instance (void); -static void config_facade_set_text_colors (ConfigFacade* self, GdkRGBA* bg_color); +static void config_facade_set_text_colors (ConfigFacade* self, + GdkRGBA* bg_color); static void config_facade_get_colors (ConfigFacade* self); gchar* configuration_facade_get_bg_color_name (ConfigurationFacade* self); gboolean is_color_parsable (const gchar* spec); -void parse_color (const gchar* spec, GdkRGBA* result); -void config_facade_get_bg_color (ConfigFacade* self, GdkRGBA* result); +void parse_color (const gchar* spec, + GdkRGBA* result); +void config_facade_get_bg_color (ConfigFacade* self, + GdkRGBA* result); gboolean is_string_empty (const gchar* s); -void config_facade_get_selected_color (ConfigFacade* self, gboolean in_focus, GdkRGBA* result); -void config_facade_get_unselected_color (ConfigFacade* self, GdkRGBA* result); -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_get_selected_color (ConfigFacade* self, + gboolean in_focus, + GdkRGBA* result); +void config_facade_get_unselected_color (ConfigFacade* self, + GdkRGBA* result); +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); void config_preconfigure (void); @@ -471,399 +489,440 @@ void config_init (GError** error); 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" +static void +_config_facade_on_color_name_changed_configuration_facade_bg_color_name_changed (ConfigurationFacade* _sender, + gpointer self) +{ +#line 49 "/home/jens/Source/shotwell/src/config/Config.vala" + config_facade_on_color_name_changed ((ConfigFacade*) self); +#line 499 "Config.c" +} + + +static void +_config_facade_on_color_name_changed_configuration_facade_transparent_background_type_changed (ConfigurationFacade* _sender, + gpointer self) +{ +#line 50 "/home/jens/Source/shotwell/src/config/Config.vala" + config_facade_on_color_name_changed ((ConfigFacade*) self); +#line 509 "Config.c" +} + + +static void +_config_facade_on_color_name_changed_configuration_facade_transparent_background_color_changed (ConfigurationFacade* _sender, + gpointer self) +{ +#line 51 "/home/jens/Source/shotwell/src/config/Config.vala" config_facade_on_color_name_changed ((ConfigFacade*) self); -#line 478 "Config.c" +#line 519 "Config.c" } -static ConfigFacade* config_facade_construct (GType object_type) { +static ConfigFacade* +config_facade_construct (GType object_type) +{ ConfigFacade * self = NULL; GSettingsConfigurationEngine* _tmp0_; GSettingsConfigurationEngine* _tmp1_; -#line 53 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 47 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp0_ = gsettings_configuration_engine_new (); -#line 53 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 47 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp1_ = _tmp0_; -#line 53 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 47 "/home/jens/Source/shotwell/src/config/Config.vala" self = (ConfigFacade*) configuration_facade_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_ENGINE, ConfigurationEngine)); -#line 53 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 47 "/home/jens/Source/shotwell/src/config/Config.vala" _g_object_unref0 (_tmp1_); -#line 55 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 49 "/home/jens/Source/shotwell/src/config/Config.vala" 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" +#line 50 "/home/jens/Source/shotwell/src/config/Config.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), "transparent-background-type-changed", (GCallback) _config_facade_on_color_name_changed_configuration_facade_transparent_background_type_changed, self, 0); +#line 51 "/home/jens/Source/shotwell/src/config/Config.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), "transparent-background-color-changed", (GCallback) _config_facade_on_color_name_changed_configuration_facade_transparent_background_color_changed, self, 0); +#line 46 "/home/jens/Source/shotwell/src/config/Config.vala" return self; -#line 498 "Config.c" +#line 545 "Config.c" } -static ConfigFacade* config_facade_new (void) { -#line 52 "/home/jens/Source/shotwell/src/config/Config.vala" +static ConfigFacade* +config_facade_new (void) +{ +#line 46 "/home/jens/Source/shotwell/src/config/Config.vala" return config_facade_construct (CONFIG_TYPE_FACADE); -#line 505 "Config.c" +#line 554 "Config.c" } -static gpointer _g_object_ref0 (gpointer self) { -#line 62 "/home/jens/Source/shotwell/src/config/Config.vala" +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 58 "/home/jens/Source/shotwell/src/config/Config.vala" return self ? g_object_ref (self) : NULL; -#line 512 "Config.c" +#line 563 "Config.c" } -ConfigFacade* config_facade_get_instance (void) { +ConfigFacade* +config_facade_get_instance (void) +{ ConfigFacade* result = NULL; ConfigFacade* _tmp0_; ConfigFacade* _tmp2_; ConfigFacade* _tmp3_; -#line 59 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 55 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp0_ = config_facade_instance; -#line 59 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 55 "/home/jens/Source/shotwell/src/config/Config.vala" if (_tmp0_ == NULL) { -#line 525 "Config.c" +#line 578 "Config.c" ConfigFacade* _tmp1_; -#line 60 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 56 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp1_ = config_facade_new (); -#line 60 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 56 "/home/jens/Source/shotwell/src/config/Config.vala" _g_object_unref0 (config_facade_instance); -#line 60 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 56 "/home/jens/Source/shotwell/src/config/Config.vala" config_facade_instance = _tmp1_; -#line 533 "Config.c" +#line 586 "Config.c" } -#line 62 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 58 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp2_ = config_facade_instance; -#line 62 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 58 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp3_ = _g_object_ref0 (_tmp2_); -#line 62 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 58 "/home/jens/Source/shotwell/src/config/Config.vala" result = _tmp3_; -#line 62 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 58 "/home/jens/Source/shotwell/src/config/Config.vala" return result; -#line 543 "Config.c" +#line 596 "Config.c" } -static void config_facade_on_color_name_changed (ConfigFacade* self) { -#line 65 "/home/jens/Source/shotwell/src/config/Config.vala" +static void +config_facade_on_color_name_changed (ConfigFacade* self) +{ +#line 61 "/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" +#line 62 "/home/jens/Source/shotwell/src/config/Config.vala" g_signal_emit (self, config_facade_signals[CONFIG_FACADE_COLORS_CHANGED_SIGNAL], 0); -#line 552 "Config.c" +#line 607 "Config.c" } -static void config_facade_set_text_colors (ConfigFacade* self, GdkRGBA* bg_color) { +static void +config_facade_set_text_colors (ConfigFacade* self, + GdkRGBA* bg_color) +{ GdkRGBA _tmp0_; gdouble _tmp1_; -#line 69 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 65 "/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" +#line 65 "/home/jens/Source/shotwell/src/config/Config.vala" g_return_if_fail (bg_color != NULL); -#line 73 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 69 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp0_ = *bg_color; -#line 73 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 69 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp1_ = _tmp0_.red; -#line 73 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 69 "/home/jens/Source/shotwell/src/config/Config.vala" if (_tmp1_ > CONFIG_FACADE_BLACK_THRESHOLD) { -#line 569 "Config.c" +#line 627 "Config.c" gchar* _tmp2_; gchar* _tmp3_; gchar* _tmp4_; gchar* _tmp5_; -#line 74 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 70 "/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" +#line 70 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->selected_color); -#line 74 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 70 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->selected_color = _tmp2_; -#line 75 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 71 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp3_ = g_strdup (CONFIG_FACADE_DARK_UNSELECTED_COLOR); -#line 75 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 71 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->unselected_color); -#line 75 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 71 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->unselected_color = _tmp3_; -#line 76 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 72 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp4_ = g_strdup (CONFIG_FACADE_DARK_UNFOCUSED_SELECTED_COLOR); -#line 76 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 72 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->unfocused_selected_color); -#line 76 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 72 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->unfocused_selected_color = _tmp4_; -#line 77 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 73 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp5_ = g_strdup (CONFIG_FACADE_DARK_BORDER_COLOR); -#line 77 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 73 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->border_color); -#line 77 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 73 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->border_color = _tmp5_; -#line 598 "Config.c" +#line 656 "Config.c" } else { gchar* _tmp6_; gchar* _tmp7_; gchar* _tmp8_; gchar* _tmp9_; -#line 79 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 75 "/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" +#line 75 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->selected_color); -#line 79 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 75 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->selected_color = _tmp6_; -#line 80 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 76 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp7_ = g_strdup (CONFIG_FACADE_LIGHT_UNSELECTED_COLOR); -#line 80 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 76 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->unselected_color); -#line 80 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 76 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->unselected_color = _tmp7_; -#line 81 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 77 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp8_ = g_strdup (CONFIG_FACADE_LIGHT_UNFOCUSED_SELECTED_COLOR); -#line 81 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 77 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->unfocused_selected_color); -#line 81 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 77 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->unfocused_selected_color = _tmp8_; -#line 82 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 78 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp9_ = g_strdup (CONFIG_FACADE_LIGHT_BORDER_COLOR); -#line 82 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 78 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->border_color); -#line 82 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 78 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->border_color = _tmp9_; -#line 628 "Config.c" +#line 686 "Config.c" } } -static void config_facade_get_colors (ConfigFacade* self) { +static void +config_facade_get_colors (ConfigFacade* self) +{ gchar* _tmp0_; const gchar* _tmp1_; - gboolean _tmp2_; - const gchar* _tmp4_; - GdkRGBA _tmp5_ = {0}; -#line 86 "/home/jens/Source/shotwell/src/config/Config.vala" + const gchar* _tmp3_; + GdkRGBA _tmp4_ = {0}; +#line 82 "/home/jens/Source/shotwell/src/config/Config.vala" g_return_if_fail (CONFIG_IS_FACADE (self)); -#line 87 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 83 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp0_ = CONFIGURATION_FACADE_CLASS (config_facade_parent_class)->get_bg_color_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); -#line 87 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 83 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->bg_color); -#line 87 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 83 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->bg_color = _tmp0_; -#line 89 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 85 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp1_ = self->priv->bg_color; -#line 89 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp2_ = is_color_parsable (_tmp1_); -#line 89 "/home/jens/Source/shotwell/src/config/Config.vala" - if (!_tmp2_) { -#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" +#line 85 "/home/jens/Source/shotwell/src/config/Config.vala" + if (!is_color_parsable (_tmp1_)) { +#line 710 "Config.c" + gchar* _tmp2_; +#line 86 "/home/jens/Source/shotwell/src/config/Config.vala" + _tmp2_ = g_strdup (CONFIG_FACADE_DEFAULT_BG_COLOR); +#line 86 "/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 661 "Config.c" +#line 86 "/home/jens/Source/shotwell/src/config/Config.vala" + self->priv->bg_color = _tmp2_; +#line 718 "Config.c" } -#line 92 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp4_ = self->priv->bg_color; -#line 92 "/home/jens/Source/shotwell/src/config/Config.vala" - parse_color (_tmp4_, &_tmp5_); -#line 92 "/home/jens/Source/shotwell/src/config/Config.vala" - config_facade_set_text_colors (self, &_tmp5_); -#line 669 "Config.c" +#line 88 "/home/jens/Source/shotwell/src/config/Config.vala" + _tmp3_ = self->priv->bg_color; +#line 88 "/home/jens/Source/shotwell/src/config/Config.vala" + parse_color (_tmp3_, &_tmp4_); +#line 88 "/home/jens/Source/shotwell/src/config/Config.vala" + config_facade_set_text_colors (self, &_tmp4_); +#line 726 "Config.c" } -void config_facade_get_bg_color (ConfigFacade* self, GdkRGBA* result) { +void +config_facade_get_bg_color (ConfigFacade* self, + GdkRGBA* result) +{ const gchar* _tmp0_; - gboolean _tmp1_; - const gchar* _tmp2_; - GdkRGBA _tmp3_ = {0}; -#line 95 "/home/jens/Source/shotwell/src/config/Config.vala" + const gchar* _tmp1_; + GdkRGBA _tmp2_ = {0}; +#line 91 "/home/jens/Source/shotwell/src/config/Config.vala" g_return_if_fail (CONFIG_IS_FACADE (self)); -#line 96 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 92 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp0_ = self->priv->bg_color; -#line 96 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp1_ = is_string_empty (_tmp0_); -#line 96 "/home/jens/Source/shotwell/src/config/Config.vala" - if (_tmp1_) { -#line 97 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 92 "/home/jens/Source/shotwell/src/config/Config.vala" + if (is_string_empty (_tmp0_)) { +#line 93 "/home/jens/Source/shotwell/src/config/Config.vala" config_facade_get_colors (self); -#line 688 "Config.c" +#line 745 "Config.c" } -#line 99 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp2_ = self->priv->bg_color; -#line 99 "/home/jens/Source/shotwell/src/config/Config.vala" - parse_color (_tmp2_, &_tmp3_); -#line 99 "/home/jens/Source/shotwell/src/config/Config.vala" - *result = _tmp3_; -#line 99 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 95 "/home/jens/Source/shotwell/src/config/Config.vala" + _tmp1_ = self->priv->bg_color; +#line 95 "/home/jens/Source/shotwell/src/config/Config.vala" + parse_color (_tmp1_, &_tmp2_); +#line 95 "/home/jens/Source/shotwell/src/config/Config.vala" + *result = _tmp2_; +#line 95 "/home/jens/Source/shotwell/src/config/Config.vala" return; -#line 698 "Config.c" +#line 755 "Config.c" } -void config_facade_get_selected_color (ConfigFacade* self, gboolean in_focus, GdkRGBA* result) { - gboolean _tmp0_; -#line 102 "/home/jens/Source/shotwell/src/config/Config.vala" +void +config_facade_get_selected_color (ConfigFacade* self, + gboolean in_focus, + GdkRGBA* result) +{ +#line 98 "/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 710 "Config.c" +#line 99 "/home/jens/Source/shotwell/src/config/Config.vala" + if (in_focus) { +#line 768 "Config.c" + const gchar* _tmp0_; 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; -#line 104 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp2_ = is_string_empty (_tmp1_); -#line 104 "/home/jens/Source/shotwell/src/config/Config.vala" - if (_tmp2_) { -#line 105 "/home/jens/Source/shotwell/src/config/Config.vala" + GdkRGBA _tmp2_ = {0}; +#line 100 "/home/jens/Source/shotwell/src/config/Config.vala" + _tmp0_ = self->priv->selected_color; +#line 100 "/home/jens/Source/shotwell/src/config/Config.vala" + if (is_string_empty (_tmp0_)) { +#line 101 "/home/jens/Source/shotwell/src/config/Config.vala" config_facade_get_colors (self); -#line 723 "Config.c" +#line 778 "Config.c" } -#line 107 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp3_ = self->priv->selected_color; -#line 107 "/home/jens/Source/shotwell/src/config/Config.vala" - parse_color (_tmp3_, &_tmp4_); -#line 107 "/home/jens/Source/shotwell/src/config/Config.vala" - *result = _tmp4_; -#line 107 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 103 "/home/jens/Source/shotwell/src/config/Config.vala" + _tmp1_ = self->priv->selected_color; +#line 103 "/home/jens/Source/shotwell/src/config/Config.vala" + parse_color (_tmp1_, &_tmp2_); +#line 103 "/home/jens/Source/shotwell/src/config/Config.vala" + *result = _tmp2_; +#line 103 "/home/jens/Source/shotwell/src/config/Config.vala" return; -#line 733 "Config.c" +#line 788 "Config.c" } else { - 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; -#line 109 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp6_ = is_string_empty (_tmp5_); -#line 109 "/home/jens/Source/shotwell/src/config/Config.vala" - if (_tmp6_) { -#line 110 "/home/jens/Source/shotwell/src/config/Config.vala" + const gchar* _tmp3_; + const gchar* _tmp4_; + GdkRGBA _tmp5_ = {0}; +#line 105 "/home/jens/Source/shotwell/src/config/Config.vala" + _tmp3_ = self->priv->unfocused_selected_color; +#line 105 "/home/jens/Source/shotwell/src/config/Config.vala" + if (is_string_empty (_tmp3_)) { +#line 106 "/home/jens/Source/shotwell/src/config/Config.vala" config_facade_get_colors (self); -#line 747 "Config.c" +#line 799 "Config.c" } -#line 112 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp7_ = self->priv->unfocused_selected_color; -#line 112 "/home/jens/Source/shotwell/src/config/Config.vala" - parse_color (_tmp7_, &_tmp8_); -#line 112 "/home/jens/Source/shotwell/src/config/Config.vala" - *result = _tmp8_; -#line 112 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 108 "/home/jens/Source/shotwell/src/config/Config.vala" + _tmp4_ = self->priv->unfocused_selected_color; +#line 108 "/home/jens/Source/shotwell/src/config/Config.vala" + parse_color (_tmp4_, &_tmp5_); +#line 108 "/home/jens/Source/shotwell/src/config/Config.vala" + *result = _tmp5_; +#line 108 "/home/jens/Source/shotwell/src/config/Config.vala" return; -#line 757 "Config.c" +#line 809 "Config.c" } } -void config_facade_get_unselected_color (ConfigFacade* self, GdkRGBA* result) { +void +config_facade_get_unselected_color (ConfigFacade* self, + GdkRGBA* result) +{ const gchar* _tmp0_; - gboolean _tmp1_; - const gchar* _tmp2_; - GdkRGBA _tmp3_ = {0}; -#line 116 "/home/jens/Source/shotwell/src/config/Config.vala" + const gchar* _tmp1_; + GdkRGBA _tmp2_ = {0}; +#line 112 "/home/jens/Source/shotwell/src/config/Config.vala" g_return_if_fail (CONFIG_IS_FACADE (self)); -#line 117 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 113 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp0_ = self->priv->unselected_color; -#line 117 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp1_ = is_string_empty (_tmp0_); -#line 117 "/home/jens/Source/shotwell/src/config/Config.vala" - if (_tmp1_) { -#line 118 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 113 "/home/jens/Source/shotwell/src/config/Config.vala" + if (is_string_empty (_tmp0_)) { +#line 114 "/home/jens/Source/shotwell/src/config/Config.vala" config_facade_get_colors (self); -#line 777 "Config.c" +#line 829 "Config.c" } -#line 120 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp2_ = self->priv->unselected_color; -#line 120 "/home/jens/Source/shotwell/src/config/Config.vala" - parse_color (_tmp2_, &_tmp3_); -#line 120 "/home/jens/Source/shotwell/src/config/Config.vala" - *result = _tmp3_; -#line 120 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 116 "/home/jens/Source/shotwell/src/config/Config.vala" + _tmp1_ = self->priv->unselected_color; +#line 116 "/home/jens/Source/shotwell/src/config/Config.vala" + parse_color (_tmp1_, &_tmp2_); +#line 116 "/home/jens/Source/shotwell/src/config/Config.vala" + *result = _tmp2_; +#line 116 "/home/jens/Source/shotwell/src/config/Config.vala" return; -#line 787 "Config.c" +#line 839 "Config.c" } -void config_facade_get_border_color (ConfigFacade* self, GdkRGBA* result) { +void +config_facade_get_border_color (ConfigFacade* self, + GdkRGBA* result) +{ const gchar* _tmp0_; - gboolean _tmp1_; - const gchar* _tmp2_; - GdkRGBA _tmp3_ = {0}; -#line 123 "/home/jens/Source/shotwell/src/config/Config.vala" + const gchar* _tmp1_; + GdkRGBA _tmp2_ = {0}; +#line 119 "/home/jens/Source/shotwell/src/config/Config.vala" g_return_if_fail (CONFIG_IS_FACADE (self)); -#line 124 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 120 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp0_ = self->priv->border_color; -#line 124 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp1_ = is_string_empty (_tmp0_); -#line 124 "/home/jens/Source/shotwell/src/config/Config.vala" - if (_tmp1_) { -#line 125 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 120 "/home/jens/Source/shotwell/src/config/Config.vala" + if (is_string_empty (_tmp0_)) { +#line 121 "/home/jens/Source/shotwell/src/config/Config.vala" config_facade_get_colors (self); -#line 806 "Config.c" +#line 858 "Config.c" } -#line 127 "/home/jens/Source/shotwell/src/config/Config.vala" - _tmp2_ = self->priv->border_color; -#line 127 "/home/jens/Source/shotwell/src/config/Config.vala" - parse_color (_tmp2_, &_tmp3_); -#line 127 "/home/jens/Source/shotwell/src/config/Config.vala" - *result = _tmp3_; -#line 127 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 123 "/home/jens/Source/shotwell/src/config/Config.vala" + _tmp1_ = self->priv->border_color; +#line 123 "/home/jens/Source/shotwell/src/config/Config.vala" + parse_color (_tmp1_, &_tmp2_); +#line 123 "/home/jens/Source/shotwell/src/config/Config.vala" + *result = _tmp2_; +#line 123 "/home/jens/Source/shotwell/src/config/Config.vala" return; -#line 816 "Config.c" +#line 868 "Config.c" } -void config_facade_set_bg_color (ConfigFacade* self, GdkRGBA* color) { +void +config_facade_set_bg_color (ConfigFacade* self, + GdkRGBA* color) +{ guint8 col_tmp = 0U; GdkRGBA _tmp0_; gdouble _tmp1_; gchar* _tmp2_; const gchar* _tmp3_; GdkRGBA _tmp4_; -#line 130 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 126 "/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" +#line 126 "/home/jens/Source/shotwell/src/config/Config.vala" g_return_if_fail (color != NULL); -#line 131 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 127 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp0_ = *color; -#line 131 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 127 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp1_ = _tmp0_.red; -#line 131 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 127 "/home/jens/Source/shotwell/src/config/Config.vala" col_tmp = (guint8) (_tmp1_ * 255.0); -#line 133 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 129 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp2_ = g_strdup_printf ("#%02X%02X%02X", (guint) col_tmp, (guint) col_tmp, (guint) col_tmp); -#line 133 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 129 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->bg_color); -#line 133 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 129 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->bg_color = _tmp2_; -#line 134 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 130 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp3_ = self->priv->bg_color; -#line 134 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 130 "/home/jens/Source/shotwell/src/config/Config.vala" configuration_facade_set_bg_color_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp3_); -#line 136 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 132 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp4_ = *color; -#line 136 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 132 "/home/jens/Source/shotwell/src/config/Config.vala" config_facade_set_text_colors (self, &_tmp4_); -#line 851 "Config.c" +#line 906 "Config.c" } -void config_facade_commit_bg_color (ConfigFacade* self) { +void +config_facade_commit_bg_color (ConfigFacade* self) +{ const gchar* _tmp0_; -#line 139 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 135 "/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" +#line 136 "/home/jens/Source/shotwell/src/config/Config.vala" _tmp0_ = self->priv->bg_color; -#line 140 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 136 "/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 863 "Config.c" +#line 920 "Config.c" } -static void config_facade_class_init (ConfigFacadeClass * klass) { +static void +config_facade_class_init (ConfigFacadeClass * klass) +{ #line 18 "/home/jens/Source/shotwell/src/config/Config.vala" config_facade_parent_class = g_type_class_peek_parent (klass); #line 18 "/home/jens/Source/shotwell/src/config/Config.vala" @@ -872,48 +931,54 @@ static void config_facade_class_init (ConfigFacadeClass * klass) { G_OBJECT_CLASS (klass)->finalize = config_facade_finalize; #line 18 "/home/jens/Source/shotwell/src/config/Config.vala" 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" +#line 935 "Config.c" } -static void config_facade_instance_init (ConfigFacade * self) { +static void +config_facade_instance_init (ConfigFacade * self) +{ #line 18 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv = CONFIG_FACADE_GET_PRIVATE (self); -#line 42 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 36 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->bg_color = NULL; -#line 43 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 37 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->selected_color = NULL; -#line 44 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 38 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->unselected_color = NULL; -#line 45 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 39 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->unfocused_selected_color = NULL; -#line 46 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 40 "/home/jens/Source/shotwell/src/config/Config.vala" self->priv->border_color = NULL; -#line 893 "Config.c" +#line 954 "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); -#line 42 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 36 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->bg_color); -#line 43 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 37 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->selected_color); -#line 44 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 38 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->unselected_color); -#line 45 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 39 "/home/jens/Source/shotwell/src/config/Config.vala" _g_free0 (self->priv->unfocused_selected_color); -#line 46 "/home/jens/Source/shotwell/src/config/Config.vala" +#line 40 "/home/jens/Source/shotwell/src/config/Config.vala" _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 913 "Config.c" +#line 976 "Config.c" } -GType config_facade_get_type (void) { +GType +config_facade_get_type (void) +{ static volatile gsize config_facade_type_id__volatile = 0; if (g_once_init_enter (&config_facade_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (ConfigFacadeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) config_facade_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConfigFacade), 0, (GInstanceInitFunc) config_facade_instance_init, NULL }; @@ -925,15 +990,21 @@ GType config_facade_get_type (void) { } -void config_preconfigure (void) { +void +config_preconfigure (void) +{ } -void config_init (GError** error) { +void +config_init (GError** error) +{ } -void config_terminate (void) { +void +config_terminate (void) +{ } |