00001 00027 #define GITK_LIB_C 00028 #define GITK_PROFILE_C 00029 00030 #include "gitkincludes.h" 00031 00032 GHashTable *gitk_profile=NULL; 00033 00038 gboolean gitk_profile_init(void) { 00039 gboolean ret=TRUE; 00040 if(!(gitk_profile=g_hash_table_new_full(g_str_hash,g_str_equal,g_free,g_free))) { 00041 ret=FALSE; 00042 } 00043 return(ret); 00044 } 00045 00046 void gitk_profile_done(void) { 00047 g_hash_table_destroy(gitk_profile); 00048 gitk_profile=NULL; 00049 } 00050 00051 gboolean gitk_profile_set_property(const gchar *key, gpointer value) { 00052 g_assert(gitk_profile); 00053 00054 gitk_log2("profile[\"%s\"]=\"%s\"",key,(gchar *)value); 00055 g_hash_table_insert(gitk_profile,(gchar *)key,value); 00056 return(TRUE); 00057 } 00058 00059 gpointer gitk_profile_get_property(const gchar *key) { 00060 g_assert(gitk_profile); 00061 return(g_hash_table_lookup(gitk_profile,(gchar *)key)); 00062 }