<p>This will be failed in first loop, <strong>how to get first TAG ?</strong><br>
<strong>gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_TAG, &tag, -1);</strong></p>
<pre><code>static void on_update_all_index(GtkWidget *widget, gpointer user_data)
{
GtkTreeIter iter;
GeanyDocument * doc = document_get_current();
gboolean cont = TRUE;
gint line_num;
gint index_chr = 0;
GtkTreeStore * store = doc->priv->tag_store;
GtkTreeModel *model = GTK_TREE_MODEL(store);
unsigned int * seg = 0;
int count = 0;
if (!gtk_tree_model_get_iter_first(model, &iter)){
return;
}
do
{
TMTag * tag;
gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_TAG, &tag, -1);
if(!tag){
cont = ui_tree_model_iter_any_next(model, &iter, TRUE);
}else{
line_num = tag->line;
#if 1
if(line_num >= 0){
index_chr++;
//editor_udpate_chapter_index_quickly(doc->editor,index_chr,line_num);
}
#endif
tm_tag_unref(tag);
}
}
while (gtk_tree_model_iter_next(model, &iter));
}
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2278?email_source=notifications&email_token=AAIOWJ336GSINFQCDZMWMX3QGXMKPA5CNFSM4IQVXAN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHZTS2A">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ3JPC77533RRLML3L3QGXMKPANCNFSM4IQVXANQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ73ZCEVKNHMDL7FNY3QGXMKPA5CNFSM4IQVXAN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHZTS2A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2278?email_source=notifications\u0026email_token=AAIOWJ336GSINFQCDZMWMX3QGXMKPA5CNFSM4IQVXAN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHZTS2A",
"url": "https://github.com/geany/geany/issues/2278?email_source=notifications\u0026email_token=AAIOWJ336GSINFQCDZMWMX3QGXMKPA5CNFSM4IQVXAN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHZTS2A",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>