gui/collection: Remove image size from the collection liststore
This is to match the playlist treeview. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
5c34576e70
commit
02f5b13650
|
@ -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,
|
||||
"<span size='large'>Collection</span>");
|
||||
__collection_set_header(&parent, "system-file-manager", "<big>Collection</big>");
|
||||
|
||||
/* 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",
|
||||
"<span style='italic'><Add new path></span>");
|
||||
|
||||
treeview = GTK_TREE_VIEW(gui_builder_widget("o_collection_view"));
|
||||
|
|
|
@ -214,8 +214,6 @@
|
|||
<columns>
|
||||
<!-- column-name Image -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name ImageSize -->
|
||||
<column type="GtkIconSize"/>
|
||||
<!-- column-name Enabled -->
|
||||
<column type="gboolean"/>
|
||||
<!-- column-name ShowEnabled -->
|
||||
|
@ -764,10 +762,11 @@
|
|||
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
||||
<property name="title" translatable="yes">Image</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
|
||||
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1">
|
||||
<property name="stock_size">1</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="icon-name">0</attribute>
|
||||
<attribute name="stock-size">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -780,8 +779,8 @@
|
|||
<signal name="toggled" handler="__collection_toggled" swapped="no"/>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="visible">3</attribute>
|
||||
<attribute name="active">2</attribute>
|
||||
<attribute name="visible">2</attribute>
|
||||
<attribute name="active">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -792,7 +791,8 @@
|
|||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext3"/>
|
||||
<attributes>
|
||||
<attribute name="markup">4</attribute>
|
||||
<attribute name="markup">3</attribute>
|
||||
<attribute name="text">3</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue