/*
* Create current options CList.
*/
- cur_clist = gtk_clist_new_with_titles(IFOPTS_CLIST_COLS, cur_titles);
+ cur_clist = gtk_clist_new_with_titles(IFOPTS_CLIST_COLS, (gchar **) cur_titles);
gtk_clist_set_column_width(GTK_CLIST(cur_clist), 1, 230);
gtk_clist_set_column_width(GTK_CLIST(cur_clist), 2, 260);
gtk_clist_set_column_width(GTK_CLIST(cur_clist), 3, 40);
gtk_box_pack_start (GTK_BOX (list_vbox), scrolledwindow1, TRUE, TRUE, 0);
#if GTK_MAJOR_VERSION < 2
- color_filters = gtk_clist_new_with_titles(2, titles);
+ color_filters = gtk_clist_new_with_titles(2, (gchar **) titles);
#else
/* the list store contains : filter name, filter string, foreground
* color, background color, pointer to color filter */
gint i;
const gchar *column_titles[] = {"Title", "Format"};
#if GTK_MAJOR_VERSION < 2
- gchar *col_ent[2];
+ const gchar *col_ent[2];
gint row;
#else
GtkListStore *store;
gtk_widget_show(list_sc);
#if GTK_MAJOR_VERSION < 2
- column_l = gtk_clist_new_with_titles(2, column_titles);
+ column_l = gtk_clist_new_with_titles(2, (gchar **) column_titles);
/* XXX - make this match the packet list prefs? */
gtk_clist_set_selection_mode(GTK_CLIST(column_l), GTK_SELECTION_SINGLE);
gtk_clist_column_titles_passive(GTK_CLIST(column_l));
#if GTK_MAJOR_VERSION < 2
col_ent[0] = cfmt->title;
col_ent[1] = col_format_desc(get_column_format_from_str(cfmt->fmt));
- row = gtk_clist_append(GTK_CLIST(column_l), col_ent);
+ row = gtk_clist_append(GTK_CLIST(column_l), (gchar **) col_ent);
gtk_clist_set_row_data(GTK_CLIST(column_l), row, clp);
#else
gtk_list_store_append(store, &iter);
fmt_data *cfmt;
const gchar *title = "New Column";
#if GTK_MAJOR_VERSION < 2
- gchar *col_ent[2];
+ const gchar *col_ent[2];
#else
GtkTreeModel *model;
GtkTreeIter iter;
#if GTK_MAJOR_VERSION < 2
col_ent[0] = title;
col_ent[1] = col_format_desc(cur_fmt);
- cur_row = gtk_clist_append(GTK_CLIST(column_l), col_ent);
+ cur_row = gtk_clist_append(GTK_CLIST(column_l), (gchar **) col_ent);
gtk_clist_set_row_data(GTK_CLIST(column_l), cur_row,
g_list_last(prefs.col_list));
/* if this was a new conversation we have to create a clist row for it */
if(new_conversation){
- const char *entries[NUM_COLS];
+ char *entries[NUM_COLS];
char frames[16],bytes[16],txframes[16],txbytes[16],rxframes[16],rxbytes[16];
/* these values will be filled by call to draw_ct_table_addresses() below */
text[E_LIST_D_INITIAL] = initial_proto_name;
text[E_LIST_D_CURRENT] = current_proto_name;
#if GTK_MAJOR_VERSION < 2
- row = gtk_clist_prepend(clist, text);
+ row = gtk_clist_prepend(clist, (gchar **) text);
#else
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, E_LIST_D_TABLE, text[E_LIST_D_TABLE],
{
/* Initialize list */
#if GTK_MAJOR_VERSION < 2
- list = GTK_CLIST(gtk_clist_new_with_titles(E_LIST_D_COLUMNS, titles));
+ list = GTK_CLIST(gtk_clist_new_with_titles(E_LIST_D_COLUMNS, (gchar **) titles));
gtk_clist_column_titles_passive(list);
for (column = 0; column < E_LIST_D_COLUMNS; column++)
gtk_clist_set_column_auto_resize(list, column, TRUE);
text[E_LIST_S_PROTO_NAME] = proto_name;
text[E_LIST_S_TABLE] = table_name;
#if GTK_MAJOR_VERSION < 2
- row = gtk_clist_prepend(list, text);
+ row = gtk_clist_prepend(list, (gchar **) text);
gtk_clist_set_row_data(list, row, value);
#else
gtk_list_store_append(store, &iter);
text[E_LIST_S_PROTO_NAME] = "(default)";
text[E_LIST_S_TABLE] = "(none)";
#if GTK_MAJOR_VERSION < 2
- row = gtk_clist_prepend(GTK_CLIST(list), text);
+ row = gtk_clist_prepend(GTK_CLIST(list), (gchar **) text);
gtk_clist_set_row_data(GTK_CLIST(list), row, NULL);
gtk_clist_select_row(GTK_CLIST(list), 0, -1);
page = gtk_hbox_new(FALSE, 5);
OBJECT_SET_DATA(page, E_PAGE_ACTION, decode_simple);
- OBJECT_SET_DATA(page, E_PAGE_TABLE, table_name);
- OBJECT_SET_DATA(page, E_PAGE_TITLE, title);
+ OBJECT_SET_DATA(page, E_PAGE_TABLE, (gchar *) table_name);
+ OBJECT_SET_DATA(page, E_PAGE_TITLE, (gchar *) title);
OBJECT_SET_DATA(page, E_PAGE_VALUE, GUINT_TO_POINTER(value));
/* Always enabled */
page = gtk_hbox_new(FALSE, 5);
OBJECT_SET_DATA(page, E_PAGE_ACTION, decode_transport);
- OBJECT_SET_DATA(page, E_PAGE_TABLE, table_name);
+ OBJECT_SET_DATA(page, E_PAGE_TABLE, (gchar *) table_name);
OBJECT_SET_DATA(page, E_PAGE_TITLE, "Transport");
/* Always enabled */
page = gtk_hbox_new(FALSE, 5);
OBJECT_SET_DATA(page, E_PAGE_ACTION, decode_transport);
- OBJECT_SET_DATA(page, E_PAGE_TABLE, table_name);
+ OBJECT_SET_DATA(page, E_PAGE_TABLE, (gchar *) table_name);
OBJECT_SET_DATA(page, E_PAGE_TITLE, "Transport");
vbox = gtk_vbox_new(FALSE, 5);
GtkWidget *value_list,
const value_string *values);
static void add_value_list_item(GtkWidget *value_list, const gchar *string,
- gpointer data);
+ const gpointer data);
static void display_value_fields(header_field_info *hfinfo,
gboolean is_comparison, GtkWidget *value_label,
GtkWidget *value_entry,
*/
if (values == NULL)
values = &true_false;
- add_value_list_item(value_list, values->true_string, values);
+ add_value_list_item(value_list, values->true_string, (const gpointer) values);
add_value_list_item(value_list, values->false_string, NULL);
/*
*/
while (values->strptr != NULL) {
add_value_list_item(value_list, values->strptr,
- values);
+ (const gpointer) values);
values++;
}
}
static void
-add_value_list_item(GtkWidget *value_list, const gchar *string, gpointer data)
+add_value_list_item(GtkWidget *value_list, const gchar *string, const gpointer data)
{
#if GTK_MAJOR_VERSION < 2
GtkWidget *label, *item;
#if GTK_MAJOR_VERSION < 2
int len;
void *cookie;
- gchar *name;
+ const gchar *name;
GHashTable *proto_array;
GtkCTreeNode *protocol_node, *item_node;
#else
name = proto_get_protocol_short_name(protocol); /* name, short_name or filter name ? */
protocol_node = gtk_ctree_insert_node(GTK_CTREE(field_tree),
NULL, NULL,
- &name, 5,
+ (gchar **) &name, 5,
NULL, NULL, NULL, NULL,
FALSE, FALSE);
gtk_ctree_node_set_row_data(GTK_CTREE(field_tree), protocol_node,
int i;
/* create table */
- table = GTK_CLIST(gtk_clist_new_with_titles(columns, titles));
+ table = GTK_CLIST(gtk_clist_new_with_titles(columns, (gchar **) titles));
gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0);
/* if this was a new talker we have to create a clist row for it */
if(new_talker){
- const char *entries[NUM_COLS];
+ char *entries[NUM_COLS];
char frames[16],bytes[16],txframes[16],txbytes[16],rxframes[16],rxbytes[16];
/* these values will be filled by call to draw_hostlist_table_addresses() below */
"Hint 2: If you want to add a new protocol page, you should use the ProtocolTemplate,\n"
"which will save you a lot of editing and will give a consistent look over the pages.",
proto_abbrev, proto_abbrev);
- simple_dialog_set_cb(dialog, selected_ptree_info_answered_cb, proto_abbrev);
+ simple_dialog_set_cb(dialog, selected_ptree_info_answered_cb, (gpointer) proto_abbrev);
}
}
entries[5] = (seconds) ? g_strdup_printf("%.2f", num_bytes/seconds) : "N/A";
- gtk_clist_insert(GTK_CLIST(table), i, entries);
+ gtk_clist_insert(GTK_CLIST(table), i, (gchar **) entries);
}
gtk_clist_sort(GTK_CLIST(table));
win_style = gtk_widget_get_style(top_level);
ascend_pm = gdk_pixmap_create_from_xpm_d(top_level->window, &ascend_bm,
&win_style->bg[GTK_STATE_NORMAL],
- clist_ascend_xpm);
+ (gchar **) clist_ascend_xpm);
descend_pm = gdk_pixmap_create_from_xpm_d(top_level->window, &descend_bm,
&win_style->bg[GTK_STATE_NORMAL],
- clist_descend_xpm);
+ (gchar **) clist_descend_xpm);
col_arrows = (column_arrows *) g_malloc(sizeof(column_arrows) *
cfile.cinfo.num_cols);
{
gint row;
- row = eth_clist_append(ETH_CLIST(packet_list), text);
+ row = eth_clist_append(ETH_CLIST(packet_list), (gchar **) text);
eth_clist_set_row_data(ETH_CLIST(packet_list), row, data);
return row;
}
gtk_widget_show(proto_sw);
#if GTK_MAJOR_VERSION < 2
- proto_list = gtk_clist_new_with_titles(3, titles);
+ proto_list = gtk_clist_new_with_titles(3, (gchar **) titles);
gtk_container_add(GTK_CONTAINER(proto_sw), proto_list);
gtk_clist_set_selection_mode(GTK_CLIST(proto_list), GTK_SELECTION_BROWSE);
gtk_clist_column_titles_passive(GTK_CLIST(proto_list));
protocol_t *protocol;
protocol_data_t *p;
#if GTK_MAJOR_VERSION < 2
- gchar *proto_text[3];
+ const gchar *proto_text[3];
#endif
/* Iterate over all the protocols */
proto_text[0] = STATUS_TXT (p->enabled);
proto_text[1] = p->abbrev;
proto_text[2] = p->name;
- p->row = gtk_clist_append(proto_list, proto_text);
+ p->row = gtk_clist_append(proto_list, (gchar **) proto_text);
gtk_clist_set_row_data(proto_list, p->row, p);
#else
gtk_list_store_append(proto_store, &p->iter);
convline = g_locale_to_utf8(line, cur, NULL, &newsize, NULL);
gtk_text_buffer_insert_with_tags_by_name(buf, &iter, convline, newsize,
revstyle, NULL);
- g_free(convline);
+ g_free( (gpointer) convline);
cur = 0;
}
if (i < k) {
convline = g_locale_to_utf8(line, cur, NULL, &newsize, NULL);
gtk_text_buffer_insert_with_tags_by_name(buf, &iter, convline, newsize,
"plain", NULL);
- g_free(convline);
+ g_free( (gpointer) convline);
cur = 0;
}
reverse = newreverse;
gtk_text_buffer_insert_with_tags_by_name(buf, &iter, convline, newsize,
reverse ? revstyle : "plain",
NULL);
- g_free(convline);
+ g_free( (gpointer) convline);
cur = 0;
line[cur++] = '\n';
gtk_text_buffer_insert_with_tags_by_name(buf, &iter, line, cur,
ph_stats_t *ps = di->ps;
gboolean is_leaf;
draw_info_t child_di;
- double seconds;
- const gchar *text[NUM_STAT_COLUMNS];
+ double seconds;
+ gchar *text[NUM_STAT_COLUMNS];
#if GTK_MAJOR_VERSION < 2
GtkCTree *tree = di->tree;
GtkCTreeNode *parent = di->parent;
seconds = ps->last_time - ps->first_time;
- text[0] = stats->hfinfo->name;
+ text[0] = (gchar *) (stats->hfinfo->name);
text[1] = g_strdup_printf("%6.2f%%",
PCT(stats->num_pkts_total, ps->tot_packets));
text[2] = g_strdup_printf("%u", stats->num_pkts_total);
ascend_pm = gdk_pixmap_create_from_xpm_d(window->window,
&ascend_bm,
&win_style->bg[GTK_STATE_NORMAL],
- (const gchar **)clist_ascend_xpm);
+ (gchar **)clist_ascend_xpm);
descend_pm = gdk_pixmap_create_from_xpm_d(window->window,
&descend_bm,
&win_style->bg[GTK_STATE_NORMAL],
- (const gchar **)clist_descend_xpm);
+ (gchar **)clist_descend_xpm);
for (i=0; i<NUM_COLS; i++) {
col_arrows[i].table = gtk_table_new(2, 2, FALSE);
ascend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window,
&ascend_bm,
&win_style->bg[GTK_STATE_NORMAL],
- (const gchar **)clist_ascend_xpm);
+ (gchar **)clist_ascend_xpm);
descend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window,
&descend_bm,
&win_style->bg[GTK_STATE_NORMAL],
- (const gchar **)clist_descend_xpm);
+ (gchar **)clist_descend_xpm);
for (i=0; i<NUM_COLS; i++)
{
col_arrows[i].table = gtk_table_new(2, 2, FALSE);
ascend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window,
&ascend_bm,
&win_style->bg[GTK_STATE_NORMAL],
- (const gchar **)clist_ascend_xpm);
+ (gchar **)clist_ascend_xpm);
descend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window,
&descend_bm,
&win_style->bg[GTK_STATE_NORMAL],
- (const gchar **)clist_descend_xpm);
+ (gchar **)clist_descend_xpm);
for (i=0; i<NUM_COLS; i++)
{
col_arrows[i].table = gtk_table_new(2, 2, FALSE);
#if GTK_MAJOR_VERSION < 2
#define toolbar_item(new_item, window, toolbar, stock, tooltip, xpm, callback, user_data) { \
- icon = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->white, xpm); \
+ icon = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->white, (gchar **) xpm); \
iconw = gtk_pixmap_new(icon, mask); \
new_item = gtk_toolbar_append_item(GTK_TOOLBAR (toolbar), \
stock, tooltip, "Private", iconw, GTK_SIGNAL_FUNC(callback), user_data);\
{
GtkWidget *tree;
- tree = gtk_ctree_new_with_titles(columns, tree_column, titles);
+ tree = gtk_ctree_new_with_titles(columns, tree_column, (gchar **) titles);
setup_tree(tree);
return tree;
}
#if GTK_MAJOR_VERSION < 2
- plugins_list = gtk_clist_new_with_titles(cols, titles);
+ plugins_list = gtk_clist_new_with_titles(cols, (gchar **) titles);
gtk_clist_set_selection_mode(GTK_CLIST(plugins_list), GTK_SELECTION_SINGLE);
gtk_clist_column_titles_passive(GTK_CLIST(plugins_list));
if(titles) {