gui/playlist: Remove image size from the playlist liststore

It's easier just to set all images to have the same size, rather than
making the header's image slightly larger.

Fixes #39: Remove GtkIconSize from Playlist treeview
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2016-04-29 14:58:40 -04:00
parent b4c81a4441
commit 79f79405a8
2 changed files with 8 additions and 12 deletions

View File

@ -8,7 +8,6 @@
enum playlist_sidebar_columns {
P_SB_IMAGE,
P_SB_IMAGE_SZ,
P_SB_NAME,
P_SB_PLAYLIST,
};
@ -16,13 +15,11 @@ enum playlist_sidebar_columns {
static GtkTreeStore *p_store;
static enum playlist_t p_cur;
static void __playlist_set(GtkTreeIter *iter, const gchar *name,
const gchar *image, GtkIconSize size,
enum playlist_t plist)
static void __playlist_set(GtkTreeIter *iter, const gchar *name,
const gchar *image, enum playlist_t plist)
{
gtk_tree_store_set(p_store, iter, P_SB_NAME, name,
P_SB_IMAGE, image,
P_SB_IMAGE_SZ, size,
P_SB_PLAYLIST, plist, -1);
}
@ -31,7 +28,7 @@ static void __playlist_add(GtkTreeIter *parent, const gchar *name,
{
GtkTreeIter iter;
gtk_tree_store_insert(p_store, &iter, parent, -1);
__playlist_set(&iter, name, image, GTK_ICON_SIZE_MENU, plist);
__playlist_set(&iter, name, image, plist);
}
void __playlist_selection_changed(GtkTreeSelection *selection, gpointer data)
@ -60,7 +57,7 @@ void gui_playlist_init()
gtk_tree_store_insert(p_store, &parent, NULL, -1);
gtk_tree_store_insert(p_store, &parent, NULL, -1);
__playlist_set(&parent, "<span size='large'>Playlists</span>",
"emblem-documents", GTK_ICON_SIZE_LARGE_TOOLBAR, 0);
"emblem-documents", 0);
/* Add playlists. */
__playlist_add(&parent, "Favorites", "emblem-favorite", PL_FAVORITED);

View File

@ -230,8 +230,6 @@
<columns>
<!-- column-name Image -->
<column type="gchararray"/>
<!-- column-name ImageSize -->
<column type="GtkIconSize"/>
<!-- column-name Name -->
<column type="gchararray"/>
<!-- column-name Playlist -->
@ -719,10 +717,11 @@
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="title" translatable="yes">Image</property>
<child>
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf2"/>
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf2">
<property name="stock_size">1</property>
</object>
<attributes>
<attribute name="icon-name">0</attribute>
<attribute name="stock-size">1</attribute>
</attributes>
</child>
</object>
@ -733,7 +732,7 @@
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
<attributes>
<attribute name="markup">2</attribute>
<attribute name="markup">1</attribute>
</attributes>
</child>
</object>