mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Fix links in GtkComboBox migration guide
Some link to GTK+ classes are not gererated because the ":" near the class name; solution: "#GtkComboBox<!---->:" Also, added some links to the proper signals Fixes https://bugzilla.gnome.org/show_bug.cgi?id=606291
This commit is contained in:
parent
808e698ea7
commit
2a34285ad7
@ -20,7 +20,7 @@
|
||||
editable case.
|
||||
The selection of the display style — menu or list —
|
||||
is no longer done at the API level, but has been made themeable via
|
||||
the style property #GtkComboBox:appearance.
|
||||
the style property #GtkComboBox:appears-as-list.
|
||||
</para>
|
||||
|
||||
<section id="migrating-GtkOptionMenu">
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
<para>
|
||||
Here is an example of a simple, but typical use of
|
||||
#GtkOptionMenu:
|
||||
#GtkOptionMenu<!---->:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *option_menu, *menu, *menu_item;
|
||||
|
||||
@ -47,12 +47,12 @@ gtk_widget_show (menu_item);
|
||||
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
|
||||
</programlisting></informalexample>
|
||||
In order to react to the user's selection, connect to the "changed"
|
||||
In order to react to the user's selection, connect to the #GtkOptionMenu::changed
|
||||
signal on the option menu and use gtk_option_menu_get_history()
|
||||
to retrieve the index of the selected item.
|
||||
</para>
|
||||
<para>
|
||||
And here is how it would be done with a #GtkComboBox:
|
||||
And here is how it would be done with a #GtkComboBox<!---->:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *combo_box;
|
||||
|
||||
@ -129,7 +129,7 @@ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer,
|
||||
<title>Migrating from GtkCombo to GtkComboBoxEntry</title>
|
||||
|
||||
<para>
|
||||
Here is an example of a simple, but typical use of a #GtkCombo:
|
||||
Here is an example of a simple, but typical use of a #GtkCombo<!---->:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *combo;
|
||||
GList *items = NULL;
|
||||
@ -141,13 +141,13 @@ items = g_list_append (items, "Third Item");
|
||||
combo = gtk_combo_new (<!-- -->);
|
||||
gtk_combo_set_popdown_strings (GTK_COMBO (combo), items);
|
||||
</programlisting></informalexample>
|
||||
In order to react to the user's selection, connect to the "changed"
|
||||
In order to react to the user's selection, connect to the #GtkCombo::changed
|
||||
signal on the combo and use
|
||||
<literal>gtk_entry_get_text (GTK_ENTRY (combo->entry))</literal>
|
||||
to retrieve the selected text.
|
||||
</para>
|
||||
<para>
|
||||
And here is how it would be done using #GtkComboBoxEntry:
|
||||
And here is how it would be done using #GtkComboBoxEntry<!---->:
|
||||
<informalexample><programlisting>
|
||||
combo_box = gtk_combo_box_entry_new_text (<!-- -->);
|
||||
|
||||
@ -155,7 +155,7 @@ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "First Item");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Second Item");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Third Item");
|
||||
</programlisting></informalexample>
|
||||
In order to react to the user's selection, connect to the "changed"
|
||||
In order to react to the user's selection, connect to the #GtkComboBox::changed
|
||||
signal on the combo and use
|
||||
<literal>gtk_entry_get_text (GTK_ENTRY (GTK_BIN (combo_box)->child))</literal>
|
||||
to retrieve the selected text.
|
||||
|
Loading…
Reference in New Issue
Block a user