diff options
-rw-r--r-- | plugins/gtkui/actionhandlers.c | 8 | ||||
-rw-r--r-- | plugins/gtkui/actionhandlers.h | 3 | ||||
-rw-r--r-- | plugins/gtkui/gtkui.c | 4 | ||||
-rw-r--r-- | plugins/gtkui/plcommon.c | 4 |
4 files changed, 14 insertions, 5 deletions
diff --git a/plugins/gtkui/actionhandlers.c b/plugins/gtkui/actionhandlers.c index 4c08f070..e3be709a 100644 --- a/plugins/gtkui/actionhandlers.c +++ b/plugins/gtkui/actionhandlers.c @@ -876,3 +876,11 @@ action_sort_custom_handler (DB_plugin_action_t *act, int ctx) { gdk_threads_add_idle (action_sort_custom_handler_cb, NULL); return 0; } + +int +action_crop_selected_handler (DB_plugin_action_t *act, int ctx) { + deadbeef->pl_crop_selected (); + deadbeef->pl_save_all (); + deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0); + return 0; +} diff --git a/plugins/gtkui/actionhandlers.h b/plugins/gtkui/actionhandlers.h index 77084c7e..e649c1cd 100644 --- a/plugins/gtkui/actionhandlers.h +++ b/plugins/gtkui/actionhandlers.h @@ -174,4 +174,7 @@ action_sort_custom_handler_cb (void *data); int action_sort_custom_handler (DB_plugin_action_t *act, int ctx); +int +action_crop_selected_handler (DB_plugin_action_t *act, int ctx); + #endif diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index e77bb030..dd595d3b 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -1446,10 +1446,10 @@ static DB_plugin_action_t action_sort_custom = { }; static DB_plugin_action_t action_crop_selected = { - .title = "Edit/[stub] Crop Selected", + .title = "Edit/Crop Selected", .name = "crop_selected", .flags = DB_ACTION_COMMON, - .callback = NULL, + .callback = action_crop_selected_handler, .next = &action_sort_custom }; diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c index 0f4d565c..143a69f2 100644 --- a/plugins/gtkui/plcommon.c +++ b/plugins/gtkui/plcommon.c @@ -319,9 +319,7 @@ void on_crop1_activate (GtkMenuItem *menuitem, gpointer user_data) { - deadbeef->pl_crop_selected (); - deadbeef->pl_save_all (); - deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0); + action_crop_selected_handler (NULL, 0); } void |