From ab841afa5cb39058d9ab2cebb67cfe6369443f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 25 Jun 2018 20:55:59 +0200 Subject: New upstream version 0.28.3 --- src/dialogs/EntryMultiCompletion.c | 1087 +++++++++++++++++------------------- 1 file changed, 518 insertions(+), 569 deletions(-) (limited to 'src/dialogs/EntryMultiCompletion.c') diff --git a/src/dialogs/EntryMultiCompletion.c b/src/dialogs/EntryMultiCompletion.c index 9dd3cd1..4006725 100644 --- a/src/dialogs/EntryMultiCompletion.c +++ b/src/dialogs/EntryMultiCompletion.c @@ -1,4 +1,4 @@ -/* EntryMultiCompletion.c generated by valac 0.36.6, the Vala compiler +/* EntryMultiCompletion.c generated by valac 0.40.4, the Vala compiler * generated from EntryMultiCompletion.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -10,6 +10,7 @@ /* Entry completion for values separated by separators (e.g. comma in the case of tags)*/ /* Partly inspired by the class of the same name in gtkmm-utils by Marko Anastasov*/ + #include #include #include @@ -28,6 +29,11 @@ typedef struct _EntryMultiCompletion EntryMultiCompletion; typedef struct _EntryMultiCompletionClass EntryMultiCompletionClass; typedef struct _EntryMultiCompletionPrivate EntryMultiCompletionPrivate; +enum { + ENTRY_MULTI_COMPLETION_0_PROPERTY, + ENTRY_MULTI_COMPLETION_NUM_PROPERTIES +}; +static GParamSpec* entry_multi_completion_properties[ENTRY_MULTI_COMPLETION_NUM_PROPERTIES]; #define _g_free0(var) (var = (g_free (var), NULL)) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); @@ -53,110 +59,124 @@ static gpointer entry_multi_completion_parent_class = NULL; GType entry_multi_completion_get_type (void) G_GNUC_CONST; #define ENTRY_MULTI_COMPLETION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ENTRY_MULTI_COMPLETION, EntryMultiCompletionPrivate)) -enum { - ENTRY_MULTI_COMPLETION_DUMMY_PROPERTY -}; -EntryMultiCompletion* entry_multi_completion_new (GeeCollection* completion_list, const gchar* delimiter); -EntryMultiCompletion* entry_multi_completion_construct (GType object_type, GeeCollection* completion_list, const gchar* delimiter); +EntryMultiCompletion* entry_multi_completion_new (GeeCollection* completion_list, + const gchar* delimiter); +EntryMultiCompletion* entry_multi_completion_construct (GType object_type, + GeeCollection* completion_list, + const gchar* delimiter); static GtkListStore* entry_multi_completion_create_completion_store (GeeCollection* completion_list); -static gboolean entry_multi_completion_match_func (EntryMultiCompletion* self, GtkEntryCompletion* completion, const gchar* key, GtkTreeIter* iter); -static gboolean _entry_multi_completion_match_func_gtk_entry_completion_match_func (GtkEntryCompletion* completion, const gchar* key, GtkTreeIter* iter, gpointer self); -static gchar* entry_multi_completion_get_last_part (const gchar* s, const gchar* delimiter); -static gboolean entry_multi_completion_real_match_selected (GtkEntryCompletion* base, GtkTreeModel* model, GtkTreeIter* iter); +static gboolean entry_multi_completion_match_func (EntryMultiCompletion* self, + GtkEntryCompletion* completion, + const gchar* key, + GtkTreeIter* iter); +static gboolean _entry_multi_completion_match_func_gtk_entry_completion_match_func (GtkEntryCompletion* completion, + const gchar* key, + GtkTreeIter* iter, + gpointer self); +static gchar* entry_multi_completion_get_last_part (const gchar* s, + const gchar* delimiter); +static gboolean entry_multi_completion_real_match_selected (GtkEntryCompletion* base, + GtkTreeModel* model, + GtkTreeIter* iter); static void entry_multi_completion_finalize (GObject * obj); -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 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 gint _vala_array_length (gpointer array); -static gboolean _entry_multi_completion_match_func_gtk_entry_completion_match_func (GtkEntryCompletion* completion, const gchar* key, GtkTreeIter* iter, gpointer self) { +static gboolean +_entry_multi_completion_match_func_gtk_entry_completion_match_func (GtkEntryCompletion* completion, + const gchar* key, + GtkTreeIter* iter, + gpointer self) +{ gboolean result; result = entry_multi_completion_match_func ((EntryMultiCompletion*) self, completion, key, iter); #line 19 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return result; -#line 78 "EntryMultiCompletion.c" +#line 102 "EntryMultiCompletion.c" } -EntryMultiCompletion* entry_multi_completion_construct (GType object_type, GeeCollection* completion_list, const gchar* delimiter) { +EntryMultiCompletion* +entry_multi_completion_construct (GType object_type, + GeeCollection* completion_list, + const gchar* delimiter) +{ EntryMultiCompletion * self = NULL; gboolean _tmp0_ = FALSE; - const gchar* _tmp1_; - const gchar* _tmp5_; - gchar* _tmp6_; - GeeCollection* _tmp7_; - GtkListStore* _tmp8_; - GtkListStore* _tmp9_; + gchar* _tmp3_; + GtkListStore* _tmp4_; + GtkListStore* _tmp5_; #line 13 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" g_return_val_if_fail (GEE_IS_COLLECTION (completion_list), NULL); #line 13 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" self = (EntryMultiCompletion*) g_object_new (object_type, NULL); #line 14 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp1_ = delimiter; -#line 14 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (_tmp1_ == NULL) { + if (delimiter == NULL) { #line 14 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _tmp0_ = TRUE; -#line 101 "EntryMultiCompletion.c" +#line 124 "EntryMultiCompletion.c" } else { - const gchar* _tmp2_; - gint _tmp3_; - gint _tmp4_; -#line 14 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp2_ = delimiter; + gint _tmp1_; + gint _tmp2_; #line 14 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp3_ = strlen (_tmp2_); + _tmp1_ = strlen (delimiter); #line 14 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp4_ = _tmp3_; + _tmp2_ = _tmp1_; #line 14 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp0_ = _tmp4_ == 1; -#line 114 "EntryMultiCompletion.c" + _tmp0_ = _tmp2_ == 1; +#line 134 "EntryMultiCompletion.c" } #line 14 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _vala_assert (_tmp0_, "delimiter == null || delimiter.length == 1"); #line 15 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp5_ = delimiter; -#line 15 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp6_ = g_strdup (_tmp5_); + _tmp3_ = g_strdup (delimiter); #line 15 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _g_free0 (self->priv->delimiter); #line 15 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - self->priv->delimiter = _tmp6_; + self->priv->delimiter = _tmp3_; #line 17 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp7_ = completion_list; + _tmp4_ = entry_multi_completion_create_completion_store (completion_list); #line 17 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp8_ = entry_multi_completion_create_completion_store (_tmp7_); + _tmp5_ = _tmp4_; #line 17 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp9_ = _tmp8_; + gtk_entry_completion_set_model (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_entry_completion_get_type (), GtkEntryCompletion), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_tree_model_get_type (), GtkTreeModel)); #line 17 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - gtk_entry_completion_set_model (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_entry_completion_get_type (), GtkEntryCompletion), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GTK_TYPE_TREE_MODEL, GtkTreeModel)); -#line 17 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _g_object_unref0 (_tmp9_); + _g_object_unref0 (_tmp5_); #line 18 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" gtk_entry_completion_set_text_column (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_entry_completion_get_type (), GtkEntryCompletion), 0); #line 19 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" gtk_entry_completion_set_match_func (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_entry_completion_get_type (), GtkEntryCompletion), _entry_multi_completion_match_func_gtk_entry_completion_match_func, g_object_ref (self), g_object_unref); #line 13 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return self; -#line 142 "EntryMultiCompletion.c" +#line 158 "EntryMultiCompletion.c" } -EntryMultiCompletion* entry_multi_completion_new (GeeCollection* completion_list, const gchar* delimiter) { +EntryMultiCompletion* +entry_multi_completion_new (GeeCollection* completion_list, + const gchar* delimiter) +{ #line 13 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return entry_multi_completion_construct (TYPE_ENTRY_MULTI_COMPLETION, completion_list, delimiter); -#line 149 "EntryMultiCompletion.c" +#line 168 "EntryMultiCompletion.c" } -static GtkListStore* entry_multi_completion_create_completion_store (GeeCollection* completion_list) { +static GtkListStore* +entry_multi_completion_create_completion_store (GeeCollection* completion_list) +{ GtkListStore* result = NULL; GtkListStore* completion_store = NULL; GtkListStore* _tmp0_; GtkTreeIter store_iter = {0}; GeeIterator* completion_iter = NULL; - GeeCollection* _tmp1_; - GeeIterator* _tmp2_; + GeeIterator* _tmp1_; #line 22 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" g_return_val_if_fail (GEE_IS_COLLECTION (completion_list), NULL); #line 23 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" @@ -164,54 +184,49 @@ static GtkListStore* entry_multi_completion_create_completion_store (GeeCollecti #line 23 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" completion_store = _tmp0_; #line 25 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp1_ = completion_list; -#line 25 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable)); + _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (completion_list, GEE_TYPE_ITERABLE, GeeIterable)); #line 25 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - completion_iter = _tmp2_; + completion_iter = _tmp1_; #line 26 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" while (TRUE) { -#line 175 "EntryMultiCompletion.c" - GeeIterator* _tmp3_; - gboolean _tmp4_; +#line 193 "EntryMultiCompletion.c" + GeeIterator* _tmp2_; + GtkListStore* _tmp3_; + GtkTreeIter _tmp4_ = {0}; GtkListStore* _tmp5_; - GtkTreeIter _tmp6_ = {0}; - GtkListStore* _tmp7_; - GtkTreeIter _tmp8_; - GeeIterator* _tmp9_; - gpointer _tmp10_; - gchar* _tmp11_; + GtkTreeIter _tmp6_; + GeeIterator* _tmp7_; + gpointer _tmp8_; + gchar* _tmp9_; #line 26 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp3_ = completion_iter; + _tmp2_ = completion_iter; #line 26 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp4_ = gee_iterator_next (_tmp3_); -#line 26 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (!_tmp4_) { + if (!gee_iterator_next (_tmp2_)) { #line 26 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" break; -#line 193 "EntryMultiCompletion.c" +#line 208 "EntryMultiCompletion.c" } #line 27 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp5_ = completion_store; + _tmp3_ = completion_store; #line 27 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - gtk_list_store_append (_tmp5_, &_tmp6_); + gtk_list_store_append (_tmp3_, &_tmp4_); #line 27 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - store_iter = _tmp6_; + store_iter = _tmp4_; #line 28 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp7_ = completion_store; + _tmp5_ = completion_store; #line 28 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp8_ = store_iter; + _tmp6_ = store_iter; #line 28 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp9_ = completion_iter; + _tmp7_ = completion_iter; #line 28 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp10_ = gee_iterator_get (_tmp9_); + _tmp8_ = gee_iterator_get (_tmp7_); #line 28 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp11_ = (gchar*) _tmp10_; + _tmp9_ = (gchar*) _tmp8_; #line 28 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - gtk_list_store_set (_tmp7_, &_tmp8_, 0, _tmp11_, -1, -1); + gtk_list_store_set (_tmp5_, &_tmp6_, 0, _tmp9_, -1, -1); #line 28 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _g_free0 (_tmp11_); -#line 215 "EntryMultiCompletion.c" + _g_free0 (_tmp9_); +#line 230 "EntryMultiCompletion.c" } #line 31 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" result = completion_store; @@ -219,135 +234,140 @@ static GtkListStore* entry_multi_completion_create_completion_store (GeeCollecti _g_object_unref0 (completion_iter); #line 31 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return result; -#line 223 "EntryMultiCompletion.c" +#line 238 "EntryMultiCompletion.c" } -static gpointer _g_object_ref0 (gpointer self) { +static gpointer +_g_object_ref0 (gpointer self) +{ #line 35 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return self ? g_object_ref (self) : NULL; -#line 230 "EntryMultiCompletion.c" +#line 247 "EntryMultiCompletion.c" } -static gchar* string_strip (const gchar* self) { +static gchar* +string_strip (const gchar* self) +{ gchar* result = NULL; gchar* _result_ = NULL; gchar* _tmp0_; const gchar* _tmp1_; -#line 1234 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1248 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1235 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = g_strdup (self); -#line 1235 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _result_ = _tmp0_; -#line 1236 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp1_ = _result_; -#line 1236 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_strstrip (_tmp1_); -#line 1237 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = _result_; -#line 1237 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 253 "EntryMultiCompletion.c" +#line 272 "EntryMultiCompletion.c" } -static gboolean string_contains (const gchar* self, const gchar* needle) { +static gboolean +string_contains (const gchar* self, + const gchar* needle) +{ gboolean result = FALSE; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 1403 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp0_; +#line 1417 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, FALSE); -#line 1403 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1417 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (needle != NULL, FALSE); -#line 1404 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = needle; -#line 1404 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_); -#line 1404 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp1_ != NULL; -#line 1404 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = strstr ((gchar*) self, (gchar*) needle); +#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp0_ != NULL; +#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 273 "EntryMultiCompletion.c" +#line 292 "EntryMultiCompletion.c" } -static gint string_last_index_of_char (const gchar* self, gunichar c, gint start_index) { +static gint +string_last_index_of_char (const gchar* self, + gunichar c, + gint start_index) +{ gint result = 0; gchar* _result_ = NULL; - gint _tmp0_; - gunichar _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1041 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp0_; + gchar* _tmp1_; +#line 1055 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, 0); -#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = start_index; -#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = c; -#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_); -#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _result_ = _tmp2_; -#line 1044 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = _result_; -#line 1044 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 298 "EntryMultiCompletion.c" - gchar* _tmp4_; -#line 1045 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = _result_; -#line 1045 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gint) (_tmp4_ - ((gchar*) self)); -#line 1045 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1056 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = g_utf8_strrchr (((gchar*) self) + start_index, (gssize) -1, c); +#line 1056 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 1058 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = _result_; +#line 1058 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (_tmp1_ != NULL) { +#line 315 "EntryMultiCompletion.c" + gchar* _tmp2_; +#line 1059 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = _result_; +#line 1059 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = (gint) (_tmp2_ - ((gchar*) self)); +#line 1059 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 306 "EntryMultiCompletion.c" +#line 323 "EntryMultiCompletion.c" } else { -#line 1047 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1061 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" result = -1; -#line 1047 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1061 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 312 "EntryMultiCompletion.c" +#line 329 "EntryMultiCompletion.c" } } -static gchar string_get (const gchar* self, glong index) { +static gchar +string_get (const gchar* self, + glong index) +{ gchar result = '\0'; - glong _tmp0_; - gchar _tmp1_; -#line 1110 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar _tmp0_; +#line 1124 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, '\0'); -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = index; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = ((gchar*) self)[_tmp0_]; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp1_; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = ((gchar*) self)[index]; +#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp0_; +#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 331 "EntryMultiCompletion.c" +#line 348 "EntryMultiCompletion.c" } -static gboolean entry_multi_completion_match_func (EntryMultiCompletion* self, GtkEntryCompletion* completion, const gchar* key, GtkTreeIter* iter) { +static gboolean +entry_multi_completion_match_func (EntryMultiCompletion* self, + GtkEntryCompletion* completion, + const gchar* key, + GtkTreeIter* iter) +{ gboolean result = FALSE; GtkTreeModel* model = NULL; - GtkEntryCompletion* _tmp0_; + GtkTreeModel* _tmp0_; GtkTreeModel* _tmp1_; - GtkTreeModel* _tmp2_; gchar* possible_match = NULL; - GtkTreeModel* _tmp3_; - GtkTreeIter _tmp4_; - const gchar* _tmp5_; + GtkTreeModel* _tmp2_; + GtkTreeIter _tmp3_; + const gchar* _tmp4_; + gchar* _tmp5_; gchar* _tmp6_; gchar* _tmp7_; - gchar* _tmp8_; gchar* normed_key = NULL; + gchar* _tmp8_; const gchar* _tmp9_; - gchar* _tmp10_; - const gchar* _tmp11_; #line 34 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" g_return_val_if_fail (IS_ENTRY_MULTI_COMPLETION (self), FALSE); #line 34 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" @@ -357,66 +377,59 @@ static gboolean entry_multi_completion_match_func (EntryMultiCompletion* self, G #line 34 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" g_return_val_if_fail (iter != NULL, FALSE); #line 35 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp0_ = completion; -#line 35 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp1_ = gtk_entry_completion_get_model (_tmp0_); + _tmp0_ = gtk_entry_completion_get_model (completion); #line 35 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp2_ = _g_object_ref0 (_tmp1_); + _tmp1_ = _g_object_ref0 (_tmp0_); #line 35 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - model = _tmp2_; + model = _tmp1_; #line 37 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp3_ = model; + _tmp2_ = model; #line 37 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp4_ = *iter; + _tmp3_ = *iter; #line 37 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - gtk_tree_model_get (_tmp3_, &_tmp4_, 0, &possible_match, -1); + gtk_tree_model_get (_tmp2_, &_tmp3_, 0, &possible_match, -1); #line 43 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp5_ = possible_match; + _tmp4_ = possible_match; #line 43 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp6_ = g_utf8_casefold (_tmp5_, (gssize) -1); + _tmp5_ = g_utf8_casefold (_tmp4_, (gssize) -1); #line 43 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp7_ = _tmp6_; + _tmp6_ = _tmp5_; #line 43 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp8_ = g_utf8_normalize (_tmp7_, (gssize) -1, G_NORMALIZE_ALL_COMPOSE); + _tmp7_ = g_utf8_normalize (_tmp6_, (gssize) -1, G_NORMALIZE_ALL_COMPOSE); #line 43 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _g_free0 (possible_match); #line 43 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - possible_match = _tmp8_; + possible_match = _tmp7_; #line 43 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _g_free0 (_tmp7_); + _g_free0 (_tmp6_); #line 44 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp9_ = key; + _tmp8_ = g_utf8_normalize (key, (gssize) -1, G_NORMALIZE_ALL_COMPOSE); #line 44 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp10_ = g_utf8_normalize (_tmp9_, (gssize) -1, G_NORMALIZE_ALL_COMPOSE); -#line 44 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - normed_key = _tmp10_; + normed_key = _tmp8_; #line 46 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp11_ = self->priv->delimiter; + _tmp9_ = self->priv->delimiter; #line 46 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (_tmp11_ == NULL) { -#line 398 "EntryMultiCompletion.c" - const gchar* _tmp12_; - const gchar* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; - gboolean _tmp16_; - gboolean _tmp17_; -#line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp12_ = possible_match; + if (_tmp9_ == NULL) { +#line 414 "EntryMultiCompletion.c" + const gchar* _tmp10_; + const gchar* _tmp11_; + gchar* _tmp12_; + gchar* _tmp13_; + gboolean _tmp14_; #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp13_ = normed_key; + _tmp10_ = possible_match; #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp14_ = string_strip (_tmp13_); + _tmp11_ = normed_key; #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp15_ = _tmp14_; + _tmp12_ = string_strip (_tmp11_); #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp16_ = g_str_has_prefix (_tmp12_, _tmp15_); + _tmp13_ = _tmp12_; #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp17_ = _tmp16_; + _tmp14_ = g_str_has_prefix (_tmp10_, _tmp13_); #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _g_free0 (_tmp15_); + _g_free0 (_tmp13_); #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - result = _tmp17_; + result = _tmp14_; #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _g_free0 (normed_key); #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" @@ -425,74 +438,58 @@ static gboolean entry_multi_completion_match_func (EntryMultiCompletion* self, G _g_object_unref0 (model); #line 47 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return result; -#line 429 "EntryMultiCompletion.c" +#line 442 "EntryMultiCompletion.c" } else { - const gchar* _tmp18_; - const gchar* _tmp19_; - gboolean _tmp20_; + const gchar* _tmp15_; + const gchar* _tmp16_; gchar* last_part = NULL; - const gchar* _tmp31_; - gchar* _tmp32_; - gchar* _tmp33_; - const gchar* _tmp34_; + const gchar* _tmp23_; + gchar* _tmp24_; + gchar* _tmp25_; + const gchar* _tmp26_; + gchar* _tmp27_; + gchar* _tmp28_; + const gchar* _tmp29_; + gint _tmp30_; + gint _tmp31_; + const gchar* _tmp32_; + const gchar* _tmp33_; + gchar* _tmp34_; gchar* _tmp35_; - gchar* _tmp36_; - const gchar* _tmp37_; - gint _tmp38_; - gint _tmp39_; - const gchar* _tmp40_; - const gchar* _tmp41_; - gchar* _tmp42_; - gchar* _tmp43_; - gboolean _tmp44_; - gboolean _tmp45_; -#line 49 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp18_ = normed_key; + gboolean _tmp36_; #line 49 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp19_ = self->priv->delimiter; + _tmp15_ = normed_key; #line 49 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp20_ = string_contains (_tmp18_, _tmp19_); + _tmp16_ = self->priv->delimiter; #line 49 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (_tmp20_) { -#line 458 "EntryMultiCompletion.c" + if (string_contains (_tmp15_, _tmp16_)) { +#line 467 "EntryMultiCompletion.c" gint offset = 0; - const gchar* _tmp21_; - const gchar* _tmp22_; - const gchar* _tmp23_; - gchar _tmp24_; - gint _tmp25_; - gint _tmp26_; + const gchar* _tmp17_; + const gchar* _tmp18_; + const gchar* _tmp19_; gint position = 0; - GtkWidget* _tmp27_; - gint _tmp28_; - gint _tmp29_; - gint _tmp30_; -#line 51 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp21_ = normed_key; -#line 51 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp22_ = normed_key; + GtkWidget* _tmp20_; + gint _tmp21_; + gint _tmp22_; #line 51 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp23_ = self->priv->delimiter; + _tmp17_ = normed_key; #line 51 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp24_ = string_get (_tmp23_, (glong) 0); + _tmp18_ = normed_key; #line 51 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp25_ = string_last_index_of_char (_tmp22_, (gunichar) _tmp24_, 0); + _tmp19_ = self->priv->delimiter; #line 51 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp26_ = g_utf8_strlen (_tmp21_, (gssize) _tmp25_); -#line 51 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - offset = _tmp26_; -#line 52 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp27_ = gtk_entry_completion_get_entry (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_entry_completion_get_type (), GtkEntryCompletion)); + offset = g_utf8_strlen (_tmp17_, (gssize) string_last_index_of_char (_tmp18_, (gunichar) string_get (_tmp19_, (glong) 0), 0)); #line 52 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp28_ = gtk_editable_get_position (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_entry_get_type (), GtkEntry), GTK_TYPE_EDITABLE, GtkEditable)); + _tmp20_ = gtk_entry_completion_get_entry (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_entry_completion_get_type (), GtkEntryCompletion)); #line 52 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - position = _tmp28_; + position = gtk_editable_get_position (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_entry_get_type (), GtkEntry), gtk_editable_get_type (), GtkEditable)); #line 53 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp29_ = position; + _tmp21_ = position; #line 53 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp30_ = offset; + _tmp22_ = offset; #line 53 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (_tmp29_ <= _tmp30_) { + if (_tmp21_ <= _tmp22_) { #line 54 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" result = FALSE; #line 54 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" @@ -503,33 +500,33 @@ static gboolean entry_multi_completion_match_func (EntryMultiCompletion* self, G _g_object_unref0 (model); #line 54 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return result; -#line 507 "EntryMultiCompletion.c" +#line 504 "EntryMultiCompletion.c" } } #line 57 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp31_ = normed_key; + _tmp23_ = normed_key; #line 57 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp32_ = string_strip (_tmp31_); + _tmp24_ = string_strip (_tmp23_); #line 57 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp33_ = _tmp32_; + _tmp25_ = _tmp24_; #line 57 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp34_ = self->priv->delimiter; + _tmp26_ = self->priv->delimiter; #line 57 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp35_ = entry_multi_completion_get_last_part (_tmp33_, _tmp34_); + _tmp27_ = entry_multi_completion_get_last_part (_tmp25_, _tmp26_); #line 57 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp36_ = _tmp35_; + _tmp28_ = _tmp27_; #line 57 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _g_free0 (_tmp33_); + _g_free0 (_tmp25_); #line 57 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - last_part = _tmp36_; + last_part = _tmp28_; #line 59 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp37_ = last_part; + _tmp29_ = last_part; #line 59 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp38_ = strlen (_tmp37_); + _tmp30_ = strlen (_tmp29_); #line 59 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp39_ = _tmp38_; + _tmp31_ = _tmp30_; #line 59 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (_tmp39_ == 0) { + if (_tmp31_ == 0) { #line 60 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" result = FALSE; #line 60 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" @@ -542,24 +539,22 @@ static gboolean entry_multi_completion_match_func (EntryMultiCompletion* self, G _g_object_unref0 (model); #line 60 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return result; -#line 546 "EntryMultiCompletion.c" +#line 543 "EntryMultiCompletion.c" } #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp40_ = possible_match; + _tmp32_ = possible_match; #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp41_ = last_part; + _tmp33_ = last_part; #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp42_ = string_strip (_tmp41_); + _tmp34_ = string_strip (_tmp33_); #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp43_ = _tmp42_; + _tmp35_ = _tmp34_; #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp44_ = g_str_has_prefix (_tmp40_, _tmp43_); + _tmp36_ = g_str_has_prefix (_tmp32_, _tmp35_); #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp45_ = _tmp44_; + _g_free0 (_tmp35_); #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _g_free0 (_tmp43_); -#line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - result = _tmp45_; + result = _tmp36_; #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _g_free0 (last_part); #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" @@ -570,7 +565,7 @@ static gboolean entry_multi_completion_match_func (EntryMultiCompletion* self, G _g_object_unref0 (model); #line 62 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return result; -#line 574 "EntryMultiCompletion.c" +#line 569 "EntryMultiCompletion.c" } #line 34 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _g_free0 (normed_key); @@ -578,210 +573,160 @@ static gboolean entry_multi_completion_match_func (EntryMultiCompletion* self, G _g_free0 (possible_match); #line 34 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _g_object_unref0 (model); -#line 582 "EntryMultiCompletion.c" +#line 577 "EntryMultiCompletion.c" } -static glong string_strnlen (gchar* str, glong maxlen) { +static glong +string_strnlen (gchar* str, + glong maxlen) +{ glong result = 0L; gchar* end = NULL; gchar* _tmp0_; - glong _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = str; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = maxlen; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - end = _tmp2_; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = end; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ == NULL) { -#line 605 "EntryMultiCompletion.c" - glong _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = maxlen; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp1_; +#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = memchr (str, 0, (gsize) maxlen); +#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + end = _tmp0_; +#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = end; +#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (_tmp1_ == NULL) { +#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = maxlen; +#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 613 "EntryMultiCompletion.c" +#line 601 "EntryMultiCompletion.c" } else { - gchar* _tmp5_; - gchar* _tmp6_; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = end; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (glong) (_tmp5_ - _tmp6_); -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp2_; +#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = end; +#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = (glong) (_tmp2_ - str); +#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 625 "EntryMultiCompletion.c" +#line 610 "EntryMultiCompletion.c" } } -static gchar* string_substring (const gchar* self, glong offset, glong len) { +static gchar* +string_substring (const gchar* self, + glong offset, + glong len) +{ gchar* result = NULL; glong string_length = 0L; gboolean _tmp0_ = FALSE; - glong _tmp1_; - glong _tmp8_; - glong _tmp14_; - glong _tmp17_; - glong _tmp18_; - glong _tmp19_; - glong _tmp20_; - glong _tmp21_; - gchar* _tmp22_; -#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + glong _tmp6_; + gchar* _tmp7_; +#line 1347 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = offset; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_ >= ((glong) 0)) { -#line 649 "EntryMultiCompletion.c" - glong _tmp2_; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = len; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = _tmp2_ >= ((glong) 0); -#line 655 "EntryMultiCompletion.c" +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (offset >= ((glong) 0)) { +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = len >= ((glong) 0); +#line 631 "EntryMultiCompletion.c" } else { -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = FALSE; -#line 659 "EntryMultiCompletion.c" +#line 635 "EntryMultiCompletion.c" } -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_tmp0_) { -#line 663 "EntryMultiCompletion.c" - glong _tmp3_; - glong _tmp4_; - glong _tmp5_; -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = offset; -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = len; -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_); -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - string_length = _tmp5_; -#line 675 "EntryMultiCompletion.c" +#line 1351 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + string_length = string_strnlen ((gchar*) self, offset + len); +#line 641 "EntryMultiCompletion.c" } else { - gint _tmp6_; - gint _tmp7_; -#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = strlen (self); -#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = _tmp6_; -#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - string_length = (glong) _tmp7_; -#line 685 "EntryMultiCompletion.c" + gint _tmp1_; + gint _tmp2_; +#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = strlen (self); +#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = _tmp1_; +#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + string_length = (glong) _tmp2_; +#line 651 "EntryMultiCompletion.c" } -#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = offset; -#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp8_ < ((glong) 0)) { -#line 691 "EntryMultiCompletion.c" - glong _tmp9_; - glong _tmp10_; - glong _tmp11_; -#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = string_length; -#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = offset; -#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - offset = _tmp9_ + _tmp10_; -#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = offset; -#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL); -#line 705 "EntryMultiCompletion.c" +#line 1356 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (offset < ((glong) 0)) { +#line 655 "EntryMultiCompletion.c" + glong _tmp3_; +#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp3_ = string_length; +#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + offset = _tmp3_ + offset; +#line 1358 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (offset >= ((glong) 0), NULL); +#line 663 "EntryMultiCompletion.c" } else { - glong _tmp12_; - glong _tmp13_; -#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = offset; -#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = string_length; -#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL); -#line 715 "EntryMultiCompletion.c" + glong _tmp4_; +#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp4_ = string_length; +#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (offset <= _tmp4_, NULL); +#line 670 "EntryMultiCompletion.c" } -#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = len; -#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp14_ < ((glong) 0)) { -#line 721 "EntryMultiCompletion.c" - glong _tmp15_; - glong _tmp16_; -#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = string_length; -#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = offset; -#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp15_ - _tmp16_; -#line 730 "EntryMultiCompletion.c" +#line 1362 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + if (len < ((glong) 0)) { +#line 674 "EntryMultiCompletion.c" + glong _tmp5_; +#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp5_ = string_length; +#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + len = _tmp5_ - offset; +#line 680 "EntryMultiCompletion.c" } -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = offset; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = len; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = string_length; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = offset; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = len; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp22_; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp6_ = string_length; +#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail ((offset + len) <= _tmp6_, NULL); +#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp7_ = g_strndup (((gchar*) self) + offset, (gsize) len); +#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp7_; +#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 750 "EntryMultiCompletion.c" +#line 692 "EntryMultiCompletion.c" } -static gboolean entry_multi_completion_real_match_selected (GtkEntryCompletion* base, GtkTreeModel* model, GtkTreeIter* iter) { +static gboolean +entry_multi_completion_real_match_selected (GtkEntryCompletion* base, + GtkTreeModel* model, + GtkTreeIter* iter) +{ EntryMultiCompletion * self; gboolean result = FALSE; gchar* match = NULL; - GtkTreeModel* _tmp0_; - GtkTreeIter _tmp1_; + GtkTreeIter _tmp0_; GtkEntry* entry = NULL; - GtkWidget* _tmp2_; - GtkEntry* _tmp3_; + GtkWidget* _tmp1_; + GtkEntry* _tmp2_; gchar* old_text = NULL; - GtkEntry* _tmp4_; - const gchar* _tmp5_; - gchar* _tmp6_; - const gchar* _tmp7_; + GtkEntry* _tmp3_; + const gchar* _tmp4_; + gchar* _tmp5_; + const gchar* _tmp6_; + gint _tmp7_; gint _tmp8_; - gint _tmp9_; - const gchar* _tmp24_ = NULL; - const gchar* _tmp25_; + const gchar* _tmp20_ = NULL; + const gchar* _tmp21_; gchar* new_text = NULL; + const gchar* _tmp22_; + const gchar* _tmp23_; + gchar* _tmp24_; + gchar* _tmp25_; const gchar* _tmp26_; - const gchar* _tmp27_; + gchar* _tmp27_; gchar* _tmp28_; gchar* _tmp29_; - const gchar* _tmp30_; - gchar* _tmp31_; - gchar* _tmp32_; - gchar* _tmp33_; - gchar* _tmp34_; - GtkEntry* _tmp35_; - GtkEntry* _tmp36_; - gint _tmp37_; - gint _tmp38_; + gchar* _tmp30_; + GtkEntry* _tmp31_; + GtkEntry* _tmp32_; + gint _tmp33_; + gint _tmp34_; #line 66 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ENTRY_MULTI_COMPLETION, EntryMultiCompletion); #line 66 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" @@ -789,150 +734,139 @@ static gboolean entry_multi_completion_real_match_selected (GtkEntryCompletion* #line 66 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" g_return_val_if_fail (iter != NULL, FALSE); #line 68 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp0_ = model; -#line 68 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp1_ = *iter; + _tmp0_ = *iter; #line 68 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &match, -1); + gtk_tree_model_get (model, &_tmp0_, 0, &match, -1); #line 70 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp2_ = gtk_entry_completion_get_entry (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_entry_completion_get_type (), GtkEntryCompletion)); + _tmp1_ = gtk_entry_completion_get_entry (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_entry_completion_get_type (), GtkEntryCompletion)); #line 70 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_entry_get_type (), GtkEntry)); + _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_entry_get_type (), GtkEntry)); #line 70 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - entry = _tmp3_; + entry = _tmp2_; #line 72 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp4_ = entry; + _tmp3_ = entry; #line 72 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp5_ = gtk_entry_get_text (_tmp4_); + _tmp4_ = gtk_entry_get_text (_tmp3_); #line 72 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp6_ = g_utf8_normalize (_tmp5_, (gssize) -1, G_NORMALIZE_ALL_COMPOSE); + _tmp5_ = g_utf8_normalize (_tmp4_, (gssize) -1, G_NORMALIZE_ALL_COMPOSE); #line 72 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - old_text = _tmp6_; + old_text = _tmp5_; #line 73 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp7_ = old_text; + _tmp6_ = old_text; #line 73 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp8_ = strlen (_tmp7_); + _tmp7_ = strlen (_tmp6_); #line 73 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp9_ = _tmp8_; + _tmp8_ = _tmp7_; #line 73 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (_tmp9_ > 0) { -#line 820 "EntryMultiCompletion.c" + if (_tmp8_ > 0) { +#line 763 "EntryMultiCompletion.c" + const gchar* _tmp9_; const gchar* _tmp10_; - const gchar* _tmp11_; - gboolean _tmp12_; #line 74 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp10_ = old_text; + _tmp9_ = old_text; #line 74 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp11_ = self->priv->delimiter; + _tmp10_ = self->priv->delimiter; #line 74 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp12_ = string_contains (_tmp10_, _tmp11_); -#line 74 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (_tmp12_) { -#line 832 "EntryMultiCompletion.c" - const gchar* _tmp13_ = NULL; + if (string_contains (_tmp9_, _tmp10_)) { +#line 772 "EntryMultiCompletion.c" + const gchar* _tmp11_ = NULL; + const gchar* _tmp12_; + const gchar* _tmp13_; const gchar* _tmp14_; const gchar* _tmp15_; - const gchar* _tmp16_; - const gchar* _tmp17_; - gchar _tmp18_; - gint _tmp19_; - gchar* _tmp20_; - gchar* _tmp21_; - gchar* _tmp22_; + gchar* _tmp16_; + gchar* _tmp17_; + gchar* _tmp18_; #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp14_ = self->priv->delimiter; + _tmp12_ = self->priv->delimiter; #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (g_strcmp0 (_tmp14_, " ") != 0) { + if (g_strcmp0 (_tmp12_, " ") != 0) { #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp13_ = " "; -#line 849 "EntryMultiCompletion.c" + _tmp11_ = " "; +#line 787 "EntryMultiCompletion.c" } else { #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp13_ = ""; -#line 853 "EntryMultiCompletion.c" + _tmp11_ = ""; +#line 791 "EntryMultiCompletion.c" } #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp15_ = old_text; -#line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp16_ = old_text; + _tmp13_ = old_text; #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp17_ = self->priv->delimiter; + _tmp14_ = old_text; #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp18_ = string_get (_tmp17_, (glong) 0); + _tmp15_ = self->priv->delimiter; #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp19_ = string_last_index_of_char (_tmp16_, (gunichar) _tmp18_, 0); + _tmp16_ = string_substring (_tmp13_, (glong) 0, (glong) (string_last_index_of_char (_tmp14_, (gunichar) string_get (_tmp15_, (glong) 0), 0) + 1)); #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp20_ = string_substring (_tmp15_, (glong) 0, (glong) (_tmp19_ + 1)); + _tmp17_ = _tmp16_; #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp21_ = _tmp20_; -#line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp22_ = g_strconcat (_tmp21_, _tmp13_, NULL); + _tmp18_ = g_strconcat (_tmp17_, _tmp11_, NULL); #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _g_free0 (old_text); #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - old_text = _tmp22_; + old_text = _tmp18_; #line 75 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _g_free0 (_tmp21_); -#line 877 "EntryMultiCompletion.c" + _g_free0 (_tmp17_); +#line 811 "EntryMultiCompletion.c" } else { - gchar* _tmp23_; + gchar* _tmp19_; #line 77 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp23_ = g_strdup (""); + _tmp19_ = g_strdup (""); #line 77 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _g_free0 (old_text); #line 77 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - old_text = _tmp23_; -#line 886 "EntryMultiCompletion.c" + old_text = _tmp19_; +#line 820 "EntryMultiCompletion.c" } } #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp25_ = self->priv->delimiter; + _tmp21_ = self->priv->delimiter; #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (g_strcmp0 (_tmp25_, " ") != 0) { + if (g_strcmp0 (_tmp21_, " ") != 0) { #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp24_ = " "; -#line 895 "EntryMultiCompletion.c" + _tmp20_ = " "; +#line 829 "EntryMultiCompletion.c" } else { #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp24_ = ""; -#line 899 "EntryMultiCompletion.c" + _tmp20_ = ""; +#line 833 "EntryMultiCompletion.c" } #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp26_ = old_text; + _tmp22_ = old_text; #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp27_ = match; + _tmp23_ = match; #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp28_ = g_strconcat (_tmp26_, _tmp27_, NULL); + _tmp24_ = g_strconcat (_tmp22_, _tmp23_, NULL); #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp29_ = _tmp28_; + _tmp25_ = _tmp24_; #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp30_ = self->priv->delimiter; + _tmp26_ = self->priv->delimiter; #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp31_ = g_strconcat (_tmp29_, _tmp30_, NULL); + _tmp27_ = g_strconcat (_tmp25_, _tmp26_, NULL); #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp32_ = _tmp31_; + _tmp28_ = _tmp27_; #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp33_ = g_strconcat (_tmp32_, _tmp24_, NULL); + _tmp29_ = g_strconcat (_tmp28_, _tmp20_, NULL); #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp34_ = _tmp33_; + _tmp30_ = _tmp29_; #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _g_free0 (_tmp32_); + _g_free0 (_tmp28_); #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _g_free0 (_tmp29_); + _g_free0 (_tmp25_); #line 80 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - new_text = _tmp34_; + new_text = _tmp30_; #line 81 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp35_ = entry; + _tmp31_ = entry; #line 81 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - gtk_entry_set_text (_tmp35_, new_text); + gtk_entry_set_text (_tmp31_, new_text); #line 82 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp36_ = entry; + _tmp32_ = entry; #line 82 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp37_ = strlen (new_text); + _tmp33_ = strlen (new_text); #line 82 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp38_ = _tmp37_; + _tmp34_ = _tmp33_; #line 82 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - gtk_editable_set_position (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GTK_TYPE_EDITABLE, GtkEditable), (gint) _tmp38_); + gtk_editable_set_position (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_editable_get_type (), GtkEditable), (gint) _tmp34_); #line 84 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" result = TRUE; #line 84 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" @@ -945,109 +879,108 @@ static gboolean entry_multi_completion_real_match_selected (GtkEntryCompletion* _g_free0 (match); #line 84 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return result; -#line 949 "EntryMultiCompletion.c" +#line 883 "EntryMultiCompletion.c" } -static gchar* entry_multi_completion_get_last_part (const gchar* s, const gchar* delimiter) { +static gchar* +entry_multi_completion_get_last_part (const gchar* s, + const gchar* delimiter) +{ gchar* result = NULL; gchar** split = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gchar** _tmp2_; - gchar** _tmp3_; + gchar** _tmp0_; + gchar** _tmp1_; gint split_length1; gint _split_size_; - gboolean _tmp4_ = FALSE; - gchar** _tmp5_; - gint _tmp5__length1; + gboolean _tmp2_ = FALSE; + gchar** _tmp3_; + gint _tmp3__length1; #line 88 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" g_return_val_if_fail (s != NULL, NULL); #line 88 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" g_return_val_if_fail (delimiter != NULL, NULL); #line 89 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp0_ = s; -#line 89 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp1_ = delimiter; -#line 89 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp3_ = _tmp2_ = g_strsplit (_tmp0_, _tmp1_, 0); + _tmp1_ = _tmp0_ = g_strsplit (s, delimiter, 0); #line 89 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - split = _tmp3_; + split = _tmp1_; #line 89 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - split_length1 = _vala_array_length (_tmp2_); + split_length1 = _vala_array_length (_tmp0_); #line 89 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" _split_size_ = split_length1; #line 91 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp5_ = split; + _tmp3_ = split; #line 91 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp5__length1 = split_length1; + _tmp3__length1 = split_length1; #line 91 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (_tmp5_ != NULL) { -#line 987 "EntryMultiCompletion.c" - gchar** _tmp6_; - gint _tmp6__length1; - const gchar* _tmp7_; + if (_tmp3_ != NULL) { +#line 918 "EntryMultiCompletion.c" + gchar** _tmp4_; + gint _tmp4__length1; + const gchar* _tmp5_; #line 91 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp6_ = split; + _tmp4_ = split; #line 91 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp6__length1 = split_length1; + _tmp4__length1 = split_length1; #line 91 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp7_ = _tmp6_[0]; + _tmp5_ = _tmp4_[0]; #line 91 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp4_ = _tmp7_ != NULL; -#line 999 "EntryMultiCompletion.c" + _tmp2_ = _tmp5_ != NULL; +#line 930 "EntryMultiCompletion.c" } else { #line 91 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp4_ = FALSE; -#line 1003 "EntryMultiCompletion.c" + _tmp2_ = FALSE; +#line 934 "EntryMultiCompletion.c" } #line 91 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - if (_tmp4_) { -#line 1007 "EntryMultiCompletion.c" - gchar** _tmp8_; - gint _tmp8__length1; - gchar** _tmp9_; - gint _tmp9__length1; - const gchar* _tmp10_; - gchar* _tmp11_; + if (_tmp2_) { +#line 938 "EntryMultiCompletion.c" + gchar** _tmp6_; + gint _tmp6__length1; + gchar** _tmp7_; + gint _tmp7__length1; + const gchar* _tmp8_; + gchar* _tmp9_; #line 92 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp8_ = split; + _tmp6_ = split; #line 92 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp8__length1 = split_length1; + _tmp6__length1 = split_length1; #line 92 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp9_ = split; + _tmp7_ = split; #line 92 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp9__length1 = split_length1; + _tmp7__length1 = split_length1; #line 92 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp10_ = _tmp8_[_tmp9__length1 - 1]; + _tmp8_ = _tmp6_[_tmp7__length1 - 1]; #line 92 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp11_ = g_strdup (_tmp10_); + _tmp9_ = g_strdup (_tmp8_); #line 92 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - result = _tmp11_; + result = _tmp9_; #line 92 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL); #line 92 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return result; -#line 1032 "EntryMultiCompletion.c" +#line 963 "EntryMultiCompletion.c" } else { - gchar* _tmp12_; + gchar* _tmp10_; #line 94 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - _tmp12_ = g_strdup (""); + _tmp10_ = g_strdup (""); #line 94 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" - result = _tmp12_; + result = _tmp10_; #line 94 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL); #line 94 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" return result; -#line 1043 "EntryMultiCompletion.c" +#line 974 "EntryMultiCompletion.c" } #line 88 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL); -#line 1047 "EntryMultiCompletion.c" +#line 978 "EntryMultiCompletion.c" } -static void entry_multi_completion_class_init (EntryMultiCompletionClass * klass) { +static void +entry_multi_completion_class_init (EntryMultiCompletionClass * klass) +{ #line 10 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" entry_multi_completion_parent_class = g_type_class_peek_parent (klass); #line 10 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" @@ -1056,18 +989,22 @@ static void entry_multi_completion_class_init (EntryMultiCompletionClass * klass ((GtkEntryCompletionClass *) klass)->match_selected = (gboolean (*) (GtkEntryCompletion *, GtkTreeModel*, GtkTreeIter*)) entry_multi_completion_real_match_selected; #line 10 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" G_OBJECT_CLASS (klass)->finalize = entry_multi_completion_finalize; -#line 1060 "EntryMultiCompletion.c" +#line 993 "EntryMultiCompletion.c" } -static void entry_multi_completion_instance_init (EntryMultiCompletion * self) { +static void +entry_multi_completion_instance_init (EntryMultiCompletion * self) +{ #line 10 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" self->priv = ENTRY_MULTI_COMPLETION_GET_PRIVATE (self); -#line 1067 "EntryMultiCompletion.c" +#line 1002 "EntryMultiCompletion.c" } -static void entry_multi_completion_finalize (GObject * obj) { +static void +entry_multi_completion_finalize (GObject * obj) +{ EntryMultiCompletion * self; #line 10 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ENTRY_MULTI_COMPLETION, EntryMultiCompletion); @@ -1075,11 +1012,13 @@ static void entry_multi_completion_finalize (GObject * obj) { _g_free0 (self->priv->delimiter); #line 10 "/home/jens/Source/shotwell/src/dialogs/EntryMultiCompletion.vala" G_OBJECT_CLASS (entry_multi_completion_parent_class)->finalize (obj); -#line 1079 "EntryMultiCompletion.c" +#line 1016 "EntryMultiCompletion.c" } -GType entry_multi_completion_get_type (void) { +GType +entry_multi_completion_get_type (void) +{ static volatile gsize entry_multi_completion_type_id__volatile = 0; if (g_once_init_enter (&entry_multi_completion_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (EntryMultiCompletionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) entry_multi_completion_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EntryMultiCompletion), 0, (GInstanceInitFunc) entry_multi_completion_instance_init, NULL }; @@ -1091,7 +1030,11 @@ GType entry_multi_completion_get_type (void) { } -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { +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) { @@ -1103,13 +1046,19 @@ static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNoti } -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { +static void +_vala_array_free (gpointer array, + gint array_length, + GDestroyNotify destroy_func) +{ _vala_array_destroy (array, array_length, destroy_func); g_free (array); } -static gint _vala_array_length (gpointer array) { +static gint +_vala_array_length (gpointer array) +{ int length; length = 0; if (array) { -- cgit v1.2.3