[gnome-photos/wip/rishi/misc-fixes: 2/13] organize-collection-model, view-model: Simplify code
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/misc-fixes: 2/13] organize-collection-model, view-model: Simplify code
- Date: Wed, 30 Dec 2015 11:47:50 +0000 (UTC)
commit 9a9450accb37842f62c45d54b644ad7e16f9db5b
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Dec 29 10:38:04 2015 +0100
organize-collection-model, view-model: Simplify code
src/photos-organize-collection-model.c | 2 +-
src/photos-view-model.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-organize-collection-model.c b/src/photos-organize-collection-model.c
index 669441e..ea4781c 100644
--- a/src/photos-organize-collection-model.c
+++ b/src/photos-organize-collection-model.c
@@ -210,7 +210,7 @@ photos_organize_collection_model_init (PhotosOrganizeCollectionModel *self)
app = g_application_get_default ();
state = photos_search_context_get_state (PHOTOS_SEARCH_CONTEXT (app));
- gtk_list_store_set_column_types (GTK_LIST_STORE (self), sizeof (columns) / sizeof (columns[0]), columns);
+ gtk_list_store_set_column_types (GTK_LIST_STORE (self), G_N_ELEMENTS (columns), columns);
priv->manager = g_object_ref (state->item_mngr);
diff --git a/src/photos-view-model.c b/src/photos-view-model.c
index 9a3d043..9f05c1f 100644
--- a/src/photos-view-model.c
+++ b/src/photos-view-model.c
@@ -510,7 +510,7 @@ photos_view_model_init (PhotosViewModel *self)
app = g_application_get_default ();
state = photos_search_context_get_state (PHOTOS_SEARCH_CONTEXT (app));
- gtk_list_store_set_column_types (GTK_LIST_STORE (self), sizeof (columns) / sizeof (columns[0]), columns);
+ gtk_list_store_set_column_types (GTK_LIST_STORE (self), G_N_ELEMENTS (columns), columns);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (self), PHOTOS_VIEW_MODEL_MTIME,
GTK_SORT_DESCENDING);
priv->info_updated_ids = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]