Commit f0cf16ee authored by Jonathan Matthew's avatar Jonathan Matthew

playlist-manager: remove gtk_dialog_run usage

parent ec669ae0
......@@ -857,26 +857,39 @@ rb_playlist_manager_set_automatic_playlist (RBPlaylistManager *mgr,
}
static void
rb_playlist_manager_cmd_new_automatic_playlist (GtkAction *action,
RBPlaylistManager *mgr)
new_automatic_playlist_response_cb (GtkDialog *dialog, int response, RBPlaylistManager *mgr)
{
RBQueryCreator *creator = RB_QUERY_CREATOR (rb_query_creator_new (mgr->priv->db));
RBSource *playlist;
switch (gtk_dialog_run (GTK_DIALOG (creator))) {
switch (response) {
case GTK_RESPONSE_NONE:
case GTK_RESPONSE_CLOSE:
gtk_widget_destroy (GTK_WIDGET (creator));
return;
}
break;
default:
playlist = rb_playlist_manager_new_playlist (mgr, _("New Playlist"), TRUE);
playlist = rb_playlist_manager_new_playlist (mgr, _("New Playlist"), TRUE);
rb_playlist_manager_set_automatic_playlist (mgr,
RB_AUTO_PLAYLIST_SOURCE (playlist),
RB_QUERY_CREATOR (dialog));
rb_playlist_manager_set_dirty (mgr, TRUE);
break;
}
rb_playlist_manager_set_automatic_playlist (mgr, RB_AUTO_PLAYLIST_SOURCE (playlist), creator);
gtk_widget_destroy (GTK_WIDGET (dialog));
}
rb_playlist_manager_set_dirty (mgr, TRUE);
static void
rb_playlist_manager_cmd_new_automatic_playlist (GtkAction *action,
RBPlaylistManager *mgr)
{
GtkWidget *creator = rb_query_creator_new (mgr->priv->db);
gtk_widget_show_all (creator);
gtk_widget_destroy (GTK_WIDGET (creator));
g_signal_connect (creator,
"response",
G_CALLBACK (new_automatic_playlist_response_cb),
mgr);
}
typedef struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment