Commit 3dd5ae7c authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#10304: Make the playback seekslider hidden if calltree is selected

parent 0c91d38c
......@@ -296,6 +296,7 @@ create_main_window()
/* show playback scale only if a recorded call is selected */
sfl_seekslider_set_display(SFL_SEEKSLIDER(seekslider), SFL_SEEKSLIDER_DISPLAY_PLAY);
gtk_widget_set_sensitive(seekslider, FALSE);
main_window_hide_playback_scale();
/* don't show waiting layer */
gtk_widget_hide(waitingLayer);
......@@ -496,13 +497,25 @@ main_window_update_playback_scale(guint current, guint size)
}
void
main_window_show_playback_scale()
main_window_set_playback_scale_sensitive()
{
gtk_widget_set_sensitive(seekslider, TRUE);
}
void
main_window_hide_playback_scale()
main_window_set_playback_scale_unsensitive()
{
gtk_widget_set_sensitive(seekslider, FALSE);
}
void
main_window_show_playback_scale()
{
gtk_widget_show(seekslider);
}
void
main_window_hide_playback_scale()
{
gtk_widget_hide(seekslider);
}
......@@ -110,6 +110,10 @@ void focus_on_searchbar_in();
*/
void main_window_update_playback_scale(guint current, guint size);
void main_window_set_playback_scale_sensitive();
void main_window_set_playback_scale_unsensitive();
/**
* Show the playback scale, (should occur if the user selected an history entry witch has been recorded)
*/
......
......@@ -217,11 +217,12 @@ update_toolbar_for_call(callable_obj_t *selectedCall, gboolean instant_messaging
main_window_hide_playback_scale();
}
else if (active_calltree_tab == history_tab) {
main_window_show_playback_scale();
if (is_non_empty(selectedCall->_recordfile)) {
main_window_show_playback_scale();
main_window_set_playback_scale_sensitive();
}
else {
main_window_hide_playback_scale();
main_window_set_playback_scale_unsensitive();
}
}
......@@ -360,11 +361,12 @@ update_toolbar_for_conference(conference_obj_t * selectedConf, gboolean instant_
}
main_window_hide_playback_scale();
} else if (active_calltree_tab == history_tab) {
main_window_show_playback_scale();
if (is_non_empty(selectedConf->_recordfile)) {
main_window_show_playback_scale();
main_window_set_playback_scale_sensitive();
}
else {
main_window_hide_playback_scale();
main_window_set_playback_scale_unsensitive();
}
}
else {
......@@ -1038,19 +1040,27 @@ call_mailbox_cb(void)
static void
toggle_history_cb(GtkToggleAction *action, gpointer user_data UNUSED)
{
if (gtk_toggle_action_get_active(action))
if (gtk_toggle_action_get_active(action)) {
calltree_display(history_tab);
else
main_window_show_playback_scale();
}
else {
calltree_display(current_calls_tab);
main_window_hide_playback_scale();
}
}
static void
toggle_addressbook_cb(GtkToggleAction *action, gpointer user_data UNUSED)
{
if (gtk_toggle_action_get_active(action))
if (gtk_toggle_action_get_active(action)) {
calltree_display(contacts_tab);
else
main_window_show_playback_scale();
}
else {
calltree_display(current_calls_tab);
main_window_show_playback_scale();
}
}
static const GtkActionEntry menu_entries[] = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment