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
292be9d5
Commit
292be9d5
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #11207: fixed history search bar
parent
6f1a61e2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
gnome/src/contacts/calltree.c
+1
-10
1 addition, 10 deletions
gnome/src/contacts/calltree.c
gnome/src/contacts/calltree.h
+12
-0
12 additions, 0 deletions
gnome/src/contacts/calltree.h
gnome/src/contacts/history.c
+10
-21
10 additions, 21 deletions
gnome/src/contacts/history.c
with
23 additions
and
31 deletions
gnome/src/contacts/calltree.c
+
1
−
10
View file @
292be9d5
...
@@ -79,15 +79,6 @@ static GtkTargetEntry target_list[] = {
...
@@ -79,15 +79,6 @@ static GtkTargetEntry target_list[] = {
static
const
guint
n_targets
=
G_N_ELEMENTS
(
target_list
);
static
const
guint
n_targets
=
G_N_ELEMENTS
(
target_list
);
enum
{
COLUMN_ACCOUNT_PIXBUF
=
0
,
COLUMN_ACCOUNT_DESC
,
COLUMN_ACCOUNT_SECURITY_PIXBUF
,
COLUMN_ID
,
COLUMN_IS_CONFERENCE
,
COLUMNS_IN_TREE_STORE
};
/**
/**
* Show popup menu
* Show popup menu
*/
*/
...
@@ -100,7 +91,7 @@ popup_menu(GtkWidget *widget,
...
@@ -100,7 +91,7 @@ popup_menu(GtkWidget *widget,
}
}
/* Returns TRUE if row contains a conference object pointer */
/* Returns TRUE if row contains a conference object pointer */
static
gboolean
gboolean
is_conference
(
GtkTreeModel
*
model
,
GtkTreeIter
*
iter
)
is_conference
(
GtkTreeModel
*
model
,
GtkTreeIter
*
iter
)
{
{
gboolean
result
=
FALSE
;
gboolean
result
=
FALSE
;
...
...
This diff is collapsed.
Click to expand it.
gnome/src/contacts/calltree.h
+
12
−
0
View file @
292be9d5
...
@@ -106,4 +106,16 @@ calltree_display (calltab_t *);
...
@@ -106,4 +106,16 @@ calltree_display (calltab_t *);
gboolean
gboolean
calltree_update_clock
(
gpointer
);
calltree_update_clock
(
gpointer
);
gboolean
is_conference
(
GtkTreeModel
*
model
,
GtkTreeIter
*
iter
);
enum
{
COLUMN_ACCOUNT_PIXBUF
=
0
,
COLUMN_ACCOUNT_DESC
,
COLUMN_ACCOUNT_SECURITY_PIXBUF
,
COLUMN_ID
,
COLUMN_IS_CONFERENCE
,
COLUMNS_IN_TREE_STORE
};
#endif
#endif
This diff is collapsed.
Click to expand it.
gnome/src/contacts/history.c
+
10
−
21
View file @
292be9d5
...
@@ -54,45 +54,34 @@ search_type_matches_state(SearchType type, const gchar *state)
...
@@ -54,45 +54,34 @@ search_type_matches_state(SearchType type, const gchar *state)
static
gboolean
history_is_visible
(
GtkTreeModel
*
model
,
GtkTreeIter
*
iter
,
gpointer
data
UNUSED
)
static
gboolean
history_is_visible
(
GtkTreeModel
*
model
,
GtkTreeIter
*
iter
,
gpointer
data
UNUSED
)
{
{
gboolean
ret
=
TRUE
;
/* Skip conferences */
callable_obj_t
*
history_entry
=
NULL
;
if
(
is_conference
(
model
,
iter
))
const
gchar
*
text
=
NULL
;
return
TRUE
;
// Fetch the call description
// Fetch the call description
GValue
val
;
const
gchar
*
text
=
NULL
;
memset
(
&
val
,
0
,
sizeof
val
);
const
gchar
*
id
=
NULL
;
gtk_tree_model_get_value
(
GTK_TREE_MODEL
(
model
),
iter
,
1
,
&
val
);
gtk_tree_model_get
(
model
,
iter
,
COLUMN_ACCOUNT_DESC
,
&
text
,
COLUMN_ID
,
&
id
,
-
1
);
callable_obj_t
*
history_entry
=
calllist_get_call
(
history_tab
,
id
);
if
(
G_VALUE_HOLDS_STRING
(
&
val
))
text
=
(
gchar
*
)
g_value_get_string
(
&
val
);
// Fetch the call type
GValue
obj
;
memset
(
&
obj
,
0
,
sizeof
obj
);
gtk_tree_model_get_value
(
GTK_TREE_MODEL
(
model
),
iter
,
3
,
&
obj
);
if
(
G_VALUE_HOLDS_POINTER
(
&
obj
))
history_entry
=
(
gpointer
)
g_value_get_pointer
(
&
obj
);
gboolean
ret
=
TRUE
;
if
(
text
&&
history_entry
)
{
if
(
text
&&
history_entry
)
{
// Filter according to the type of call
// Filter according to the type of call
// MISSED, INCOMING, OUTGOING, ALL
// MISSED, INCOMING, OUTGOING, ALL
const
gchar
*
search
=
gtk_entry_get_text
(
history_searchbar_widget
);
const
gchar
*
search
=
gtk_entry_get_text
(
history_searchbar_widget
);
if
(
!
search
||
!*
search
)
if
(
!
search
||
!*
search
)
goto
end
;
return
TRUE
;
SearchType
search_type
=
get_current_history_search_type
();
SearchType
search_type
=
get_current_history_search_type
();
ret
=
g_regex_match_simple
(
search
,
text
,
G_REGEX_CASELESS
,
0
);
ret
=
g_regex_match_simple
(
search
,
text
,
G_REGEX_CASELESS
,
0
);
if
(
search_type
==
SEARCH_ALL
)
if
(
search_type
==
SEARCH_ALL
)
goto
end
;
return
ret
;
else
// We need a match on the history_state and the current search type
else
// We need a match on the history_state and the current search type
ret
=
ret
&&
search_type_matches_state
(
search_type
,
history_entry
->
_history_state
);
ret
=
ret
&&
search_type_matches_state
(
search_type
,
history_entry
->
_history_state
);
}
}
end:
g_value_unset
(
&
val
);
return
ret
;
return
ret
;
}
}
...
...
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