aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser-ui.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-04-30 11:08:47 +0800
committerJeremy Katz <katzj@src.gnome.org>2003-04-30 11:08:47 +0800
commitf3022be64ef7b35478606f40fc9456c7f063d2b9 (patch)
tree559b26e41ed3edde61960c3e401d2445be797d08 /mail/folder-browser-ui.c
parent7b9a2e4f102fc6ed201f1d43dcad481a91c15b95 (diff)
downloadgsoc2013-evolution-f3022be64ef7b35478606f40fc9456c7f063d2b9.tar.gz
gsoc2013-evolution-f3022be64ef7b35478606f40fc9456c7f063d2b9.tar.zst
gsoc2013-evolution-f3022be64ef7b35478606f40fc9456c7f063d2b9.zip
Don't just blindly cast an int to gpointer, use the proper glib magic
2003-04-29 Jeremy Katz <katzj@redhat.com> * folder-browser-ui.c (fbui_sensitise_item): Don't just blindly cast an int to gpointer, use the proper glib magic instead. svn path=/trunk/; revision=21026
Diffstat (limited to 'mail/folder-browser-ui.c')
-rw-r--r--mail/folder-browser-ui.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c
index 2dbf4df3cf..18aecd234f 100644
--- a/mail/folder-browser-ui.c
+++ b/mail/folder-browser-ui.c
@@ -663,13 +663,15 @@ void
fbui_sensitise_item (FolderBrowser *fb, const char *item, int state)
{
char *name, *key;
+ gpointer val_ptr;
int val;
/* If this whole caching idea doesn't work, remove it here */
if (fb->sensitise_state == NULL)
fb->sensitise_state = g_hash_table_new (g_str_hash, g_str_equal);
- if (g_hash_table_lookup_extended (fb->sensitise_state, item, (void **)&key, (void **)&val)) {
+ if (g_hash_table_lookup_extended (fb->sensitise_state, item, (void **)&key, &val_ptr)) {
+ val = GPOINTER_TO_INT(val_ptr);
if (val == state)
return;
}
@@ -678,7 +680,7 @@ fbui_sensitise_item (FolderBrowser *fb, const char *item, int state)
name = g_alloca (strlen (item) + strlen ("/commands/") + 1);
sprintf (name, "/commands/%s", item);
bonobo_ui_component_set_prop (fb->uicomp, name, "sensitive", state ? "1" : "0", NULL);
- g_hash_table_insert (fb->sensitise_state, (char *) item, (gpointer) state);
+ g_hash_table_insert (fb->sensitise_state, (char *) item, GINT_TO_POINTER(state));
}
}