diff options
author | waker <wakeroid@gmail.com> | 2009-08-11 21:46:09 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-08-11 21:46:09 +0200 |
commit | b338d34b68b138f05b2f2ef6feef2df9d08d61bd (patch) | |
tree | 3385ea40ad5722f3c9c6f693db2eaaa7e6612ae0 /callbacks.c | |
parent | 245463dbe00a95e3c1ba3d841e31a63509883915 (diff) |
better handling of "end of playlist"
Diffstat (limited to 'callbacks.c')
-rw-r--r-- | callbacks.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/callbacks.c b/callbacks.c index 7c3f6644..bc8b8b43 100644 --- a/callbacks.c +++ b/callbacks.c @@ -290,7 +290,13 @@ void on_clear1_activate (GtkMenuItem *menuitem, gpointer user_data) { - + pl_free (); + gtkplaylist_t *ps = &main_playlist; + GtkWidget *widget = ps->playlist; + gtkpl_setup_scrollbar (ps); + gtkpl_draw_playlist (ps, 0, 0, widget->allocation.width, widget->allocation.height); + gtkpl_expose (ps, 0, 0, widget->allocation.width, widget->allocation.height); + search_refresh (); } @@ -298,7 +304,11 @@ void on_select_all1_activate (GtkMenuItem *menuitem, gpointer user_data) { - + pl_select_all (); + gtkplaylist_t *ps = &main_playlist; + GtkWidget *widget = ps->playlist; + gtkpl_draw_playlist (ps, 0, 0, widget->allocation.width, widget->allocation.height); + gdk_draw_drawable (widget->window, widget->style->black_gc, ps->backbuf, 0, 0, 0, 0, widget->allocation.width, widget->allocation.height); } @@ -306,7 +316,13 @@ void on_remove1_activate (GtkMenuItem *menuitem, gpointer user_data) { - + gtkplaylist_t *ps = &main_playlist; + GtkWidget *widget = ps->playlist; + pl_delete_selected (); + gtkpl_setup_scrollbar (ps); + gtkpl_draw_playlist (ps, 0, 0, widget->allocation.width, widget->allocation.height); + gtkpl_expose (ps, 0, 0, widget->allocation.width, widget->allocation.height); + search_refresh (); } @@ -314,7 +330,13 @@ void on_crop1_activate (GtkMenuItem *menuitem, gpointer user_data) { - + gtkplaylist_t *ps = &main_playlist; + GtkWidget *widget = ps->playlist; + pl_crop_selected (); + gtkpl_setup_scrollbar (ps); + gtkpl_draw_playlist (ps, 0, 0, widget->allocation.width, widget->allocation.height); + gtkpl_expose (ps, 0, 0, widget->allocation.width, widget->allocation.height); + search_refresh (); } |