Nicolas, thanks for your initial work. First, some comments to the patch so far:
- gtk_editable_get_chars() (just like all glib/gtk functions) already return a copy of the string, no need to copy it again. So you can simplify the loop like Mikele said. Just for some bikeshedding, I think that a for loop is a bit easier to read: for (p = text; *p; ++p) if (*p=='/') *p='_'; But that's just a matter of style. - Right now it seems that the modified string is never actually written back to the input line? This should happen, so that the user sees the correction. - The loop should set a flag if it replaced any character. If so, then there should be a gtk_message_dialog which points out the error. - You need to g_free() the string you received from gtk_editable_get_chars() after having finished working with it. Happy hacking! -- Setting an invalid mount point can make a removeable media unaccessible https://bugs.launchpad.net/bugs/107668 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs