Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
0b4610f5
Commit
0b4610f5
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#3233] Handle invalid drag n drop
parent
8cac3792
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sflphone-client-gnome/src/contacts/calltree.c
+54
-8
54 additions, 8 deletions
sflphone-client-gnome/src/contacts/calltree.c
with
54 additions
and
8 deletions
sflphone-client-gnome/src/contacts/calltree.c
+
54
−
8
View file @
0b4610f5
...
@@ -1425,23 +1425,55 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d
...
@@ -1425,23 +1425,55 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d
// Make sure that drag n drop does not imply a dialing call
// Make sure that drag n drop does not imply a dialing call
if
(
selected_type
==
A_CALL
&&
selected_call
->
_state
==
CALL_STATE_DIALING
)
{
if
(
selected_type
==
A_CALL
)
{
DEBUG
(
"Dragged a call on a dialing call"
);
DEBUG
(
"Selected a call"
);
if
(
selected_call
->
_state
==
CALL_STATE_DIALING
||
selected_call
->
_state
==
CALL_STATE_INVALID
||
selected_call
->
_state
==
CALL_STATE_FAILURE
||
selected_call
->
_state
==
CALL_STATE_BUSY
||
selected_call
->
_state
==
CALL_STATE_TRANSFERT
)
{
DEBUG
(
"Selected an invalid call"
);
calltree_remove_call
(
current_calls
,
selected_call
,
NULL
);
calltree_remove_call
(
current_calls
,
selected_call
,
NULL
);
calltree_add_call
(
current_calls
,
selected_call
,
NULL
);
calltree_add_call
(
current_calls
,
selected_call
,
NULL
);
return
;
return
;
}
}
if
(
dragged_type
==
A_CALL
)
{
DEBUG
(
"Dragged on a call"
);
if
(
dragged_call
->
_state
==
CALL_STATE_DIALING
||
dragged_call
->
_state
==
CALL_STATE_INVALID
||
dragged_call
->
_state
==
CALL_STATE_FAILURE
||
dragged_call
->
_state
==
CALL_STATE_BUSY
||
dragged_call
->
_state
==
CALL_STATE_TRANSFERT
)
{
DEBUG
(
"Dragged on an invalid call"
);
if
(
selected_call
->
_confID
!=
NULL
)
{
}
else
{
calltree_remove_call
(
current_calls
,
selected_call
,
NULL
);
calltree_add_call
(
current_calls
,
selected_call
,
NULL
);
}
return
;
}
}
}
/*
else if(selected_type == A_CALL) {
else if(selected_type == A_CALL) {
// user may have dragged it outside the conference
// user may have dragged it outside the conference
if(dragged_call && dragged_call->_state == CALL_STATE_DIALING) {
if(dragged_call && dragged_call->_state == CALL_STATE_DIALING) {
calltree_remove_call(current_calls, dragged_call, NULL);
calltree_remove_call(current_calls, dragged_call, NULL);
DEBUG
(
"Dragged a call on a dialing call"
);
DEBUG("
--------------------------------------
Dragged a call on a dialing call");
// test if call participate to a conference
// test if call participate to a conference
if(selected_call->_confID) {
if(selected_call->_confID) {
...
@@ -1460,12 +1492,25 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d
...
@@ -1460,12 +1492,25 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d
}
}
}
}
else
if
(
selected_type
==
A_CONFERENCE
)
{
*/
DEBUG
(
"Dragged a conference on a dialing call"
);
if
(
selected_type
==
A_CONFERENCE
)
{
if
(
dragged_call
&&
dragged_call
->
_state
==
CALL_STATE_DIALING
)
{
DEBUG
(
"Selected a conference"
);
if
(
dragged_type
==
A_CALL
)
{
DEBUG
(
"Dragged on a call"
);
if
(
dragged_call
->
_state
==
CALL_STATE_DIALING
||
dragged_call
->
_state
==
CALL_STATE_INVALID
||
dragged_call
->
_state
==
CALL_STATE_FAILURE
||
dragged_call
->
_state
==
CALL_STATE_BUSY
||
dragged_call
->
_state
==
CALL_STATE_TRANSFERT
)
{
DEBUG
(
"Dragged on an invalid call"
);
conf
=
selected_conf
;
conf
=
selected_conf
;
...
@@ -1474,6 +1519,7 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d
...
@@ -1474,6 +1519,7 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d
return
;
return
;
}
}
}
}
}
if
(
selected_path_depth
==
1
)
{
if
(
selected_path_depth
==
1
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment