Move the "tail" question to the text view section. Add an entry for "why
2004-10-29 Matthias Clasen <mclasen@redhat.com> * gtk/question_index.sgml: Move the "tail" question to the text view section. Add an entry for "why are my types not registered". (#156809, Q by Salvador Fandiño, A by Owen Taylor)
This commit is contained in:
committed by
Matthias Clasen
parent
f604e211c7
commit
b6608fec78
@ -1,3 +1,10 @@
|
|||||||
|
2004-10-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/question_index.sgml: Move the "tail" question to the
|
||||||
|
text view section.
|
||||||
|
Add an entry for "why are my types not registered". (#156809,
|
||||||
|
Q by Salvador Fandi<64>o, A by Owen Taylor)
|
||||||
|
|
||||||
2004-10-27 Matthias Clasen <mclasen@redhat.com>
|
2004-10-27 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.5.4 ===
|
* === Released 2.5.4 ===
|
||||||
|
|||||||
@ -483,31 +483,25 @@ to the GNOME 2.0 platform</ulink>.
|
|||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para>
|
<para>
|
||||||
How do I make a text view scroll to the end of the buffer automatically ?
|
Why are types not registered if I use their <literal>GTK_TYPE_BLAH;</literal> macro ?
|
||||||
</para>
|
</para>
|
||||||
</question>
|
</question>
|
||||||
|
|
||||||
<answer>
|
<answer>
|
||||||
<para>
|
<para>
|
||||||
The "insert" <link linkend="GtkTextMark">mark</link> marks the insertion point
|
The <literal>GTK_TYPE_BLAH</literal> macros are defined as calls to
|
||||||
where <link linkend="gtk-text-buffer-insert">gtk_text_buffer_insert()</link>
|
<literal>gtk_blah_get_type()</literal>, and the <literal>_get_type()</literal> functions
|
||||||
inserts new text into the buffer. The text is inserted
|
are declared as <literal>G_GNUC_CONST</literal> which allows the compiler to optimize
|
||||||
<emphasis>before</emphasis> the "insert" mark, so that it generally stays
|
the call away if it appears that the value is not being used.
|
||||||
at the end of the buffer. If it gets explicitly moved to some other position,
|
|
||||||
e.g. when the user selects some text,
|
|
||||||
use <link linkend="gtk-text-buffer-move-mark">gtk_text_buffer_move_mark()</link>
|
|
||||||
to set it to the desired location before inserting more text.
|
|
||||||
The "insert" mark of a buffer can be obtained with <link
|
|
||||||
linkend="gtk-text-buffer-get-insert">gtk_text_buffer_get_insert()</link>.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To ensure that the end of the buffer remains visible, use
|
A common workaround for this problem is to store the result in a volatile variable,
|
||||||
<link
|
which keeps the compiler from optimizing the call away.
|
||||||
linkend="gtk-text-view-scroll-to-mark">gtk_text_view_scroll_to_mark()</link> to scroll to the "insert" mark after inserting new text.
|
<informalexample><programlisting>
|
||||||
|
volatile GType dummy = GTK_TYPE_BLAH;
|
||||||
|
</programlisting></informalexample>
|
||||||
</para>
|
</para>
|
||||||
</answer>
|
|
||||||
</qandaentry>
|
|
||||||
</qandadiv>
|
</qandadiv>
|
||||||
|
|
||||||
<qandadiv><title>Which widget should I use...</title>
|
<qandadiv><title>Which widget should I use...</title>
|
||||||
@ -732,6 +726,35 @@ To ensure that all text has the desired appearance, use <link
|
|||||||
linkend="gtk-widget-modify-font">gtk_widget_modify_font()</link> to change the default font for the widget.
|
linkend="gtk-widget-modify-font">gtk_widget_modify_font()</link> to change the default font for the widget.
|
||||||
</para></answer>
|
</para></answer>
|
||||||
</qandaentry>
|
</qandaentry>
|
||||||
|
|
||||||
|
<qandaentry>
|
||||||
|
<question>
|
||||||
|
<para>
|
||||||
|
How do I make a text view scroll to the end of the buffer automatically ?
|
||||||
|
</para>
|
||||||
|
</question>
|
||||||
|
|
||||||
|
<answer>
|
||||||
|
<para>
|
||||||
|
The "insert" <link linkend="GtkTextMark">mark</link> marks the insertion point
|
||||||
|
where <link linkend="gtk-text-buffer-insert">gtk_text_buffer_insert()</link>
|
||||||
|
inserts new text into the buffer. The text is inserted
|
||||||
|
<emphasis>before</emphasis> the "insert" mark, so that it generally stays
|
||||||
|
at the end of the buffer. If it gets explicitly moved to some other position,
|
||||||
|
e.g. when the user selects some text,
|
||||||
|
use <link linkend="gtk-text-buffer-move-mark">gtk_text_buffer_move_mark()</link>
|
||||||
|
to set it to the desired location before inserting more text.
|
||||||
|
The "insert" mark of a buffer can be obtained with <link
|
||||||
|
linkend="gtk-text-buffer-get-insert">gtk_text_buffer_get_insert()</link>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To ensure that the end of the buffer remains visible, use
|
||||||
|
<link
|
||||||
|
linkend="gtk-text-view-scroll-to-mark">gtk_text_view_scroll_to_mark()</link> to scroll to the "insert" mark after inserting new text.
|
||||||
|
</para>
|
||||||
|
</answer>
|
||||||
|
</qandaentry>
|
||||||
</qandadiv>
|
</qandadiv>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user