From: Darren S. <li...@yo...> - 2007-01-30 18:23:44
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1170177693 0 # Node ID 430f3c84e442ab29b79bc321814aef29adb175a4 # Parent 0edfaa9555ca77af1db519c9c7587dd532555c2f Shade the playlist's prev/next buttons if there are < 2 playlist items. diff -r 430f3c84e442ab29b79bc321814aef29adb175a4 -r 0edfaa9555ca77af1db519c9c7587dd532555c2f ChangeLog --- a/ChangeLog Tue Jan 30 17:21:33 2007 +0000 +++ b/ChangeLog Tue Jan 30 00:12:45 2007 +0000 @@ -12,6 +12,8 @@ 0.5.11: 2007/??/?? playback control menu, right click for the main menu. Also middle to show or hide the main window and its toolbar (note that other windows will remain visible). + * Make the prev/next buttons in the playlist window shaded if there + are fewer than 2 playlist items (previously, if there are none). * The plugin chain configuration menu items are duplicated in File->Configure. * Fixed a hang which occurs when a stream ends and some modal diff -r 430f3c84e442ab29b79bc321814aef29adb175a4 -r 0edfaa9555ca77af1db519c9c7587dd532555c2f src/playlist.c --- a/src/playlist.c Tue Jan 30 17:21:33 2007 +0000 +++ b/src/playlist.c Tue Jan 30 00:12:45 2007 +0000 @@ -2164,10 +2164,14 @@ static void check_list_empty (void) static void check_list_empty (void) { static const char *const items[] = { - "saveas", "clear", "prev", "next", NULL + "saveas", "clear", NULL }; - ui_mark_active (pl_ui, items, - gtk_tree_model_iter_n_children (pl_model, NULL)); + static const char *const one_items[] = { + "prev", "next", NULL + }; + unsigned int count = gtk_tree_model_iter_n_children (pl_model, NULL); + ui_mark_active (pl_ui, items, count != 0); + ui_mark_active (pl_ui, one_items, count > 1); ui_set_status (UI_CURRENT_STATE); } |