I have some text I'm displaying via pango and while in general I want to allow automatic line breaks, I want to prevent line breaks from occurring in certain contexts.

Specifically, what I'm trying to avoid is the breaking of option-flag strings such as "--quiet" in online documentation (with "--" appearing on one line and "quiet" on the next).

I've tried creating a GtkTextTag like this:

    tag = gtk_text_tag_new("optflag");
    g_object_set(tag, "family", "monospace",
                 "wrap-mode", GTK_WRAP_NONE,
                 "wrap-mode-set", TRUE, NULL);

then adding it to the appropriate GtkTextTagTable, and using gtk_text_buffer_insert_with_tags_by_name to wrap the option strings. But, alas, it doesn't help: the monospace font is applied OK, but I still get line breaks after "--".

Any suggestions would be appreciated.

--
Allin Cottrell
Department of Economics
Wake Forest University, NC

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to