diff console/libgnt/gntutils.c @ 14793:8a0cfee11af8

[gaim-migrate @ 17558] Introduce actions. You can specify the bindings for the actions. Right now, only the tree and the entry widget have them. The manual includes the details. I believe Ethan had suggested something like this a while back. It made sense, so here it is. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 21 Oct 2006 21:08:24 +0000
parents 1d084d1ee6fa
children 6ec7e963d186
line wrap: on
line diff
--- a/console/libgnt/gntutils.c	Sat Oct 21 20:40:12 2006 +0000
+++ b/console/libgnt/gntutils.c	Sat Oct 21 21:08:24 2006 +0000
@@ -105,3 +105,17 @@
 	return g_string_free(str, FALSE);
 }
 
+static void
+duplicate_values(gpointer key, gpointer value, gpointer data)
+{
+	g_hash_table_insert(data, key, value);
+}
+
+GHashTable *g_hash_table_duplicate(GHashTable *src, GHashFunc hash,
+		GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d)
+{
+	GHashTable *dest = g_hash_table_new_full(hash, equal, key_d, value_d);
+	g_hash_table_foreach(src, duplicate_values, dest);
+	return dest;
+}
+