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:
Benjamin Otte 2020-06-27 06:31:18 +02:00
parent b75db7d1c6
commit f75a3a0e95
3 changed files with 3 additions and 3 deletions

View File

@ -943,7 +943,7 @@ gtk_drop_down_set_from_strings (GtkDropDown *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);
g_object_unref (model);
}

View File

@ -432,7 +432,7 @@ gtk_string_list_init (GtkStringList *self)
* Returns: a new #GtkStringList
*/
GtkStringList *
gtk_string_list_new (const char **strings)
gtk_string_list_new (const char * const *strings)
{
GtkStringList *self;
guint i;

View File

@ -45,7 +45,7 @@ GDK_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (GtkStringList, gtk_string_list, GTK, STRING_LIST, GObject)
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
void gtk_string_list_append (GtkStringList *self,