forked from AuroraMiddleware/gtk
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master See merge request GNOME/gtk!1504
This commit is contained in:
commit
63126a1b3e
@ -96,8 +96,7 @@ add_entry (GtkApplicationAccels *accels,
|
||||
else
|
||||
n = 0;
|
||||
|
||||
new = g_new (const gchar *, n + 1 + 1);
|
||||
memcpy (new, old, n * sizeof (const gchar *));
|
||||
new = g_renew (const gchar *, old, n + 1 + 1);
|
||||
new[n] = action_and_target;
|
||||
new[n + 1] = NULL;
|
||||
|
||||
|
@ -2950,7 +2950,9 @@ gtk_cell_area_add_focus_sibling (GtkCellArea *area,
|
||||
siblings = g_hash_table_lookup (priv->focus_siblings, renderer);
|
||||
|
||||
if (siblings)
|
||||
siblings = g_list_append (siblings, sibling);
|
||||
{
|
||||
G_GNUC_UNUSED GList *unused = g_list_append (siblings, sibling);
|
||||
}
|
||||
else
|
||||
{
|
||||
siblings = g_list_append (siblings, sibling);
|
||||
|
@ -1448,10 +1448,34 @@ gboolean
|
||||
gtk_list_store_iter_is_valid (GtkListStore *list_store,
|
||||
GtkTreeIter *iter)
|
||||
{
|
||||
GtkListStorePrivate *priv;
|
||||
GSequenceIter *seq_iter;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_LIST_STORE (list_store), FALSE);
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
|
||||
return iter_is_valid (iter, list_store);
|
||||
/* can't use iter_is_valid() here, because iter might point
|
||||
* to random memory.
|
||||
*
|
||||
* We MUST NOT dereference it.
|
||||
*/
|
||||
|
||||
priv = list_store->priv;
|
||||
|
||||
if (iter == NULL ||
|
||||
iter->user_data == NULL ||
|
||||
priv->stamp != iter->stamp)
|
||||
return FALSE;
|
||||
|
||||
for (seq_iter = g_sequence_get_begin_iter (priv->seq);
|
||||
!g_sequence_iter_is_end (seq_iter);
|
||||
seq_iter = g_sequence_iter_next (seq_iter))
|
||||
{
|
||||
if (seq_iter == iter->user_data)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean real_gtk_list_store_row_draggable (GtkTreeDragSource *drag_source,
|
||||
|
@ -201,8 +201,6 @@ gtk_path_bar_init (GtkPathBar *path_bar)
|
||||
GtkPathBarPrivate *priv = gtk_path_bar_get_instance_private (path_bar);
|
||||
GtkEventController *controller;
|
||||
|
||||
priv = gtk_path_bar_get_instance_private (path_bar);
|
||||
|
||||
priv->up_slider_button = gtk_button_new_from_icon_name ("pan-start-symbolic");
|
||||
gtk_widget_set_parent (priv->up_slider_button, GTK_WIDGET (path_bar));
|
||||
|
||||
|
@ -1301,6 +1301,7 @@ stack_child_visibility_notify_cb (GObject *obj,
|
||||
GtkStackPage *child_info;
|
||||
|
||||
child_info = find_child_info_for_widget (stack, child);
|
||||
g_return_if_fail (child_info != NULL);
|
||||
|
||||
if (priv->visible_child == NULL &&
|
||||
gtk_widget_get_visible (child))
|
||||
|
@ -802,12 +802,8 @@ gtk_tree_path_append_index (GtkTreePath *path,
|
||||
|
||||
if (path->depth == path->alloc)
|
||||
{
|
||||
gint *indices;
|
||||
path->alloc = MAX (path->alloc * 2, 1);
|
||||
indices = g_new (gint, path->alloc);
|
||||
memcpy (indices, path->indices, path->depth * sizeof (gint));
|
||||
g_free (path->indices);
|
||||
path->indices = indices;
|
||||
path->indices = g_renew (gint, path->indices, path->alloc);
|
||||
}
|
||||
|
||||
path->depth += 1;
|
||||
|
@ -2823,7 +2823,6 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture,
|
||||
GList *list;
|
||||
gboolean rtl;
|
||||
|
||||
rtl = (_gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
|
||||
gtk_tree_view_stop_editing (tree_view, FALSE);
|
||||
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
|
||||
|
||||
@ -7379,8 +7378,6 @@ gtk_tree_view_drag_data_received (GObject *source,
|
||||
gboolean drop_append_mode;
|
||||
const GValue *value;
|
||||
|
||||
suggested_action = 0;
|
||||
|
||||
value = gdk_drop_read_value_finish (drop, result, NULL);
|
||||
if (value == NULL)
|
||||
return;
|
||||
|
@ -1215,7 +1215,7 @@ rewrite_paned_child (Element *element,
|
||||
if (g_str_equal (elt2->element_name, "property") &&
|
||||
has_attribute (elt2, "name", "resize"))
|
||||
resize = elt2;
|
||||
if (g_str_equal (elt2->element_name, "property") &&
|
||||
else if (g_str_equal (elt2->element_name, "property") &&
|
||||
has_attribute (elt2, "name", "shrink"))
|
||||
shrink = elt2;
|
||||
}
|
||||
|
@ -1019,8 +1019,8 @@ gtk_real_model_types_iter_next (GtkTreeModel *tree_model,
|
||||
|
||||
if (children[i] != G_TYPE_INVALID)
|
||||
{
|
||||
g_free (children);
|
||||
iter->user_data = GINT_TO_POINTER (children[i]);
|
||||
g_free (children);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
|
@ -379,10 +379,8 @@ test_introspection (void)
|
||||
{
|
||||
g_assert (expected[i].owner == owner);
|
||||
g_assert (strcmp (expected[i].name, name) == 0);
|
||||
g_assert ((expected[i].params == NULL && params == NULL) ||
|
||||
strcmp (expected[i].params, g_variant_type_peek_string (params)) == 0);
|
||||
g_assert ((expected[i].property == NULL && property == NULL) ||
|
||||
strcmp (expected[i].property, property) == 0);
|
||||
g_assert (g_strcmp0 (expected[i].params, params ? g_variant_type_peek_string (params) : NULL) == 0);
|
||||
g_assert (g_strcmp0 (expected[i].property, property) == 0);
|
||||
i++;
|
||||
}
|
||||
g_assert (i == G_N_ELEMENTS (expected));
|
||||
|
@ -172,7 +172,7 @@ get_test_file (const char *test_file,
|
||||
|
||||
get_components_of_test_file (test_file, &dir, &base);
|
||||
|
||||
file = g_string_new (dir);
|
||||
g_string_append (file, dir);
|
||||
g_string_append (file, G_DIR_SEPARATOR_S);
|
||||
g_string_append (file, base);
|
||||
g_string_append (file, extension);
|
||||
|
Loading…
Reference in New Issue
Block a user