Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master See merge request GNOME/gtk!2250
This commit is contained in:
@@ -109,6 +109,7 @@ gtk_application_accels_set_accels_for_action (GtkApplicationAccels *accels,
|
||||
}
|
||||
|
||||
g_list_store_remove (G_LIST_STORE (accels->shortcuts), i);
|
||||
g_object_unref (shortcut_i);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,10 +62,12 @@ gtk_column_list_item_factory_setup (GtkListItemFactory *factory,
|
||||
{
|
||||
GtkColumnViewColumn *column = g_list_model_get_item (columns, i);
|
||||
|
||||
gtk_column_list_item_factory_add_column (self,
|
||||
gtk_column_list_item_factory_add_column (self,
|
||||
list_item->owner,
|
||||
column,
|
||||
FALSE);
|
||||
|
||||
g_object_unref (column);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +115,14 @@ gtk_column_view_sorter_dispose (GObject *object)
|
||||
{
|
||||
GtkColumnViewSorter *self = GTK_COLUMN_VIEW_SORTER (object);
|
||||
|
||||
/* The sorter is owned by the columview and is unreffed
|
||||
* after the columns, so the sequence must be empty at
|
||||
* this point.
|
||||
* The sorter can outlive the columview it comes from
|
||||
* (the model might still have a ref), but that does
|
||||
* not change the fact that all columns will be gone.
|
||||
*/
|
||||
g_assert (g_sequence_is_empty (self->sorters));
|
||||
g_clear_pointer (&self->sorters, g_sequence_free);
|
||||
|
||||
G_OBJECT_CLASS (gtk_column_view_sorter_parent_class)->dispose (object);
|
||||
|
||||
@@ -906,6 +906,7 @@ gtk_file_chooser_native_win32_show (GtkFileChooserNative *self)
|
||||
filechooser_win32_thread_data_free (data);
|
||||
return FALSE;
|
||||
}
|
||||
g_object_unref (filter);
|
||||
}
|
||||
self->current_filter = gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (self));
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ gtk_flatten_list_model_add_items (GtkFlattenListModel *self,
|
||||
G_CALLBACK (gtk_flatten_list_model_items_changed_cb),
|
||||
node);
|
||||
node->list = self;
|
||||
added +=g_list_model_get_n_items (node->model);
|
||||
added += g_list_model_get_n_items (node->model);
|
||||
}
|
||||
|
||||
return added;
|
||||
|
||||
@@ -767,6 +767,8 @@ add_application_shortcuts (GtkPlacesSidebar *sidebar)
|
||||
GFile *file = g_list_model_get_item (G_LIST_MODEL (sidebar->shortcuts), i);
|
||||
ShortcutData *data;
|
||||
|
||||
g_object_unref (file);
|
||||
|
||||
if (!should_show_file (sidebar, file))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -3009,6 +3009,8 @@ paper_size_changed (GtkDropDown *combo_box,
|
||||
gtk_window_present (GTK_WINDOW (custom_paper_dialog));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
g_object_unref (page_setup);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,11 @@ get (GListModel *model,
|
||||
guint position)
|
||||
{
|
||||
GObject *object = g_list_model_get_item (model, position);
|
||||
guint ret;
|
||||
g_assert (object != NULL);
|
||||
return GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
ret = GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
g_object_unref (object);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, _s); \
|
||||
g_free (_s); \
|
||||
} \
|
||||
g_object_unref (o1); \
|
||||
g_object_unref (o2); \
|
||||
} \
|
||||
}G_STMT_END
|
||||
|
||||
|
||||
@@ -29,8 +29,11 @@ get (GListModel *model,
|
||||
guint position)
|
||||
{
|
||||
GObject *object = g_list_model_get_item (model, position);
|
||||
guint ret;
|
||||
g_assert (object != NULL);
|
||||
return GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
ret = GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
g_object_unref (object);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
||||
@@ -69,6 +69,7 @@ model_to_string (GListModel *model)
|
||||
if (i > 0)
|
||||
g_string_append (string, " ");
|
||||
g_string_append_printf (string, "%u", get_with_parents (object));
|
||||
/* no unref since get_with_parents consumes the ref */
|
||||
}
|
||||
|
||||
return g_string_free (string, FALSE);
|
||||
|
||||
Reference in New Issue
Block a user