summaryrefslogtreecommitdiff
path: root/plugins/gtkui/callbacks.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-02 14:16:13 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-02 14:16:13 +0200
commitd132b87d271260d77fbf3fb73324c72699c4ad03 (patch)
treeaf481ed287f1116185efc4eddf3dfe992e5d0d70 /plugins/gtkui/callbacks.c
parent88b4b6520c32066b088d2777372245aa8ba346f3 (diff)
added reload metadata context menu entry;
added invert selection and deselect all menu entries
Diffstat (limited to 'plugins/gtkui/callbacks.c')
-rw-r--r--plugins/gtkui/callbacks.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index 7e7c09fd..02abba62 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -1021,3 +1021,46 @@ on_toggle_eq (GtkMenuItem *menuitem,
}
+
+void
+on_deselect_all1_activate (GtkMenuItem *menuitem,
+ gpointer user_data)
+{
+ deadbeef->pl_lock ();
+ DB_playItem_t *it = deadbeef->pl_get_first (PL_MAIN);
+ while (it) {
+ if (deadbeef->pl_is_selected (it)) {
+ deadbeef->pl_set_selected (it, 0);
+ }
+ DB_playItem_t *next = deadbeef->pl_get_next (it, PL_MAIN);
+ deadbeef->pl_item_unref (it);
+ it = next;
+ }
+ deadbeef->pl_unlock ();
+ DdbListview *pl = DDB_LISTVIEW (lookup_widget (mainwin, "playlist"));
+ ddb_listview_refresh (pl, DDB_REFRESH_LIST | DDB_EXPOSE_LIST);
+}
+
+
+void
+on_invert_selection1_activate (GtkMenuItem *menuitem,
+ gpointer user_data)
+{
+ deadbeef->pl_lock ();
+ DB_playItem_t *it = deadbeef->pl_get_first (PL_MAIN);
+ while (it) {
+ if (deadbeef->pl_is_selected (it)) {
+ deadbeef->pl_set_selected (it, 0);
+ }
+ else {
+ deadbeef->pl_set_selected (it, 1);
+ }
+ DB_playItem_t *next = deadbeef->pl_get_next (it, PL_MAIN);
+ deadbeef->pl_item_unref (it);
+ it = next;
+ }
+ deadbeef->pl_unlock ();
+ DdbListview *pl = DDB_LISTVIEW (lookup_widget (mainwin, "playlist"));
+ ddb_listview_refresh (pl, DDB_REFRESH_LIST | DDB_EXPOSE_LIST);
+}
+