Skip to content
Snippets Groups Projects
Commit fd4619aa authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #10320: calltree: declare parent iterators in smaller scope

parent b6a89f30
Branches
Tags
No related merge requests found
...@@ -1249,14 +1249,13 @@ static void drag_begin_cb (GtkWidget *widget UNUSED, GdkDragContext *context UNU ...@@ -1249,14 +1249,13 @@ static void drag_begin_cb (GtkWidget *widget UNUSED, GdkDragContext *context UNU
static void undo_drag_call_action(callable_obj_t *c, GtkTreePath *spath) static void undo_drag_call_action(callable_obj_t *c, GtkTreePath *spath)
{ {
GtkTreeIter parent_conference; // conference for which this call is attached
calltree_remove_call(current_calls_tab, c); calltree_remove_call(current_calls_tab, c);
if (spath && calltree_selected_call_for_drag->_confID) { if (spath && calltree_selected_call_for_drag->_confID) {
gtk_tree_path_up(spath); gtk_tree_path_up(spath);
// conference for which this call is attached
GtkTreeIter parent_conference;
gtk_tree_model_get_iter(GTK_TREE_MODEL(current_calls_tab->store), &parent_conference, spath); gtk_tree_model_get_iter(GTK_TREE_MODEL(current_calls_tab->store), &parent_conference, spath);
calltree_add_call(current_calls_tab, c, &parent_conference); calltree_add_call(current_calls_tab, c, &parent_conference);
} }
else { else {
...@@ -1289,7 +1288,6 @@ static void drag_end_cb(GtkWidget * widget UNUSED, GdkDragContext * context UNUS ...@@ -1289,7 +1288,6 @@ static void drag_end_cb(GtkWidget * widget UNUSED, GdkDragContext * context UNUS
GtkTreePath *spath = gtk_tree_path_new_from_string(calltree_selected_path_for_drag); GtkTreePath *spath = gtk_tree_path_new_from_string(calltree_selected_path_for_drag);
GtkTreeIter iter; GtkTreeIter iter;
GtkTreeIter parent_conference; // conference for which this call is attached
// Make sure drag n drop does not imply a dialing call for either selected and dragged call // Make sure drag n drop does not imply a dialing call for either selected and dragged call
if (calltree_selected_call && (calltree_selected_type == A_CALL)) { if (calltree_selected_call && (calltree_selected_type == A_CALL)) {
...@@ -1438,6 +1436,8 @@ static void drag_end_cb(GtkWidget * widget UNUSED, GdkDragContext * context UNUS ...@@ -1438,6 +1436,8 @@ static void drag_end_cb(GtkWidget * widget UNUSED, GdkDragContext * context UNUS
// TODO: dragged a conference call on another conference call (different conference) // TODO: dragged a conference call on another conference call (different conference)
gtk_tree_path_up(path); gtk_tree_path_up(path);
// conference for which this call is attached
GtkTreeIter parent_conference;
gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &parent_conference, path); gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &parent_conference, path);
gtk_tree_path_up(dpath); gtk_tree_path_up(dpath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment