Commit Graph

56 Commits

Author SHA1 Message Date
Matthias Clasen
1692b41b30 comboboxtext: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Benjamin Otte
d375dce9f5 Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
Benjamin Otte
d7266b25ba Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
Matthias Clasen
83f22fcce2 Add a few missing includes
These sources are using GtkListStore apis,
but were replying on indirect includes to
get the header. Make this explicit, to prepare
for GtkEntryCompletion losing its tree view
dependencies.
2020-06-23 07:55:53 -04:00
Matthias Clasen
ec394e805b Use gtk_combo_box_set_child throughout 2020-05-04 22:53:08 -04:00
Benjamin Otte
99fc31865a comboboxtext: Inline functions into return_if_fail() 2020-02-22 07:33:40 +01:00
Alexander Larsson
96b37f4eb8 Use the new GtkBuildableParser type in GtkBuildable interfaces 2019-09-10 12:08:20 -04:00
Ryan Westlund
f00d964f4f Add nullable annotation to combo_box_text_get_active_text 2019-07-23 22:59:35 -04:00
Matthias Clasen
72ef09f55d combo box text: Make final 2019-05-26 22:16:58 -04:00
Matthias Clasen
9e0c471b03 entry, spin button: Drop redundant API
Avoid duplicating GtkEditable APIs. Port existing users.
2019-02-28 16:34:00 -05:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Matthias Clasen
072f06abf7 Fix fallout from g_object_ref change
g_object_ref now returns the type of the object that was
passed. Introduce cast as necessary to avoid warnings due
to this.
2017-12-08 17:48:47 -05:00
Matthias Clasen
4a5801b902 combobox: Correct the CSS node docs
The box was somehow overlooked in the diagrams.
2016-03-02 15:20:47 -05:00
Matthias Clasen
e8b9aacfc1 combo: Add .linked class when appropriate
Add the .linked style class to combo boxes which have
an entry, since that is what they are.
2016-01-15 17:55:44 -05:00
Matthias Clasen
54a6e032ca combobox: Document the popup window CSS node 2016-01-15 17:48:39 -05:00
Matthias Clasen
92e3655ace combo box: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen
18b2fd4f70 GtkComboBoxText: Use the new helpers
Use the new GtkBuilder helpers and g_markup_collect_attributes
in all builder subparsers.
2015-04-27 01:15:24 -04:00
Jasper St. Pierre
9c37b3de74 gtk: Don't use GObjectClass.constructor
Use the newer constructed instead, which has a fast path in GObject.
2014-06-26 19:06:43 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
13998c55e7 docs: use proper quotations instead of '*' 2014-02-07 14:22:39 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
3b3d8ca456 docs: Use "#" for refsect2 instead of ## 2014-02-04 21:00:58 -05:00
Matthias Clasen
09d1b28249 docs: Convert to markdown
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
William Jon McCann
768bc44081 docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
Kalev Lember
a37450110b Fix string allocation handling with GtkBuilder translations
Use g_string_assign to avoid issues with assigning GString's internal
buffer back to the same string. This can happen when no translations are
available and _gtk_builder_parser_translate returns back the same
pointer that was passed in.

This fixes a regression from commit e9f182e37a
that caused GtkComboBoxText <items> from GtkBuilder to show up empty if
no translations are available.

https://bugzilla.gnome.org/show_bug.cgi?id=700629
2013-06-08 10:54:25 +02:00
Tristan Van Berkom
11be64d3fe GtkComboBoxText: Improved GtkBuildable documentation.
Also removed a bogus FIXME comment which might have been true
a long time ago. Clarification: the "domain" attribute specified
in the builder script overrides any domain previously set with
gtk_builder_set_translation_domain(), so the translation of items
here is perfectly correct and does not need to be fixed.
2013-05-12 21:56:40 +09:00
Matthias Clasen
e9f182e37a Fix a few memory leaks wrt to translations
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=699016
The fix here is slightly different. We make
_gtk_builder_parser_translate return a const char * instead of
a dup'ed string, and fix up the callers.
2013-04-28 21:43:49 -04:00
Tristan Brindle
f48e9b1d20 Add missing annotation for gtk_combo_box_text_get_active_text()
https://bugzilla.gnome.org/show_bug.cgi?id=688140
2013-01-04 15:30:46 +01:00
Murray Cumming
a0b4ab109d Documentation: Correct references to properties.
These should use :, not ::, though signals would use ::.
See
http://developer.gnome.org/gtk-doc-manual/unstable/documenting_syntax.html.en
and
http://developer.gnome.org/gtk-doc-manual/unstable/documenting_symbols.html.en
2012-02-15 11:43:33 +01:00
Ryan Lortie
0ea48c4139 GtkComboBoxText: allow id='' tag in builder markup
Presently, GtkComboBoxText lets you list the items for it in the
GtkBuilder markup like so:

