Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #3763

See merge request GNOME/gtk!3308
This commit is contained in:
Matthias Clasen 2021-03-17 12:32:45 +00:00
commit cfe8c0e187
7 changed files with 18 additions and 15 deletions

View File

@ -913,6 +913,8 @@ gtk_check_button_set_label (GtkCheckButton *self,
* Setting the group of a check button also changes the css name of the
* indicator widget's CSS node to 'radio'.
*
* Setting up groups in a cycle leads to undefined behavior.
*
* Note that the same effect can be achieved via the [interface@Gtk.Actionable]
* API, by using the same action with parameter type and state type 's'
* for all buttons in the group, and giving each button its own target
@ -926,6 +928,7 @@ gtk_check_button_set_group (GtkCheckButton *self,
GtkCheckButtonPrivate *group_priv = gtk_check_button_get_instance_private (group);
g_return_if_fail (GTK_IS_CHECK_BUTTON (self));
g_return_if_fail (self != group);
if (!group)
{

View File

@ -494,14 +494,14 @@ gtk_css_shadow_value_parse (GtkCssParser *parser,
return gtk_css_shadow_value_new_none ();
do {
if (n_shadows == MAX_SHADOWS)
{
gtk_css_parser_error_syntax (parser, "Not more than %d shadows supported", MAX_SHADOWS);
goto fail;
}
if (gtk_css_shadow_value_parse_one (parser, box_shadow_mode, &shadows[n_shadows]))
n_shadows++;
if (n_shadows > MAX_SHADOWS)
{
gtk_css_parser_error_syntax (parser, "Not more than 64 shadows supported");
goto fail;
}
} while (gtk_css_parser_try_token (parser, GTK_CSS_TOKEN_COMMA));
return gtk_css_shadow_value_new (shadows, n_shadows, FALSE);

View File

@ -698,6 +698,7 @@ gtk_distribute_natural_allocation (int extra_space,
int i;
g_return_val_if_fail (extra_space >= 0, 0);
g_return_val_if_fail (n_requested_sizes > 0, 0);
spreading = g_newa (guint, n_requested_sizes);

View File

@ -473,6 +473,8 @@ gtk_toggle_button_toggled (GtkToggleButton *toggle_button)
* In a group of multiple toggle buttons, only one button can be active
* at a time.
*
* Setting up groups in a cycle leads to undefined behavior.
*
* Note that the same effect can be achieved via the [interface@Gtk.Actionable]
* API, by using the same action with parameter type and state type 's'
* for all buttons in the group, and giving each button its own target
@ -486,6 +488,7 @@ gtk_toggle_button_set_group (GtkToggleButton *toggle_button,
GtkToggleButtonPrivate *group_priv = gtk_toggle_button_get_instance_private (group);
g_return_if_fail (GTK_IS_TOGGLE_BUTTON (toggle_button));
g_return_if_fail (toggle_button != group);
if (!group)
{

View File

@ -2471,7 +2471,9 @@ gtk_tree_store_move (GtkTreeStore *tree_store,
GNode *parent, *node, *a, *b, *tmp, *tmp_a, *tmp_b;
int old_pos, new_pos, length, i, *order;
GtkTreePath *path = NULL, *tmppath, *pos_path = NULL;
GtkTreeIter parent_iter, dst_a, dst_b;
GtkTreeIter parent_iter = { 0, };
GtkTreeIter dst_a = { 0, };
GtkTreeIter dst_b = { 0, };
int depth = 0;
gboolean handle_b = TRUE;

View File

@ -103,7 +103,7 @@ char **
g_io_module_query (void)
{
char *eps[] = {
GTK_PRINT_BACKEND_EXTENSION_POINT_NAME,
(char *)GTK_PRINT_BACKEND_EXTENSION_POINT_NAME,
NULL
};
@ -399,13 +399,12 @@ lpr_printer_get_options (GtkPrinter *printer,
GtkPrinterOptionSet *set;
GtkPrinterOption *option;
const char *command;
char *n_up[] = {"1", "2", "4", "6", "9", "16" };
const char *n_up[] = {"1", "2", "4", "6", "9", "16" };
set = gtk_printer_option_set_new ();
option = gtk_printer_option_new ("gtk-n-up", _("Pages Per Sheet"), GTK_PRINTER_OPTION_TYPE_PICKONE);
gtk_printer_option_choices_from_array (option, G_N_ELEMENTS (n_up),
(char **)n_up, (char **)n_up);
gtk_printer_option_choices_from_array (option, G_N_ELEMENTS (n_up), n_up, n_up);
gtk_printer_option_set (option, "1");
gtk_printer_option_set_add (set, option);
g_object_unref (option);

View File

@ -1,5 +0,0 @@
[wrap-git]
directory=gtk-doc
url=https://gitlab.gnome.org/GNOME/gtk-doc.git
revision=master
depth=1