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
37e38588
Commit
37e38588
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #10736: calltree: can now drop conference on call
parent
45656915
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
gnome/src/contacts/calltree.c
+28
-5
28 additions, 5 deletions
gnome/src/contacts/calltree.c
with
28 additions
and
5 deletions
gnome/src/contacts/calltree.c
+
28
−
5
View file @
37e38588
...
@@ -1167,6 +1167,19 @@ static void cleanup_popup_data(PopupData **data)
...
@@ -1167,6 +1167,19 @@ static void cleanup_popup_data(PopupData **data)
}
}
static
gboolean
try_detach
(
const
gchar
*
source_ID
,
GtkTreeModel
*
model
,
GtkTreeIter
*
dest_iter
)
{
callable_obj_t
*
source_call
=
calllist_get_call
(
current_calls_tab
,
source_ID
);
GtkTreeIter
iter_parent
;
if
(
source_call
&&
source_call
->
_confID
&&
!
gtk_tree_model_iter_parent
(
model
,
&
iter_parent
,
dest_iter
))
{
sflphone_detach_participant
(
source_ID
);
return
TRUE
;
}
else
{
return
FALSE
;
}
}
static
gboolean
static
gboolean
render_drop
(
GtkTreeModel
*
model
,
GtkTreePath
*
dest_path
,
GtkTreeViewDropPosition
dest_pos
,
render_drop
(
GtkTreeModel
*
model
,
GtkTreePath
*
dest_path
,
GtkTreeViewDropPosition
dest_pos
,
GtkTreeIter
*
source_iter
)
GtkTreeIter
*
source_iter
)
...
@@ -1203,8 +1216,8 @@ render_drop(GtkTreeModel *model, GtkTreePath *dest_path, GtkTreeViewDropPosition
...
@@ -1203,8 +1216,8 @@ render_drop(GtkTreeModel *model, GtkTreePath *dest_path, GtkTreeViewDropPosition
gboolean
result
;
gboolean
result
;
switch
(
dest_pos
)
{
switch
(
dest_pos
)
{
case
GTK_TREE_VIEW_DROP_BEFORE
:
case
GTK_TREE_VIEW_DROP_BEFORE
:
DEBUG
(
"DROP_BEFORE,
ignoring for now
"
);
DEBUG
(
"DROP_BEFORE,
detaching if appropriate
"
);
result
=
FALSE
;
result
=
try_detach
(
source_ID
,
model
,
&
dest_iter
)
;
break
;
break
;
case
GTK_TREE_VIEW_DROP_INTO_OR_BEFORE
:
case
GTK_TREE_VIEW_DROP_INTO_OR_BEFORE
:
/* fallthrough */
/* fallthrough */
...
@@ -1217,10 +1230,16 @@ render_drop(GtkTreeModel *model, GtkTreePath *dest_path, GtkTreeViewDropPosition
...
@@ -1217,10 +1230,16 @@ render_drop(GtkTreeModel *model, GtkTreePath *dest_path, GtkTreeViewDropPosition
if
(
is_conference
(
model
,
source_iter
))
{
if
(
is_conference
(
model
,
source_iter
))
{
DEBUG
(
"dropped conference on conference, merging conferences"
);
DEBUG
(
"dropped conference on conference, merging conferences"
);
dbus_join_conference
(
source_ID
,
dest_ID
);
dbus_join_conference
(
source_ID
,
dest_ID
);
result
=
TRUE
;
}
else
{
}
else
{
DEBUG
(
"dropped call on conference, adding a call to a conference"
);
DEBUG
(
"dropped call on conference, adding a call to a conference"
);
sflphone_add_participant
(
source_ID
,
dest_ID
);
sflphone_add_participant
(
source_ID
,
dest_ID
);
result
=
TRUE
;
}
}
}
else
if
(
is_conference
(
model
,
source_iter
))
{
DEBUG
(
"dropped conference on call, merging call into conference"
);
sflphone_add_participant
(
dest_ID
,
source_ID
);
result
=
TRUE
;
}
else
{
}
else
{
DEBUG
(
"Dropped call on call, creating new conference or transferring"
);
DEBUG
(
"Dropped call on call, creating new conference or transferring"
);
calltree_remove_call
(
current_calls_tab
,
source_ID
);
calltree_remove_call
(
current_calls_tab
,
source_ID
);
...
@@ -1231,21 +1250,25 @@ render_drop(GtkTreeModel *model, GtkTreePath *dest_path, GtkTreeViewDropPosition
...
@@ -1231,21 +1250,25 @@ render_drop(GtkTreeModel *model, GtkTreePath *dest_path, GtkTreeViewDropPosition
popup_data
->
source_ID
=
g_strdup
(
source_ID
);
popup_data
->
source_ID
=
g_strdup
(
source_ID
);
popup_data
->
dest_ID
=
g_strdup
(
dest_ID
);
popup_data
->
dest_ID
=
g_strdup
(
dest_ID
);
gtk_menu_popup
(
GTK_MENU
(
calltree_popupmenu
),
NULL
,
NULL
,
NULL
,
NULL
,
0
,
0
);
gtk_menu_popup
(
GTK_MENU
(
calltree_popupmenu
),
NULL
,
NULL
,
NULL
,
NULL
,
0
,
0
);
result
=
TRUE
;
}
}
}
else
{
}
else
{
callable_obj_t
*
dest_call
=
calllist_get_call
(
current_calls_tab
,
dest_ID
);
callable_obj_t
*
dest_call
=
calllist_get_call
(
current_calls_tab
,
dest_ID
);
if
(
dest_call
&&
dest_call
->
_confID
)
{
if
(
dest_call
&&
dest_call
->
_confID
)
{
DEBUG
(
"dropped call on participant, adding a call to a conference"
);
DEBUG
(
"dropped call on participant, adding a call to a conference"
);
sflphone_add_participant
(
source_ID
,
dest_call
->
_confID
);
sflphone_add_participant
(
source_ID
,
dest_call
->
_confID
);
result
=
TRUE
;
}
}
}
}
result
=
TRU
E
;
result
=
FALS
E
;
break
;
break
;
}
}
case
GTK_TREE_VIEW_DROP_AFTER
:
case
GTK_TREE_VIEW_DROP_AFTER
:
DEBUG
(
"DROP_AFTER, ignoring for now"
);
{
result
=
FALSE
;
DEBUG
(
"DROP_AFTER, detaching if appropriate"
);
result
=
try_detach
(
source_ID
,
model
,
&
dest_iter
);
break
;
break
;
}
default:
default:
ERROR
(
"Unexpected position"
);
ERROR
(
"Unexpected position"
);
result
=
FALSE
;
result
=
FALSE
;
...
...
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