<items>
  <item translatable='yes'>Red</item>
  <item translatable='yes'>Blue</item>
</items>

but has no way to set the "id" column for added items.  Add an id='' tag
for that purpose so that you can do:

  <item id='red' translatable='yes'>Red</item>

https://bugzilla.gnome.org/show_bug.cgi?id=667319
2012-01-04 17:00:35 -05:00
Kjell Ahlstedt
6aeab7b7cc comboboxtext: Set entry-text-column and id-column props in the constructor
This is cleaner than setting the value in the _new() functions and
makes binding and GtkBuilder instantiation easier. Bug #612396, comment 65.
2011-12-30 11:10:26 +01:00
Laszlo Pandy
991b782b75 Fix incomplete &gt; entities in docs. 2011-08-13 15:22:44 +02:00
Matthias Clasen
84b259d076 Make gtk_combo_box_text_get_active_text() behave as documented
If there is an entry, it is supposed to return the contents
of the entry. Pointed out by Allin Cottrell,
https://bugzilla.gnome.org/show_bug.cgi?id=642681
2011-02-19 13:27:51 -05:00
Matthias Clasen
394ae46ec0 Add some missing symbols to the docs 2011-02-08 23:21:39 -05:00
Tristan Van Berkom
9487ce77c4 Changed GtkComboBoxText <items> builder parser to use g_string_append_len(). 2011-01-26 23:55:01 +09:00
Tristan Van Berkom
e8157126d8 Fix GtkComboBoxText GtkBuildable <items> parsing to handle incomming text accumulatively 2011-01-26 23:55:01 +09:00
Matthias Clasen
061d48b68d More doc build fixes
Grr, our mixture of xml and plain text in long descriptions is
a mess.
2011-01-10 10:59:50 -05:00
Tristan Van Berkom
2dafbba921 Added GtkBuildable support for specifying <items> in GtkComboBoxText. 2011-01-10 18:48:07 +09:00
Matthias Clasen
c396c52327 Documentation fixes 2011-01-06 08:12:01 -05:00
Milan Bouchet-Valat
52e1722f35 GtkComboBox(Text): Add documentation about the entry 2011-01-04 10:36:08 -05:00
Milan Bouchet-Valat
029083454b [GtkComboBoxText] Add checks for id-column/entry-text-column >= 0
If the GtkComboBoxText doesn't have id-column or entry-text-column
set for some reason (value -1), better warn and return. Else, unrelated
assertions fail, and warnings from gtk_tree_model_get_column_type()
are printed, which are not really obvious.

https://bugzilla.gnome.org/show_bug.cgi?id=637018
2010-12-11 19:10:51 +01:00
Ryan Lortie
922324553b Bug 619148 - "active ID" properties (GtkComboBox)
Based on a patch by Matthias, add an "active-id" property for
GtkComboBox and add some convenience API for GtkComboBoxText.

Also, add a test case to gtk-demo.
2010-11-30 00:29:16 -05:00
Xan Lopez
9c7016ab87 gtkcomboboxtext: remove unused variable 2010-10-26 15:18:35 +09:00
Matthias Clasen
7651c231e0 Revert the id-column patch
It didn't quite turn out as I wanted it.
I'll put it in bug 619148 for now.
2010-10-23 19:34:20 +02:00
Javier Jardón
0dd5eb4b61 docs: GtkComboBoxText: more fixes 2010-10-23 03:03:50 +02:00
Javier Jardón
d94adcf643 docs: Some fixes in GtkComboboxText notations 2010-10-23 03:01:35 +02:00
Matthias Clasen
9fb36fff36 Add a way to associate numeric ids with combobox values
This will let us use combo boxes as property editors for
GSettings enmerations easily.
2010-10-23 02:31:30 +02:00
Christian Dywan
5862075e9d comboboxtext: Add gtk_combo_box_text_remove_all()
https://bugzilla.gnome.org/show_bug.cgi?id=324899
2010-10-21 14:30:11 +02:00
Matthias Clasen
b613cc6478 Don't add a second cell renderer
When has-entry is TRUE, GtkComboBox already adds a cell renderer
for the text column, so avoid adding a second one in GtkComboBoxText.

https://bugzilla.gnome.org/show_bug.cgi?id=632381
2010-10-18 08:13:41 -04:00