Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
13105:e347b2217b1b | 13106:a0a4b44239e8 |
---|---|
158 GaimConvChatBuddyFlags flags, const char *alias, const char *old_name); | 158 GaimConvChatBuddyFlags flags, const char *alias, const char *old_name); |
159 static gboolean tab_complete(GaimConversation *conv); | 159 static gboolean tab_complete(GaimConversation *conv); |
160 static void gaim_gtkconv_updated(GaimConversation *conv, GaimConvUpdateType type); | 160 static void gaim_gtkconv_updated(GaimConversation *conv, GaimConvUpdateType type); |
161 static void gtkconv_set_unseen(GaimGtkConversation *gtkconv, GaimUnseenState state); | 161 static void gtkconv_set_unseen(GaimGtkConversation *gtkconv, GaimUnseenState state); |
162 static void update_typing_icon(GaimGtkConversation *gtkconv); | 162 static void update_typing_icon(GaimGtkConversation *gtkconv); |
163 static char *item_factory_translate_func (const char *path, gpointer func_data); | 163 static const char *item_factory_translate_func (const char *path, gpointer func_data); |
164 gboolean gaim_gtkconv_has_focus(GaimConversation *conv); | 164 gboolean gaim_gtkconv_has_focus(GaimConversation *conv); |
165 static void gaim_gtkconv_custom_smiley_allocated(GdkPixbufLoader *loader, gpointer user_data); | 165 static void gaim_gtkconv_custom_smiley_allocated(GdkPixbufLoader *loader, gpointer user_data); |
166 static void gaim_gtkconv_custom_smiley_closed(GdkPixbufLoader *loader, gpointer user_data); | 166 static void gaim_gtkconv_custom_smiley_closed(GdkPixbufLoader *loader, gpointer user_data); |
167 static GdkColor* generate_nick_colors(guint *numcolors, GdkColor background); | 167 static GdkColor* generate_nick_colors(guint *numcolors, GdkColor background); |
168 static gboolean color_is_visible(GdkColor foreground, GdkColor background, int color_contrast, int brightness_contrast); | 168 static gboolean color_is_visible(GdkColor foreground, GdkColor background, int color_contrast, int brightness_contrast); |
2685 }; | 2685 }; |
2686 | 2686 |
2687 static const int menu_item_count = | 2687 static const int menu_item_count = |
2688 sizeof(menu_items) / sizeof(*menu_items); | 2688 sizeof(menu_items) / sizeof(*menu_items); |
2689 | 2689 |
2690 static char * | 2690 static const char * |
2691 item_factory_translate_func (const char *path, gpointer func_data) | 2691 item_factory_translate_func (const char *path, gpointer func_data) |
2692 { | 2692 { |
2693 return _((char *)path); | 2693 return _(path); |
2694 } | 2694 } |
2695 | 2695 |
2696 static void | 2696 static void |
2697 sound_method_pref_changed_cb(const char *name, GaimPrefType type, | 2697 sound_method_pref_changed_cb(const char *name, GaimPrefType type, |
2698 gconstpointer value, gpointer data) | 2698 gconstpointer value, gpointer data) |
2756 | 2756 |
2757 win->menu.item_factory = | 2757 win->menu.item_factory = |
2758 gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", accel_group); | 2758 gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", accel_group); |
2759 | 2759 |
2760 gtk_item_factory_set_translate_func(win->menu.item_factory, | 2760 gtk_item_factory_set_translate_func(win->menu.item_factory, |
2761 item_factory_translate_func, | 2761 (GtkTranslateFunc)item_factory_translate_func, |
2762 NULL, NULL); | 2762 NULL, NULL); |
2763 | 2763 |
2764 gtk_item_factory_create_items(win->menu.item_factory, menu_item_count, | 2764 gtk_item_factory_create_items(win->menu.item_factory, menu_item_count, |
2765 menu_items, win); | 2765 menu_items, win); |
2766 g_signal_connect(G_OBJECT(accel_group), "accel-changed", | 2766 g_signal_connect(G_OBJECT(accel_group), "accel-changed", |
2910 update_typing_icon(GaimGtkConversation *gtkconv) | 2910 update_typing_icon(GaimGtkConversation *gtkconv) |
2911 { | 2911 { |
2912 GaimGtkWindow *gtkwin; | 2912 GaimGtkWindow *gtkwin; |
2913 GaimConvIm *im = NULL; | 2913 GaimConvIm *im = NULL; |
2914 GaimConversation *conv = gtkconv->active_conv; | 2914 GaimConversation *conv = gtkconv->active_conv; |
2915 char *stock_id, *tooltip; | 2915 char *stock_id; |
2916 const char *tooltip; | |
2916 | 2917 |
2917 gtkwin = gtkconv->win; | 2918 gtkwin = gtkconv->win; |
2918 | 2919 |
2919 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) | 2920 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) |
2920 im = GAIM_CONV_IM(conv); | 2921 im = GAIM_CONV_IM(conv); |