mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
stringlist: Take a const char const * argument
Sucks that we need to cast a char**, but otherwise we need to cast {"foo", "bar", "baz" } arrays.
This commit is contained in:
parent
b75db7d1c6
commit
f75a3a0e95
@ -943,7 +943,7 @@ gtk_drop_down_set_from_strings (GtkDropDown *self,
|
|||||||
|
|
||||||
set_default_factory (self);
|
set_default_factory (self);
|
||||||
|
|
||||||
model = G_LIST_MODEL (gtk_string_list_new ((const char **)texts));
|
model = G_LIST_MODEL (gtk_string_list_new (texts));
|
||||||
gtk_drop_down_set_model (self, model);
|
gtk_drop_down_set_model (self, model);
|
||||||
g_object_unref (model);
|
g_object_unref (model);
|
||||||
}
|
}
|
||||||
|
@ -432,7 +432,7 @@ gtk_string_list_init (GtkStringList *self)
|
|||||||
* Returns: a new #GtkStringList
|
* Returns: a new #GtkStringList
|
||||||
*/
|
*/
|
||||||
GtkStringList *
|
GtkStringList *
|
||||||
gtk_string_list_new (const char **strings)
|
gtk_string_list_new (const char * const *strings)
|
||||||
{
|
{
|
||||||
GtkStringList *self;
|
GtkStringList *self;
|
||||||
guint i;
|
guint i;
|
||||||
|
@ -45,7 +45,7 @@ GDK_AVAILABLE_IN_ALL
|
|||||||
G_DECLARE_FINAL_TYPE (GtkStringList, gtk_string_list, GTK, STRING_LIST, GObject)
|
G_DECLARE_FINAL_TYPE (GtkStringList, gtk_string_list, GTK, STRING_LIST, GObject)
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GtkStringList * gtk_string_list_new (const char **strings);
|
GtkStringList * gtk_string_list_new (const char * const *strings);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gtk_string_list_append (GtkStringList *self,
|
void gtk_string_list_append (GtkStringList *self,
|
||||||
|
Loading…
Reference in New Issue
Block a user