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
fbe9bbc6
Commit
fbe9bbc6
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #10320: calltree: remove duplicate code
parent
2f27c88c
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
+9
-33
9 additions, 33 deletions
gnome/src/contacts/calltree.c
with
9 additions
and
33 deletions
gnome/src/contacts/calltree.c
+
9
−
33
View file @
fbe9bbc6
...
@@ -1427,23 +1427,21 @@ void drag_history_received_cb(GtkWidget *widget, GdkDragContext *context UNUSED,
...
@@ -1427,23 +1427,21 @@ void drag_history_received_cb(GtkWidget *widget, GdkDragContext *context UNUSED,
void
drag_data_received_cb
(
GtkWidget
*
widget
,
GdkDragContext
*
context
UNUSED
,
gint
x
UNUSED
,
gint
y
UNUSED
,
GtkSelectionData
*
selection_data
UNUSED
,
guint
info
UNUSED
,
guint
t
UNUSED
,
gpointer
data
UNUSED
)
void
drag_data_received_cb
(
GtkWidget
*
widget
,
GdkDragContext
*
context
UNUSED
,
gint
x
UNUSED
,
gint
y
UNUSED
,
GtkSelectionData
*
selection_data
UNUSED
,
guint
info
UNUSED
,
guint
t
UNUSED
,
gpointer
data
UNUSED
)
{
{
GtkTreeView
*
tree_view
=
GTK_TREE_VIEW
(
widget
);
GtkTreePath
*
drop_path
;
GtkTreeViewDropPosition
position
;
if
(
active_calltree_tab
==
history_tab
)
{
if
(
active_calltree_tab
==
history_tab
)
{
g_signal_stop_emission_by_name
(
G_OBJECT
(
widget
),
"drag_data_received"
);
g_signal_stop_emission_by_name
(
G_OBJECT
(
widget
),
"drag_data_received"
);
return
;
return
;
}
}
GtkTreeView
*
tree_view
=
GTK_TREE_VIEW
(
widget
);
GtkTreeModel
*
tree_model
=
gtk_tree_view_get_model
(
tree_view
);
GtkTreeModel
*
tree_model
=
gtk_tree_view_get_model
(
tree_view
);
GtkTree
Iter
iter
;
GtkTree
ViewDropPosition
position
;
GtkTreePath
*
drop_path
;
gtk_tree_view_get_drag_dest_row
(
tree_view
,
&
drop_path
,
&
position
);
gtk_tree_view_get_drag_dest_row
(
tree_view
,
&
drop_path
,
&
position
);
if
(
drop_path
)
{
if
(
drop_path
)
{
GtkTreeIter
iter
;
gtk_tree_model_get_iter
(
tree_model
,
&
iter
,
drop_path
);
gtk_tree_model_get_iter
(
tree_model
,
&
iter
,
drop_path
);
GValue
val
=
G_VALUE_INIT
;
GValue
val
=
G_VALUE_INIT
;
gtk_tree_model_get_value
(
tree_model
,
&
iter
,
COLUMN_ACCOUNT_PTR
,
&
val
);
gtk_tree_model_get_value
(
tree_model
,
&
iter
,
COLUMN_ACCOUNT_PTR
,
&
val
);
...
@@ -1458,34 +1456,12 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context UNUSED, gi
...
@@ -1458,34 +1456,12 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context UNUSED, gi
calltree_dragged_conf
=
NULL
;
calltree_dragged_conf
=
NULL
;
}
}
DEBUG
(
"Position %d"
,
position
);
switch
(
position
)
{
switch
(
position
)
{
case
GTK_TREE_VIEW_DROP_AFTER
:
case
GTK_TREE_VIEW_DROP_AFTER
:
DEBUG
(
"CallTree: GTK_TREE_VIEW_DROP_AFTER"
);
/* fallthrough */
calltree_dragged_path
=
gtk_tree_path_to_string
(
drop_path
);
calltree_dragged_path_depth
=
gtk_tree_path_get_depth
(
drop_path
);
calltree_dragged_call_id
=
NULL
;
calltree_dragged_call
=
NULL
;
calltree_dragged_conf
=
NULL
;
break
;
case
GTK_TREE_VIEW_DROP_INTO_OR_AFTER
:
DEBUG
(
"CallTree: GTK_TREE_VIEW_DROP_INTO_OR_AFTER"
);
calltree_dragged_path
=
gtk_tree_path_to_string
(
drop_path
);
calltree_dragged_path_depth
=
gtk_tree_path_get_depth
(
drop_path
);
if
(
calltree_dragged_type
==
A_CALL
)
{
calltree_dragged_call_id
=
((
callable_obj_t
*
)
g_value_get_pointer
(
&
val
))
->
_callID
;
calltree_dragged_call
=
(
callable_obj_t
*
)
g_value_get_pointer
(
&
val
);
}
else
{
calltree_dragged_call_id
=
((
conference_obj_t
*
)
g_value_get_pointer
(
&
val
))
->
_confID
;
calltree_dragged_conf
=
(
conference_obj_t
*
)
g_value_get_pointer
(
&
val
);
}
break
;
case
GTK_TREE_VIEW_DROP_BEFORE
:
case
GTK_TREE_VIEW_DROP_BEFORE
:
DEBUG
(
"CallTree: GTK_TREE_VIEW_DROP_BEFORE"
);
calltree_dragged_path
=
gtk_tree_path_to_string
(
drop_path
);
calltree_dragged_path
=
gtk_tree_path_to_string
(
drop_path
);
calltree_dragged_path_depth
=
gtk_tree_path_get_depth
(
drop_path
);
calltree_dragged_path_depth
=
gtk_tree_path_get_depth
(
drop_path
);
calltree_dragged_call_id
=
NULL
;
calltree_dragged_call_id
=
NULL
;
...
@@ -1493,8 +1469,9 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context UNUSED, gi
...
@@ -1493,8 +1469,9 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context UNUSED, gi
calltree_dragged_conf
=
NULL
;
calltree_dragged_conf
=
NULL
;
break
;
break
;
case
GTK_TREE_VIEW_DROP_INTO_OR_AFTER
:
/* fallthrough */
case
GTK_TREE_VIEW_DROP_INTO_OR_BEFORE
:
case
GTK_TREE_VIEW_DROP_INTO_OR_BEFORE
:
DEBUG
(
"CallTree: GTK_TREE_VIEW_DROP_INTO_OR_BEFORE"
);
calltree_dragged_path
=
gtk_tree_path_to_string
(
drop_path
);
calltree_dragged_path
=
gtk_tree_path_to_string
(
drop_path
);
calltree_dragged_path_depth
=
gtk_tree_path_get_depth
(
drop_path
);
calltree_dragged_path_depth
=
gtk_tree_path_get_depth
(
drop_path
);
...
@@ -1505,7 +1482,6 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context UNUSED, gi
...
@@ -1505,7 +1482,6 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context UNUSED, gi
calltree_dragged_call_id
=
((
conference_obj_t
*
)
g_value_get_pointer
(
&
val
))
->
_confID
;
calltree_dragged_call_id
=
((
conference_obj_t
*
)
g_value_get_pointer
(
&
val
))
->
_confID
;
calltree_dragged_conf
=
(
conference_obj_t
*
)
g_value_get_pointer
(
&
val
);
calltree_dragged_conf
=
(
conference_obj_t
*
)
g_value_get_pointer
(
&
val
);
}
}
break
;
break
;
default:
default:
...
@@ -1530,7 +1506,7 @@ static void menuitem_response(gchar *string)
...
@@ -1530,7 +1506,7 @@ static void menuitem_response(gchar *string)
}
else
}
else
DEBUG
(
"CallTree: Error unknown option selected in menu %s"
,
string
);
DEBUG
(
"CallTree: Error unknown option selected in menu %s"
,
string
);
// Make sure the create conference op
e
tion will appear next time the menu pops
// Make sure the create conference option will appear next time the menu pops
// The create conference option will hide if tow call from the same conference are draged on each other
// The create conference option will hide if tow call from the same conference are draged on each other
gtk_widget_show
(
calltree_menu_items
);
gtk_widget_show
(
calltree_menu_items
);
...
...
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