--- a/gnt-skel.c Fri Feb 07 21:49:22 2014 +0530
+++ b/gnt-skel.c Sun Feb 09 22:19:47 2014 +0530
@@ -72,9 +72,9 @@
parent_class->size_request = gnt_skel_size_request;
parent_class->key_pressed = gnt_skel_key_pressed;
- parent_class->actions = g_hash_table_duplicate(parent_class->actions, g_str_hash,
+ parent_class->actions = gnt_hash_table_duplicate(parent_class->actions, g_str_hash, g_str_equal, NULL, (GDestroyNotify)gnt_widget_action_free);
- parent_class->bindings = g_hash_table_duplicate(parent_class->bindings, g_str_hash,
+ parent_class->bindings = gnt_hash_table_duplicate(parent_class->bindings, g_str_hash, g_str_equal, NULL, (GDestroyNotify)gnt_widget_action_param_free);
gnt_widget_actions_read(G_OBJECT_CLASS_TYPE(klass), klass);
--- a/gntbindable.c Fri Feb 07 21:49:22 2014 +0530
+++ b/gntbindable.c Sun Feb 09 22:19:47 2014 +0530
@@ -237,12 +237,12 @@
/* Duplicate the bindings from parent class */
- klass->actions = g_hash_table_duplicate(klass->actions, g_str_hash,
+ klass->actions = gnt_hash_table_duplicate(klass->actions, g_str_hash, g_str_equal, g_free, (GDestroyNotify)gnt_bindable_action_free,
- (GDupFunc)g_strdup, (GDupFunc)bindable_clone);
- klass->bindings = g_hash_table_duplicate(klass->bindings, g_str_hash,
+ (GntDuplicateFunc)g_strdup, (GntDuplicateFunc)bindable_clone); + klass->bindings = gnt_hash_table_duplicate(klass->bindings, g_str_hash, g_str_equal, g_free, (GDestroyNotify)gnt_bindable_action_param_free,
- (GDupFunc)g_strdup, (GDupFunc)binding_clone);
+ (GntDuplicateFunc)g_strdup, (GntDuplicateFunc)binding_clone); klass->actions = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
(GDestroyNotify)gnt_bindable_action_free);
--- a/gntentry.c Fri Feb 07 21:49:22 2014 +0530
+++ b/gntentry.c Sun Feb 09 22:19:47 2014 +0530
@@ -294,7 +294,7 @@
stop = gnt_util_onscreen_width(entry->scroll, entry->end);
if (stop < widget->priv.width)
- mvwhline(widget->window, 0, stop, ENTRY_CHAR, widget->priv.width - stop);
+ mvwhline(widget->window, 0, stop, GNT_ENTRY_CHAR, widget->priv.width - stop); curpos = gnt_util_onscreen_width(entry->scroll, entry->cursor);
--- a/gntentry.h Fri Feb 07 21:49:22 2014 +0530
+++ b/gntentry.h Sun Feb 09 22:19:47 2014 +0530
@@ -45,7 +45,7 @@
#define GNT_ENTRY_SET_FLAGS(obj, flags) (GNT_ENTRY_FLAGS(obj) |= flags)
#define GNT_ENTRY_UNSET_FLAGS(obj, flags) (GNT_ENTRY_FLAGS(obj) &= ~(flags))
-#define ENTRY_CHAR '_' /* The character to use to fill in the blank places */
+#define GNT_ENTRY_CHAR '_' /* The character to use to fill in the blank places */ typedef struct _GntEntry GntEntry;
typedef struct _GntEntryPriv GntEntryPriv;
--- a/gntutils.c Fri Feb 07 21:49:22 2014 +0530
+++ b/gntutils.c Sun Feb 09 22:19:47 2014 +0530
@@ -148,8 +148,8 @@
+ GntDuplicateFunc key_dup; + GntDuplicateFunc value_dup; @@ -161,9 +161,9 @@
fns->value_dup ? fns->value_dup(value) : value);
-GHashTable *g_hash_table_duplicate(GHashTable *src, GHashFunc hash,
+GHashTable *gnt_hash_table_duplicate(GHashTable *src, GHashFunc hash, GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d,
- GDupFunc key_dup, GDupFunc value_dup)
+ GntDuplicateFunc key_dup, GntDuplicateFunc value_dup) GHashTable *dest = g_hash_table_new_full(hash, equal, key_d, value_d);
struct duplicate_fns fns = {key_dup, value_dup, dest};
--- a/gntutils.h Fri Feb 07 21:49:22 2014 +0530
+++ b/gntutils.h Sun Feb 09 22:19:47 2014 +0530
@@ -35,7 +35,7 @@
-typedef gpointer (*GDupFunc)(gconstpointer data);
+typedef gpointer (*GntDuplicateFunc)(gconstpointer data); * gnt_util_get_text_bound:
@@ -87,7 +87,7 @@
char * gnt_util_onscreen_fit_string(const char *string, int maxw);
- * g_hash_table_duplicate:
+ * gnt_hash_table_duplicate: * @src: The source hashtable.
* @hash: The hash-function to use.
* @equal: The hash-equal function to use.
@@ -100,7 +100,7 @@
* Returns: The new hashtable.
-GHashTable * g_hash_table_duplicate(GHashTable *src, GHashFunc hash, GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d, GDupFunc key_dup, GDupFunc value_dup);
+GHashTable * gnt_hash_table_duplicate(GHashTable *src, GHashFunc hash, GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d, GntDuplicateFunc key_dup, GntDuplicateFunc value_dup); * gnt_boolean_handled_accumulator: