Mercurial > pidgin.yaz
diff src/gtkconv.c @ 13106:a0a4b44239e8
[gaim-migrate @ 15468]
I was reading the gettext man page and it pointed out that it should be typed as const char *, but it's char * to avoid warnings in code predating ANSI C. So, for the heck of it, I changed added a cast in internal.h. As it turns out, there was a lot of code that relied on this. In the interest of type safety, I've fixed all the warnings. I feel this improved a number of function signatures (in terms of typing clarity). Flame me if you object.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 02 Feb 2006 21:34:43 +0000 |
parents | e1e5462b7d81 |
children | 47ecef83e2e1 |
line wrap: on
line diff
--- a/src/gtkconv.c Thu Feb 02 20:03:17 2006 +0000 +++ b/src/gtkconv.c Thu Feb 02 21:34:43 2006 +0000 @@ -160,7 +160,7 @@ static void gaim_gtkconv_updated(GaimConversation *conv, GaimConvUpdateType type); static void gtkconv_set_unseen(GaimGtkConversation *gtkconv, GaimUnseenState state); static void update_typing_icon(GaimGtkConversation *gtkconv); -static char *item_factory_translate_func (const char *path, gpointer func_data); +static const char *item_factory_translate_func (const char *path, gpointer func_data); gboolean gaim_gtkconv_has_focus(GaimConversation *conv); static void gaim_gtkconv_custom_smiley_allocated(GdkPixbufLoader *loader, gpointer user_data); static void gaim_gtkconv_custom_smiley_closed(GdkPixbufLoader *loader, gpointer user_data); @@ -2687,10 +2687,10 @@ static const int menu_item_count = sizeof(menu_items) / sizeof(*menu_items); -static char * +static const char * item_factory_translate_func (const char *path, gpointer func_data) { - return _((char *)path); + return _(path); } static void @@ -2758,7 +2758,7 @@ gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", accel_group); gtk_item_factory_set_translate_func(win->menu.item_factory, - item_factory_translate_func, + (GtkTranslateFunc)item_factory_translate_func, NULL, NULL); gtk_item_factory_create_items(win->menu.item_factory, menu_item_count, @@ -2912,7 +2912,8 @@ GaimGtkWindow *gtkwin; GaimConvIm *im = NULL; GaimConversation *conv = gtkconv->active_conv; - char *stock_id, *tooltip; + char *stock_id; + const char *tooltip; gtkwin = gtkconv->win;