From 02f5b1365063f4d4449e8f5234c12a0fbe453561 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Mon, 2 May 2016 11:16:21 -0400 Subject: [PATCH] gui/collection: Remove image size from the collection liststore This is to match the playlist treeview. Signed-off-by: Anna Schumaker --- gui/collection.c | 11 ++++------- share/ocarina/ocarina6.glade | 14 +++++++------- tests/gui/collection.c | 4 ++-- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/gui/collection.c b/gui/collection.c index 6152d603..582bc4dd 100644 --- a/gui/collection.c +++ b/gui/collection.c @@ -10,7 +10,6 @@ enum collection_sidebar_columns { C_SB_IMAGE, - C_SB_IMAGE_SZ, C_SB_ENABLED, C_SB_SHOW_ENABLED, C_SB_PATH, @@ -20,10 +19,10 @@ enum collection_sidebar_columns { static GtkTreeModel *c_model; static void __collection_set_header(GtkTreeIter *iter, const gchar *image, - GtkIconSize size, const gchar *text) + const gchar *text) { gtk_tree_store_set(GTK_TREE_STORE(c_model), iter, C_SB_IMAGE, image, - C_SB_IMAGE_SZ, size, C_SB_PATH, text, -1); + C_SB_PATH, text, -1); } static void __collection_set_library(GtkTreeIter *iter, struct library *library) @@ -158,9 +157,7 @@ void gui_collection_init() /* Add "Collection" header. */ gtk_tree_store_insert(GTK_TREE_STORE(c_model), &parent, NULL, -1); - __collection_set_header(&parent, "system-file-manager", - GTK_ICON_SIZE_LARGE_TOOLBAR, - "Collection"); + __collection_set_header(&parent, "system-file-manager", "Collection"); /* Add library paths. */ db_for_each(library, next, library_db_get()) { @@ -170,7 +167,7 @@ void gui_collection_init() /* Add "Add new Library" entry. */ gtk_tree_store_insert(GTK_TREE_STORE(c_model), &iter, &parent, -1); - __collection_set_header(&iter, "folder-new", GTK_ICON_SIZE_MENU, + __collection_set_header(&iter, "folder-new", "<Add new path>"); treeview = GTK_TREE_VIEW(gui_builder_widget("o_collection_view")); diff --git a/share/ocarina/ocarina6.glade b/share/ocarina/ocarina6.glade index 0ff4a7b2..ce461b4f 100644 --- a/share/ocarina/ocarina6.glade +++ b/share/ocarina/ocarina6.glade @@ -214,8 +214,6 @@ - - @@ -764,10 +762,11 @@ Image - + + 1 + 0 - 1 @@ -780,8 +779,8 @@ - 3 - 2 + 2 + 1 @@ -792,7 +791,8 @@ - 4 + 3 + 3 diff --git a/tests/gui/collection.c b/tests/gui/collection.c index a80a460f..40c1e739 100644 --- a/tests/gui/collection.c +++ b/tests/gui/collection.c @@ -70,7 +70,7 @@ static void test_collection_sidebar() gtk_tree_model_get_iter_first(model, &iter); test_equal(gtk_tree_model_iter_n_children(model, &iter), 2); gtk_tree_model_iter_nth_child(model, &child, &iter, 0); - gtk_tree_model_get(model, &child, 5, &library, -1); + gtk_tree_model_get(model, &child, 4, &library, -1); test_equal((void *)library, (void *)library_get(0)); /* Run two idle events to scan the added path. */ @@ -85,7 +85,7 @@ static void test_collection_sidebar() gtk_tree_model_get_iter_first(model, &iter); test_equal(gtk_tree_model_iter_n_children(model, &iter), 2); gtk_tree_model_iter_nth_child(model, &child, &iter, 0); - gtk_tree_model_get(model, &child, 5, &library, -1); + gtk_tree_model_get(model, &child, 4, &library, -1); test_equal((void *)library, (void *)library_get(0)); path = gtk_tree_model_get_path(model, &child);