diff --git a/sflphone-client-gnome/src/uimanager.c b/sflphone-client-gnome/src/uimanager.c index 22b37d47e8e1f7dce7e39ed4890fa098c7a9973c..63b890d8cef7642f9b03d3001a478e6460b2038a 100644 --- a/sflphone-client-gnome/src/uimanager.c +++ b/sflphone-client-gnome/src/uimanager.c @@ -715,10 +715,22 @@ call_record (void) } static void -playback_record(void) +playback_record_cb(void) { - DEBUG("UIManager: Playback button pressed"); + + callable_obj_t *selectedCall = calltab_get_selected_call (history); + conference_obj_t *selectedConf = calltab_get_selected_conf (history); + + if((selectedCall == NULL) && (selectedConf == NULL)) { + ERROR("UIManager: Error: No selected object in playback record callback"); + return; + } + + if(selectedCall) + dbus_start_recorded_file_playback(selectedCall->_recordfile); + else if(selectedConf) + dbus_start_recorded_file_playback(selectedConf->_recordfile); } static void @@ -989,7 +1001,7 @@ static const GtkActionEntry menu_entries[] = { { "Quit", GTK_STOCK_CLOSE, N_ ("_Quit"), "<control>Q", N_ ("Quit the program"), G_CALLBACK (call_quit) }, { "PlayRecord", GTK_STOCK_MEDIA_PLAY, N_ ("_Playback record"), NULL, - N_ ("Playback recorded file"), G_CALLBACK (playback_record) }, + N_ ("Playback recorded file"), G_CALLBACK (playback_record_cb) }, // Edit Menu { "Edit", NULL, N_ ("_Edit"), NULL, NULL, NULL }, diff --git a/sflphone-common/src/history/historyitem.cpp b/sflphone-common/src/history/historyitem.cpp index d864ffde86a10d1f91f8b9c396df52fa54419cf2..39c369577a6bb2c245ef2189c6b732edee093431 100644 --- a/sflphone-common/src/history/historyitem.cpp +++ b/sflphone-common/src/history/historyitem.cpp @@ -127,6 +127,8 @@ HistoryItem::HistoryItem (std::string serialized_form) _confID = confID; _timeAdded = timeAdded; + + _recording_file = recordFile; } HistoryItem::~HistoryItem ()