gui/sidebar: Enable editing playlist treeview entries
But only for user playlists. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
3f9372051f
commit
466d9ce291
|
@ -11,6 +11,7 @@ enum sidebar_columns {
|
|||
SB_IMAGE,
|
||||
SB_NAME,
|
||||
SB_TYPE,
|
||||
SB_EDITABLE,
|
||||
};
|
||||
|
||||
const gchar *SIDEBAR_SETTING = "gui.sidebar.pos";
|
||||
|
@ -33,9 +34,11 @@ static gchar *__gui_sidebar_size_str(struct playlist *playlist)
|
|||
static void __gui_sidebar_set(GtkTreeIter *iter, const gchar *name,
|
||||
const gchar *image, enum playlist_type_t type)
|
||||
{
|
||||
gtk_tree_store_set(gui_sidebar_store(), iter, SB_NAME, name,
|
||||
SB_IMAGE, image,
|
||||
SB_TYPE, type, -1);
|
||||
bool editable = (type == PL_USER);
|
||||
gtk_tree_store_set(gui_sidebar_store(), iter, SB_NAME, name,
|
||||
SB_IMAGE, image,
|
||||
SB_TYPE, type,
|
||||
SB_EDITABLE, editable, -1);
|
||||
}
|
||||
|
||||
static void __gui_sidebar_set_playlist(GtkTreeIter *iter,
|
||||
|
|
|
@ -106,6 +106,8 @@
|
|||
<column type="gchararray"/>
|
||||
<!-- column-name Type -->
|
||||
<column type="guint"/>
|
||||
<!-- column-name Editable -->
|
||||
<column type="gboolean"/>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkTreeModelFilter" id="sidebar_filter">
|
||||
|
@ -791,6 +793,7 @@ audio-volume-medium</property>
|
|||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
<attributes>
|
||||
<attribute name="editable">3</attribute>
|
||||
<attribute name="markup">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
|
|
Loading…
Reference in New Issue