gui/playlists/user: Respond to the "editing-started" signal
We use this to set the playlist name in the provided GtkEntry, clearing out the number of tracks Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
466d9ce291
commit
fac383e9fc
|
@ -38,6 +38,21 @@ static bool __gui_pl_user_init_idle()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __gui_pl_user_editing_started(GtkCellRenderer *renderer,
|
||||||
|
GtkCellEditable *editable,
|
||||||
|
gchar *path, gpointer data)
|
||||||
|
{
|
||||||
|
struct playlist *playlist;
|
||||||
|
GtkTreeIter iter;
|
||||||
|
|
||||||
|
if (!gui_sidebar_iter_from_string(path, &iter))
|
||||||
|
return;
|
||||||
|
|
||||||
|
playlist = gui_sidebar_iter_playlist(&iter);
|
||||||
|
if (GTK_IS_ENTRY(editable))
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(editable), playlist->pl_name);
|
||||||
|
}
|
||||||
|
|
||||||
void gui_pl_user_init()
|
void gui_pl_user_init()
|
||||||
{
|
{
|
||||||
idle_schedule(IDLE_SYNC, __gui_pl_user_init_idle, NULL);
|
idle_schedule(IDLE_SYNC, __gui_pl_user_init_idle, NULL);
|
||||||
|
|
|
@ -791,7 +791,9 @@ audio-volume-medium</property>
|
||||||
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
|
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
|
||||||
<property name="title" translatable="yes">column</property>
|
<property name="title" translatable="yes">column</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
<object class="GtkCellRendererText" id="cellrenderertext1">
|
||||||
|
<signal name="editing-started" handler="__gui_pl_user_editing_started" swapped="no"/>
|
||||||
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="editable">3</attribute>
|
<attribute name="editable">3</attribute>
|
||||||
<attribute name="markup">1</attribute>
|
<attribute name="markup">1</attribute>
|
||||||
|
|
Loading…
Reference in New Issue