Mercurial > audlegacy
changeset 3135:7cdcf8ab08da trunk
replace PlaylistSlider with UiSkinnedPlaylistSlider
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sat, 21 Jul 2007 20:07:30 +0200 |
parents | 10c42e059460 |
children | cfd7f8d144fa |
files | src/audacious/Makefile src/audacious/ui_playlist.c src/audacious/ui_playlist.h src/audacious/widgets/Makefile src/audacious/widgets/widgetcore.h |
diffstat | 5 files changed, 26 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/Makefile Sat Jul 21 10:04:29 2007 +0200 +++ b/src/audacious/Makefile Sat Jul 21 20:07:30 2007 +0200 @@ -120,6 +120,7 @@ ui_skinned_monostereo.c \ ui_skinned_equalizer_slider.c \ ui_skinned_equalizer_graph.c \ + ui_skinned_playlist_slider.c \ ui_skinselector.c \ ui_urlopener.c \ util.c \
--- a/src/audacious/ui_playlist.c Sat Jul 21 10:04:29 2007 +0200 +++ b/src/audacious/ui_playlist.c Sat Jul 21 20:07:30 2007 +0200 @@ -58,6 +58,7 @@ #include "ui_skinned_window.h" #include "ui_skinned_button.h" #include "ui_skinned_textbox.h" +#include "ui_skinned_playlist_slider.h" #include "icons-stock.h" #include "images/audacious_playlist.xpm" @@ -75,7 +76,7 @@ static GtkWidget *playlistwin_infopopup = NULL; static guint playlistwin_infopopup_sid = 0; -static PlaylistSlider *playlistwin_slider = NULL; +static GtkWidget *playlistwin_slider = NULL; static GtkWidget *playlistwin_time_min, *playlistwin_time_sec; static GtkWidget *playlistwin_info, *playlistwin_sinfo; static GtkWidget *playlistwin_srew, *playlistwin_splay; @@ -239,6 +240,22 @@ } gint +playlistwin_list_get_visible_count(void) +{ + if (playlistwin_list) + return playlistwin_list->pl_num_visible; + return (-1); +} + +gint +playlistwin_list_get_first(void) +{ + if (playlistwin_list) + return playlistwin_list->pl_first; + return (-1); +} + +gint playlistwin_get_toprow(void) { if (playlistwin_list) @@ -261,7 +278,7 @@ g_return_if_fail(playlistwin_list); widget_draw(WIDGET(playlistwin_list)); - widget_draw(WIDGET(playlistwin_slider)); + gtk_widget_queue_draw(playlistwin_slider); playlistwin_update_info(playlist); playlistwin_update_sinfo(playlist); } @@ -376,7 +393,6 @@ playlistwin_set_mask(); widget_draw(WIDGET(playlistwin_list)); - widget_draw(WIDGET(playlistwin_slider)); draw_playlist_window(TRUE); } @@ -656,8 +672,8 @@ widget_resize_relative(WIDGET(playlistwin_list), dx, dy); - widget_move_relative(WIDGET(playlistwin_slider), dx, 0); - widget_resize_relative(WIDGET(playlistwin_slider), 0, dy); + ui_skinned_playlist_slider_move_relative(playlistwin_slider, dx); + ui_skinned_playlist_slider_resize_relative(playlistwin_slider, dy); ui_skinned_textbox_resize_relative(playlistwin_sinfo, dx, 0); playlistwin_update_sinfo(playlist_get_active()); @@ -1589,11 +1605,8 @@ ui_skinned_window_widgetlist_associate(playlistwin, WIDGET(playlistwin_list)); /* playlist list box slider */ - playlistwin_slider = - create_playlistslider(&playlistwin_wlist, playlistwin_bg, - SKINNED_WINDOW(playlistwin)->gc, playlistwin_get_width() - 15, - 20, cfg.playlist_height - 58, playlistwin_list); - ui_skinned_window_widgetlist_associate(playlistwin, WIDGET(playlistwin_slider)); + playlistwin_slider = ui_skinned_playlist_slider_new(SKINNED_WINDOW(playlistwin)->fixed, playlistwin_get_width() - 15, + 20, cfg.playlist_height - 58); /* track time (minute) */ playlistwin_time_min = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed,
--- a/src/audacious/ui_playlist.h Sat Jul 21 10:04:29 2007 +0200 +++ b/src/audacious/ui_playlist.h Sat Jul 21 20:07:30 2007 +0200 @@ -73,6 +73,8 @@ void playlistwin_select_playlist_to_load(const gchar * default_filename); void playlistwin_set_sinfo_font(gchar *font); void playlistwin_set_sinfo_scroll(gboolean scroll); +gint playlistwin_list_get_visible_count(void); +gint playlistwin_list_get_first(void); extern GtkWidget *playlistwin; extern PlayList_List *playlistwin_list;