diff options
author | JP Rosevear <jpr@ximian.com> | 2001-10-27 23:33:10 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-10-27 23:33:10 +0800 |
commit | 716da0ac903eacd1b2ebed5bb427e4e5f6a88924 (patch) | |
tree | 084a9dc4524adb0d819787deaec5bdf06a427cb2 /e-util/e-pilot-map.c | |
parent | ee72dd5eb5817ad069517cb74790722ec7be0196 (diff) | |
download | gsoc2013-evolution-716da0ac903eacd1b2ebed5bb427e4e5f6a88924.tar gsoc2013-evolution-716da0ac903eacd1b2ebed5bb427e4e5f6a88924.tar.gz gsoc2013-evolution-716da0ac903eacd1b2ebed5bb427e4e5f6a88924.tar.bz2 gsoc2013-evolution-716da0ac903eacd1b2ebed5bb427e4e5f6a88924.tar.lz gsoc2013-evolution-716da0ac903eacd1b2ebed5bb427e4e5f6a88924.tar.xz gsoc2013-evolution-716da0ac903eacd1b2ebed5bb427e4e5f6a88924.tar.zst gsoc2013-evolution-716da0ac903eacd1b2ebed5bb427e4e5f6a88924.zip |
update proto
2001-10-27 JP Rosevear <jpr@ximian.com>
* e-pilot-map.h: update proto
* e-pilot-map.c (e_pilot_map_lookup_pid): touch the nodes if
indicated and found
(e_pilot_map_lookup_uid): ditto
svn path=/trunk/; revision=14208
Diffstat (limited to 'e-util/e-pilot-map.c')
-rw-r--r-- | e-util/e-pilot-map.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c index 92daa01637..cd6d953492 100644 --- a/e-util/e-pilot-map.c +++ b/e-util/e-pilot-map.c @@ -258,7 +258,7 @@ e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid) guint32 -e_pilot_map_lookup_pid (EPilotMap *map, const char *uid) +e_pilot_map_lookup_pid (EPilotMap *map, const char *uid, gboolean touch) { EPilotMapUidNode *unode = NULL; @@ -270,11 +270,20 @@ e_pilot_map_lookup_pid (EPilotMap *map, const char *uid) if (unode == NULL) return 0; + if (touch) { + EPilotMapPidNode *pnode = NULL; + + pnode = g_hash_table_lookup (map->pid_map, &unode->pid); + if (pnode != NULL) + pnode->touched = TRUE; + unode->touched = TRUE; + } + return unode->pid; } const char * -e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid) +e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch) { EPilotMapPidNode *pnode = NULL; @@ -285,6 +294,16 @@ e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid) if (pnode == NULL) return NULL; + if (touch) { + EPilotMapUidNode *unode = NULL; + + unode = g_hash_table_lookup (map->uid_map, pnode->uid); + g_assert (unode != NULL); + + unode->touched = TRUE; + pnode->touched = TRUE; + } + return pnode->uid; } |