comparison src/skins/ui_main.c @ 3076:5b59df43b93f

Update the playback slider at the end of a seek (bug #31)
author John Lindgren <john.lindgren@tds.net>
date Sun, 26 Apr 2009 16:11:55 -0400
parents b0f8da03187b
children a522493de76e
comparison
equal deleted inserted replaced
3075:eed75824b3f7 3076:5b59df43b93f
1213 { 1213 {
1214 GTimeVal now_time; 1214 GTimeVal now_time;
1215 GTimeVal delta_time; 1215 GTimeVal delta_time;
1216 gulong now_dur; 1216 gulong now_dur;
1217 1217
1218 g_source_remove (mainwin_timeout_id);
1219 mainwin_timeout_id = 0;
1220 seek_state = MAINWIN_SEEK_NIL;
1221
1218 g_get_current_time(&now_time); 1222 g_get_current_time(&now_time);
1219 1223
1220 delta_time.tv_usec = now_time.tv_usec - cb_time.tv_usec; 1224 delta_time.tv_usec = now_time.tv_usec - cb_time.tv_usec;
1221 delta_time.tv_sec = now_time.tv_sec - cb_time.tv_sec; 1225 delta_time.tv_sec = now_time.tv_sec - cb_time.tv_sec;
1222 1226
1230 else 1234 else
1231 { 1235 {
1232 /* interpret as 'seek' */ 1236 /* interpret as 'seek' */
1233 mainwin_position_release_cb( mainwin_position, ui_skinned_horizontal_slider_get_position(mainwin_position) ); 1237 mainwin_position_release_cb( mainwin_position, ui_skinned_horizontal_slider_get_position(mainwin_position) );
1234 } 1238 }
1235
1236 seek_state = MAINWIN_SEEK_NIL;
1237
1238 g_source_remove(mainwin_timeout_id);
1239 mainwin_timeout_id = 0;
1240 } 1239 }
1241 1240
1242 void 1241 void
1243 mainwin_fwd_pushed(void) 1242 mainwin_fwd_pushed(void)
1244 { 1243 {
1255 { 1254 {
1256 GTimeVal now_time; 1255 GTimeVal now_time;
1257 GTimeVal delta_time; 1256 GTimeVal delta_time;
1258 gulong now_dur; 1257 gulong now_dur;
1259 1258
1259 g_source_remove (mainwin_timeout_id);
1260 mainwin_timeout_id = 0;
1261 seek_state = MAINWIN_SEEK_NIL;
1262
1260 g_get_current_time(&now_time); 1263 g_get_current_time(&now_time);
1261 1264
1262 delta_time.tv_usec = now_time.tv_usec - cb_time.tv_usec; 1265 delta_time.tv_usec = now_time.tv_usec - cb_time.tv_usec;
1263 delta_time.tv_sec = now_time.tv_sec - cb_time.tv_sec; 1266 delta_time.tv_sec = now_time.tv_sec - cb_time.tv_sec;
1264 1267
1272 else 1275 else
1273 { 1276 {
1274 /* interpret as 'seek' */ 1277 /* interpret as 'seek' */
1275 mainwin_position_release_cb( mainwin_position, ui_skinned_horizontal_slider_get_position(mainwin_position) ); 1278 mainwin_position_release_cb( mainwin_position, ui_skinned_horizontal_slider_get_position(mainwin_position) );
1276 } 1279 }
1277
1278 seek_state = MAINWIN_SEEK_NIL;
1279
1280 g_source_remove(mainwin_timeout_id);
1281 mainwin_timeout_id = 0;
1282 } 1280 }
1283 1281
1284 void 1282 void
1285 mainwin_play_pushed(void) 1283 mainwin_play_pushed(void)
1286 { 1284 {