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
8e9702b9
Commit
8e9702b9
authored
17 years ago
by
areversat
Browse files
Options
Downloads
Patches
Plain Diff
Add history search (or maybe one day...)
parent
53d52081
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-gtk/src/historyfilter.c
+48
-0
48 additions, 0 deletions
sflphone-gtk/src/historyfilter.c
sflphone-gtk/src/historyfilter.h
+31
-0
31 additions, 0 deletions
sflphone-gtk/src/historyfilter.h
with
79 additions
and
0 deletions
sflphone-gtk/src/historyfilter.c
0 → 100644
+
48
−
0
View file @
8e9702b9
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Antoine Reversat <antoine.reversat@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include
<gtk/gtk.h>
#include
<historyfilter.h>
GtkTreeModel
*
create_filter
(
GtkTreeModel
*
child
)
{
GtkTreeModel
*
ret
=
gtk_tree_model_filter_new
(
child
,
NULL
);
gtk_tree_model_filter_set_visible_func
(
GTK_TREE_MODEL_FILTER
(
ret
),
is_visible
,
NULL
,
NULL
);
return
GTK_TREE_MODEL
(
ret
);
}
gboolean
is_visible
(
GtkTreeModel
*
model
,
GtkTreeIter
*
iter
,
gpointer
data
)
{
GValue
val
=
{
0
,
};
gchar
*
text
;
gtk_tree_model_get_value
(
GTK_TREE_MODEL
(
model
),
iter
,
1
,
&
val
);
if
(
G_VALUE_HOLDS_STRING
(
&
val
)){
text
=
(
gchar
*
)
g_value_get_string
(
&
val
);
}
if
(
text
!=
NULL
){
if
(
g_regex_match_simple
(
"122"
,
text
,
0
,
0
)){
printf
(
"match
\n
"
);
return
FALSE
;
}
else
{
return
TRUE
;
}
}
}
This diff is collapsed.
Click to expand it.
sflphone-gtk/src/historyfilter.h
0 → 100644
+
31
−
0
View file @
8e9702b9
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Antoine Reversat <antoine.reversat@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __HFILTER_H__
#define __HFILTER_H__
#include
<calllist.h>
#include
<gtk/gtk.h>
GtkTreeModel
*
create_filter
(
GtkTreeModel
*
child
);
gboolean
is_visible
(
GtkTreeModel
*
model
,
GtkTreeIter
*
iter
,
gpointer
data
);
#endif
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