Updated with upstream update

This commit is contained in:
2023-10-30 15:55:30 -07:00
parent 098531073c
commit 3bbdd873ef
584 changed files with 91827 additions and 70362 deletions

View File

@ -237,7 +237,7 @@ pika_plug_in_progress_pulse (PikaPlugIn *plug_in)
pika_progress_pulse (proc_frame->progress);
}
guint32
GBytes *
pika_plug_in_progress_get_window_id (PikaPlugIn *plug_in)
{
PikaPlugInProcFrame *proc_frame;

View File

@ -38,7 +38,7 @@ void pika_plug_in_progress_set_text (PikaPlugIn *plug_in,
void pika_plug_in_progress_set_value (PikaPlugIn *plug_in,
gdouble percentage);
void pika_plug_in_progress_pulse (PikaPlugIn *plug_in);
guint32 pika_plug_in_progress_get_window_id (PikaPlugIn *plug_in);
GBytes * pika_plug_in_progress_get_window_id (PikaPlugIn *plug_in);
gboolean pika_plug_in_progress_install (PikaPlugIn *plug_in,
const gchar *progress_callback);

View File

@ -665,10 +665,11 @@ pika_plug_in_manager_add_from_file (PikaPlugInManager *manager,
basename = g_path_get_basename (filename);
g_free (filename);
/* When we scan build dirs for plug-ins, there will be some
/* When we scan build dirs for plug-ins, there might be some
* executable files that are not plug-ins that we want to ignore,
* for example plug-ins/common/mkgen.pl if
* PIKA_TESTING_PLUGINDIRS=plug-ins/common
* for example back with autotools, there used to be a file
* plug-ins/common/mkgen.pl if PIKA_TESTING_PLUGINDIRS=plug-ins/common
* Such files should be listed in PIKA_TESTING_PLUGINDIRS_BASENAME_IGNORES
*/
if (pika_plug_in_manager_ignore_plugin_basename (basename))
{

View File

@ -830,6 +830,56 @@ plug_in_proc_arg_deserialize (GScanner *scanner,
}
break;
case GP_PARAM_DEF_TYPE_CHOICE:
{
PikaChoice *choice;
gint n_choices;
if (! pika_scanner_parse_string (scanner,
&param_def.meta.m_choice.default_val) ||
! pika_scanner_parse_int (scanner, &n_choices))
{
token = G_TOKEN_INT;
goto error;
}
choice = pika_choice_new ();
param_def.meta.m_choice.choice = choice;
for (int i = 0; i < n_choices; i++)
{
gchar *nick = NULL;
gchar *label = NULL;
gchar *help = NULL;
gint id;
if (! pika_scanner_parse_string (scanner, &nick))
{
token = G_TOKEN_STRING;
goto error;
}
if (! pika_scanner_parse_int (scanner, &id))
{
token = G_TOKEN_INT;
goto error;
}
if (! pika_scanner_parse_string (scanner, &label) ||
! pika_scanner_parse_string (scanner, &help))
{
token = G_TOKEN_STRING;
g_free (nick);
g_free (label);
g_free (help);
goto error;
}
pika_choice_add (choice, nick, id, label, help);
g_free (nick);
g_free (label);
g_free (help);
}
}
break;
case GP_PARAM_DEF_TYPE_BOOLEAN:
if (! pika_scanner_parse_int (scanner,
&param_def.meta.m_boolean.default_val))
@ -944,6 +994,11 @@ plug_in_proc_arg_deserialize (GScanner *scanner,
case GP_PARAM_DEF_TYPE_ID:
break;
case GP_PARAM_DEF_TYPE_CHOICE:
g_clear_object (&param_def.meta.m_choice.choice);
g_free (param_def.meta.m_choice.default_val);
break;
case GP_PARAM_DEF_TYPE_ID_ARRAY:
g_free (param_def.meta.m_id_array.type_name);
break;
@ -1038,6 +1093,31 @@ plug_in_rc_write_proc_arg (PikaConfigWriter *writer,
param_def.meta.m_enum.default_val);
break;
case GP_PARAM_DEF_TYPE_CHOICE:
{
GList *choices;
choices = pika_choice_list_nicks (param_def.meta.m_choice.choice);
pika_config_writer_string (writer, param_def.meta.m_choice.default_val);
pika_config_writer_printf (writer, "%d", g_list_length (choices));
for (GList *iter = choices; iter; iter = iter->next)
{
const gchar *nick = iter->data;
const gchar *label;
const gchar *help;
gint id;
pika_choice_get_documentation (param_def.meta.m_choice.choice,
nick, &label, &help);
id = pika_choice_get_id (param_def.meta.m_choice.choice, nick);
pika_config_writer_string (writer, nick);
pika_config_writer_printf (writer, "%d", id);
pika_config_writer_string (writer, label);
pika_config_writer_string (writer, help);
}
}
break;
case GP_PARAM_DEF_TYPE_BOOLEAN:
pika_config_writer_printf (writer, "%d",
param_def.meta.m_boolean.default_val);