GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Itterating over char

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
madsovenielsen
Familiar Face


Joined: 14 Mar 2010
Posts: 5

PostPosted: Sun Mar 14, 2010 4:09 pm    Post subject: Itterating over char Reply with quote

Hey all.

i am having some trouble getting a integer to increment based on how many chars there is in the textbox. heres the code

int filesize = 0;
char filename[128] = "untitled.c";

row = gtk_text_iter_get_line(&iter);
col = gtk_text_iter_get_line_offset(&iter);
filesize = gtk_text_iter_get_char(&iter); <= is the problem here ?

msg = g_strdup_printf("File Name: %s %iKb Col %d Ln %d", filename, filesize+8, col+1, row+1);

gtk_statusbar_push(statusbar, 0, msg);

g_free(msg);

Any help is greatly appriciated.

/mads
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP