comparison src/gtkblist.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 0aa231ebbfd5
children ba82cc4d1abd
comparison
equal deleted inserted replaced
13105:e347b2217b1b 13106:a0a4b44239e8
120 120
121 static void gaim_gtk_blist_update_buddy(GaimBuddyList *list, GaimBlistNode *node); 121 static void gaim_gtk_blist_update_buddy(GaimBuddyList *list, GaimBlistNode *node);
122 static void gaim_gtk_blist_selection_changed(GtkTreeSelection *selection, gpointer data); 122 static void gaim_gtk_blist_selection_changed(GtkTreeSelection *selection, gpointer data);
123 static void gaim_gtk_blist_update(GaimBuddyList *list, GaimBlistNode *node); 123 static void gaim_gtk_blist_update(GaimBuddyList *list, GaimBlistNode *node);
124 static char *gaim_get_tooltip_text(GaimBlistNode *node, gboolean full); 124 static char *gaim_get_tooltip_text(GaimBlistNode *node, gboolean full);
125 static char *item_factory_translate_func (const char *path, gpointer func_data); 125 static const char *item_factory_translate_func (const char *path, gpointer func_data);
126 static gboolean get_iter_from_node(GaimBlistNode *node, GtkTreeIter *iter); 126 static gboolean get_iter_from_node(GaimBlistNode *node, GtkTreeIter *iter);
127 static void redo_buddy_list(GaimBuddyList *list, gboolean remove); 127 static void redo_buddy_list(GaimBuddyList *list, gboolean remove);
128 static void gaim_gtk_blist_collapse_contact_cb(GtkWidget *w, GaimBlistNode *node); 128 static void gaim_gtk_blist_collapse_contact_cb(GtkWidget *w, GaimBlistNode *node);
129 129
130 static void gaim_gtk_blist_tooltip_destroy(void); 130 static void gaim_gtk_blist_tooltip_destroy(void);
598 gtk_widget_grab_focus(input); 598 gtk_widget_grab_focus(input);
599 focus = FALSE; 599 focus = FALSE;
600 } 600 }
601 gtk_label_set_mnemonic_widget(GTK_LABEL(label), input); 601 gtk_label_set_mnemonic_widget(GTK_LABEL(label), input);
602 gaim_set_accessible_label(input, label); 602 gaim_set_accessible_label(input, label);
603 g_object_set_data(G_OBJECT(input), "identifier", pce->identifier); 603 g_object_set_data(G_OBJECT(input), "identifier", (gpointer)pce->identifier);
604 g_object_set_data(G_OBJECT(input), "is_spin", GINT_TO_POINTER(pce->is_int)); 604 g_object_set_data(G_OBJECT(input), "is_spin", GINT_TO_POINTER(pce->is_int));
605 g_object_set_data(G_OBJECT(input), "required", GINT_TO_POINTER(pce->required)); 605 g_object_set_data(G_OBJECT(input), "required", GINT_TO_POINTER(pce->required));
606 data->entries = g_list_append(data->entries, input); 606 data->entries = g_list_append(data->entries, input);
607 607
608 g_free(pce); 608 g_free(pce);
3361 DRAG_TEXT, 3361 DRAG_TEXT,
3362 DRAG_URI, 3362 DRAG_URI,
3363 NUM_TARGETS 3363 NUM_TARGETS
3364 }; 3364 };
3365 3365
3366 static char * 3366 static const char *
3367 item_factory_translate_func (const char *path, gpointer func_data) 3367 item_factory_translate_func (const char *path, gpointer func_data)
3368 { 3368 {
3369 return _((char *)path); 3369 return _((char *)path);
3370 } 3370 }
3371 3371
3610 accel_group = gtk_accel_group_new(); 3610 accel_group = gtk_accel_group_new();
3611 gtk_window_add_accel_group(GTK_WINDOW (gtkblist->window), accel_group); 3611 gtk_window_add_accel_group(GTK_WINDOW (gtkblist->window), accel_group);
3612 g_object_unref(accel_group); 3612 g_object_unref(accel_group);
3613 gtkblist->ift = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<GaimMain>", accel_group); 3613 gtkblist->ift = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<GaimMain>", accel_group);
3614 gtk_item_factory_set_translate_func(gtkblist->ift, 3614 gtk_item_factory_set_translate_func(gtkblist->ift,
3615 item_factory_translate_func, 3615 (GtkTranslateFunc)item_factory_translate_func,
3616 NULL, NULL); 3616 NULL, NULL);
3617 gtk_item_factory_create_items(gtkblist->ift, sizeof(blist_menu) / sizeof(*blist_menu), 3617 gtk_item_factory_create_items(gtkblist->ift, sizeof(blist_menu) / sizeof(*blist_menu),
3618 blist_menu, NULL); 3618 blist_menu, NULL);
3619 gaim_gtk_load_accels(); 3619 gaim_gtk_load_accels();
3620 g_signal_connect(G_OBJECT(accel_group), "accel-changed", 3620 g_signal_connect(G_OBJECT(accel_group), "accel-changed",
4743 gtk_widget_grab_focus(input); 4743 gtk_widget_grab_focus(input);
4744 focus = FALSE; 4744 focus = FALSE;
4745 } 4745 }
4746 gtk_label_set_mnemonic_widget(GTK_LABEL(label), input); 4746 gtk_label_set_mnemonic_widget(GTK_LABEL(label), input);
4747 gaim_set_accessible_label(input, label); 4747 gaim_set_accessible_label(input, label);
4748 g_object_set_data(G_OBJECT(input), "identifier", pce->identifier); 4748 g_object_set_data(G_OBJECT(input), "identifier", (gpointer)pce->identifier);
4749 g_object_set_data(G_OBJECT(input), "is_spin", GINT_TO_POINTER(pce->is_int)); 4749 g_object_set_data(G_OBJECT(input), "is_spin", GINT_TO_POINTER(pce->is_int));
4750 g_object_set_data(G_OBJECT(input), "required", GINT_TO_POINTER(pce->required)); 4750 g_object_set_data(G_OBJECT(input), "required", GINT_TO_POINTER(pce->required));
4751 data->entries = g_list_append(data->entries, input); 4751 data->entries = g_list_append(data->entries, input);
4752 4752
4753 g_free(pce); 4753 g_free(pce);
5465 5465
5466 g_signal_connect(G_OBJECT(menuitem), "activate", 5466 g_signal_connect(G_OBJECT(menuitem), "activate",
5467 G_CALLBACK(plugin_act), action); 5467 G_CALLBACK(plugin_act), action);
5468 g_object_set_data(G_OBJECT(menuitem), "plugin_action", action); 5468 g_object_set_data(G_OBJECT(menuitem), "plugin_action", action);
5469 gtk_widget_show(menuitem); 5469 gtk_widget_show(menuitem);
5470
5471 gaim_plugin_action_free(action);
5470 } 5472 }
5471 else 5473 else
5472 gaim_separator(menu); 5474 gaim_separator(menu);
5473 } 5475 }
5474 5476