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
5d23323a
Commit
5d23323a
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #10736: calltree: detach participants, don't detach non-participants
parent
71bf3bc6
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
gnome/src/contacts/calltree.c
+16
-9
16 additions, 9 deletions
gnome/src/contacts/calltree.c
with
16 additions
and
9 deletions
gnome/src/contacts/calltree.c
+
16
−
9
View file @
5d23323a
...
@@ -1166,20 +1166,24 @@ static void cleanup_popup_data(PopupData **data)
...
@@ -1166,20 +1166,24 @@ static void cleanup_popup_data(PopupData **data)
}
}
}
}
static
gboolean
has_parent
(
GtkTreeModel
*
model
,
GtkTreeIter
*
child
)
{
GtkTreeIter
parent
;
return
gtk_tree_model_iter_parent
(
model
,
&
parent
,
child
);
}
static
gboolean
try_detach
(
GtkTreeModel
*
model
,
GtkTreeIter
*
source_iter
,
GtkTreeIter
*
dest_iter
)
static
gboolean
try_detach
(
GtkTreeModel
*
model
,
GtkTreeIter
*
source_iter
,
GtkTreeIter
*
dest_iter
)
{
{
gboolean
result
=
FALSE
;
if
(
has_parent
(
model
,
source_iter
)
&&
!
has_parent
(
model
,
dest_iter
))
{
GValue
source_val
=
G_VALUE_INIT
;
GValue
source_val
=
G_VALUE_INIT
;
gtk_tree_model_get_value
(
model
,
source_iter
,
COLUMN_ID
,
&
source_val
);
gtk_tree_model_get_value
(
model
,
source_iter
,
COLUMN_ID
,
&
source_val
);
const
gchar
*
source_ID
=
g_value_get_string
(
&
source_val
);
const
gchar
*
source_ID
=
g_value_get_string
(
&
source_val
);
callable_obj_t
*
source_call
=
calllist_get_call
(
current_calls_tab
,
source_ID
);
gboolean
result
=
FALSE
;
GtkTreeIter
iter_parent
;
if
(
source_call
&&
source_call
->
_confID
&&
!
gtk_tree_model_iter_parent
(
model
,
&
iter_parent
,
dest_iter
))
{
sflphone_detach_participant
(
source_ID
);
sflphone_detach_participant
(
source_ID
);
result
=
TRUE
;
result
=
TRUE
;
}
g_value_unset
(
&
source_val
);
g_value_unset
(
&
source_val
);
}
return
result
;
return
result
;
}
}
...
@@ -1194,9 +1198,12 @@ handle_drop_into(GtkTreeModel *model, GtkTreeIter *source_iter, GtkTreeIter *des
...
@@ -1194,9 +1198,12 @@ handle_drop_into(GtkTreeModel *model, GtkTreeIter *source_iter, GtkTreeIter *des
gtk_tree_model_get_value
(
model
,
dest_iter
,
COLUMN_ID
,
&
dest_val
);
gtk_tree_model_get_value
(
model
,
dest_iter
,
COLUMN_ID
,
&
dest_val
);
const
gchar
*
dest_ID
=
g_value_get_string
(
&
dest_val
);
const
gchar
*
dest_ID
=
g_value_get_string
(
&
dest_val
);
GtkTreeIter
iter_parent
;
gboolean
result
=
FALSE
;
gboolean
result
=
FALSE
;
if
(
!
gtk_tree_model_iter_parent
(
model
,
&
iter_parent
,
dest_iter
))
{
if
(
has_parent
(
model
,
source_iter
))
{
DEBUG
(
"Source is participant, should only be detached"
);
result
=
FALSE
;
}
else
if
(
!
has_parent
(
model
,
dest_iter
))
{
if
(
is_conference
(
model
,
dest_iter
))
{
if
(
is_conference
(
model
,
dest_iter
))
{
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"
);
...
...
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