diff options
author | Manish Singh <yosh@gimp.org> | 2005-02-04 22:17:11 +0000 |
---|---|---|
committer | Manish Singh <yosh@src.gnome.org> | 2005-02-04 22:17:11 +0000 |
commit | cbf21238c305ba944a7b4ed1707329391b095ef2 (patch) | |
tree | 34c0b4a540063b3b78327c2e4ed67cb1293185bd /gtk/gtkstock.c | |
parent | 8ccd6cba27319ccb9c86af6a616886fb1e115684 (diff) | |
download | gtk+-cbf21238c305ba944a7b4ed1707329391b095ef2.tar.gz |
remove unused function.
Fri Feb 4 14:16:31 2005 Manish Singh <yosh@gimp.org>
* gtk/gtkaccelgroup.c (substitute_underscores): remove unused
function.
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
Add some extra parens for bitop order of operations disambiguiation.
* gtk/gtkstock.c: Fix const confusion, make our own copy of the
domain when setting a translate function.
* tests/testcombo.c: removed unused variable.
Diffstat (limited to 'gtk/gtkstock.c')
-rw-r--r-- | gtk/gtkstock.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gtk/gtkstock.c b/gtk/gtkstock.c index 60fd3ecb42..93b3934483 100644 --- a/gtk/gtkstock.c +++ b/gtk/gtkstock.c @@ -436,9 +436,12 @@ gtk_stock_set_translate_func (const gchar *domain, GtkDestroyNotify notify) { GtkStockTranslateFunc *translate; - + gchar *domainname; + + domainname = g_strdup (domain); + translate = (GtkStockTranslateFunc *) - g_hash_table_lookup (translate_hash, domain); + g_hash_table_lookup (translate_hash, domainname); if (translate) { @@ -452,14 +455,16 @@ gtk_stock_set_translate_func (const gchar *domain, translate->data = data; translate->notify = notify; - g_hash_table_insert (translate_hash, domain, translate); + g_hash_table_insert (translate_hash, domainname, translate); } static gchar * sgettext_swapped (const gchar *msgid, - const gchar *domainname) + gpointer data) { - return g_strip_context (msgid, dgettext (domainname, msgid)); + gchar *domainname = data; + + return (gchar *)g_strip_context (msgid, dgettext (domainname, msgid)); } @@ -475,7 +480,8 @@ init_stock_hash (void) if (translate_hash == NULL) { - translate_hash = g_hash_table_new (g_str_hash, g_str_equal); + translate_hash = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, NULL); gtk_stock_set_translate_func (GETTEXT_PACKAGE, sgettext_swapped, |