summaryrefslogtreecommitdiff
path: root/plugins/gtkui/plcommon.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-11-18 20:04:40 +0100
committerGravatar waker <wakeroid@gmail.com>2012-11-18 20:04:40 +0100
commitc0af023f30195806d07b735a027875eecf0c568d (patch)
tree1fb5262f23d3a3e4c0ac0e689bd2b4ef8d69f60d /plugins/gtkui/plcommon.c
parent10c19706ba4a538231cc81771fd815e55cde428f (diff)
gtkui: fixed dialog hanging issues, hotkeys WIP
Diffstat (limited to 'plugins/gtkui/plcommon.c')
-rw-r--r--plugins/gtkui/plcommon.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c
index e2399333..77127bea 100644
--- a/plugins/gtkui/plcommon.c
+++ b/plugins/gtkui/plcommon.c
@@ -337,38 +337,7 @@ void
on_remove_from_disk_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- GtkWidget *widget = GTK_WIDGET (menuitem);
-
- if (deadbeef->conf_get_int ("gtkui.delete_files_ask", 1)) {
- GtkWidget *dlg = gtk_message_dialog_new (GTK_WINDOW (mainwin), GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, _("Delete files from disk"));
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dlg), _("Files will be lost. Proceed?\n(This dialog can be turned off in GTKUI plugin settings)"));
- gtk_window_set_title (GTK_WINDOW (dlg), _("Warning"));
-
- int response = gtk_dialog_run (GTK_DIALOG (dlg));
- gtk_widget_destroy (dlg);
- if (response != GTK_RESPONSE_YES) {
- return;
- }
- }
-
- deadbeef->pl_lock ();
-
- DB_playItem_t *it = deadbeef->pl_get_first (PL_MAIN);
- while (it) {
- const char *uri = deadbeef->pl_find_meta (it, ":URI");
- if (deadbeef->pl_is_selected (it) && deadbeef->is_local_file (uri)) {
- unlink (uri);
- }
- DB_playItem_t *next = deadbeef->pl_get_next (it, PL_MAIN);
- deadbeef->pl_item_unref (it);
- it = next;
- }
-
- int cursor = deadbeef->pl_delete_selected ();
- deadbeef->pl_save_all ();
- deadbeef->pl_unlock ();
-
- deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
+ action_delete_from_disk_handler_cb ((void *)(intptr_t)DDB_ACTION_CTX_SELECTION);
}
void