diff options
author | waker <wakeroid@gmail.com> | 2011-04-16 21:01:37 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-04-16 21:01:37 +0200 |
commit | 1416dfbf622b443c309e299e0b1efd01646c8b37 (patch) | |
tree | 4794b0edfff95bce654f253b586c9aaa4e970e7f /plugins/gtkui | |
parent | d804aaaad0df4a532cfe397b5190f833837257b9 (diff) |
get rid of some legacy events;
update playlist grouping on metadata changes
Diffstat (limited to 'plugins/gtkui')
-rw-r--r-- | plugins/gtkui/ddblistview.c | 6 | ||||
-rw-r--r-- | plugins/gtkui/ddblistview.h | 4 | ||||
-rw-r--r-- | plugins/gtkui/gtkui.c | 6 | ||||
-rw-r--r-- | plugins/gtkui/gtkui.h | 4 | ||||
-rw-r--r-- | plugins/gtkui/mainplaylist.c | 2 | ||||
-rw-r--r-- | plugins/gtkui/search.c | 2 | ||||
-rw-r--r-- | plugins/gtkui/trkproperties.c | 1 |
7 files changed, 13 insertions, 12 deletions
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c index 996e66cd..a2c4bd16 100644 --- a/plugins/gtkui/ddblistview.c +++ b/plugins/gtkui/ddblistview.c @@ -530,8 +530,8 @@ ddb_listview_list_configure_event (GtkWidget *widget, static void ddb_listview_groupcheck (DdbListview *listview) { - time_t tm = listview->binding->modification_time (); - if (tm != listview->groups_build_time) { + int idx = listview->binding->modification_idx (); + if (idx != listview->groups_build_idx) { ddb_listview_build_groups (listview); } } @@ -2882,7 +2882,7 @@ void ddb_listview_build_groups (DdbListview *listview) { deadbeef->pl_lock (); int old_height = listview->fullheight; - listview->groups_build_time = listview->binding->modification_time (); + listview->groups_build_idx = listview->binding->modification_idx (); ddb_listview_free_groups (listview); listview->fullheight = 0; diff --git a/plugins/gtkui/ddblistview.h b/plugins/gtkui/ddblistview.h index c7476607..ed1334e8 100644 --- a/plugins/gtkui/ddblistview.h +++ b/plugins/gtkui/ddblistview.h @@ -85,7 +85,7 @@ typedef struct { void (*col_free_user_data) (void *user_data); void (*vscroll_changed) (int pos); void (*cursor_changed) (int pos); - time_t (*modification_time) (void); + int (*modification_idx) (void); } DdbListviewBinding; struct _DdbListviewColumn; @@ -140,7 +140,7 @@ struct _DdbListview { struct _DdbListviewColumn *columns; struct _DdbListviewGroup *groups; - time_t groups_build_time; + int groups_build_idx; // must be the same as playlist modification idx int fullheight; int block_redraw_on_scroll; int grouptitle_height; diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index e1ee403a..7e3a0ee0 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -573,11 +573,11 @@ gtkui_hide_status_icon () { } } -time_t -gtkui_get_curr_playlist_modtime (void) { +int +gtkui_get_curr_playlist_mod (void) { deadbeef->pl_lock (); void *plt = deadbeef->plt_get_handle (deadbeef->plt_get_curr ()); - time_t res = plt ? deadbeef->plt_get_modification_time (plt) : 0; + int res = plt ? deadbeef->plt_get_modification_idx (plt) : 0; deadbeef->pl_unlock (); return res; } diff --git a/plugins/gtkui/gtkui.h b/plugins/gtkui/gtkui.h index e940bcfa..dfc73455 100644 --- a/plugins/gtkui/gtkui.h +++ b/plugins/gtkui/gtkui.h @@ -166,7 +166,7 @@ gtkui_playlist_set_curr (int playlist); void gtkui_setup_gui_refresh (); -time_t -gtkui_get_curr_playlist_modtime (void); +int +gtkui_get_curr_playlist_mod (void); #endif diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c index 9c4c5877..e1537ea0 100644 --- a/plugins/gtkui/mainplaylist.c +++ b/plugins/gtkui/mainplaylist.c @@ -284,7 +284,7 @@ DdbListviewBinding main_binding = { .list_context_menu = list_context_menu, .delete_selected = main_delete_selected, .vscroll_changed = main_vscroll_changed, - .modification_time = gtkui_get_curr_playlist_modtime, + .modification_idx = gtkui_get_curr_playlist_mod, }; void diff --git a/plugins/gtkui/search.c b/plugins/gtkui/search.c index 4f0eeb46..471d3620 100644 --- a/plugins/gtkui/search.c +++ b/plugins/gtkui/search.c @@ -369,7 +369,7 @@ DdbListviewBinding search_binding = { .header_context_menu = header_context_menu, .list_context_menu = list_context_menu, .delete_selected = search_delete_selected, - .modification_time = gtkui_get_curr_playlist_modtime, + .modification_idx = gtkui_get_curr_playlist_mod, }; void diff --git a/plugins/gtkui/trkproperties.c b/plugins/gtkui/trkproperties.c index 5b58890c..12e51924 100644 --- a/plugins/gtkui/trkproperties.c +++ b/plugins/gtkui/trkproperties.c @@ -462,6 +462,7 @@ static gboolean write_finished_cb (void *ctx) { gtk_widget_destroy (progressdlg); progressdlg = NULL; + deadbeef->plt_modified (deadbeef->plt_get_handle (deadbeef->plt_get_curr ())); main_refresh (); search_refresh (); trkproperties_modified = 0; |