int i;
fmt_data *cfmt;
const gchar *col_fmt[] = {"No.", "%m", "Time", "%t",
- "Source", "%s", "Destination", "%d",
- "Protocol", "%p", "Info", "%i"};
+ "Source", "%s", "Destination", "%d",
+ "Protocol", "%p", "Info", "%i"};
if (prefs_initialized)
return;
col_l_elt = g_list_first(col_l);
while(col_l_elt) {
cfmt = (fmt_data *) g_malloc(sizeof(fmt_data));
- cfmt->title = ws_strdup_escape_underscore(col_l_elt->data);
+ cfmt->title = g_strdup(col_l_elt->data);
col_l_elt = col_l_elt->next;
if (strncmp(col_l_elt->data, cust_format, cust_format_len) == 0) {
gchar *fmt = g_strdup(col_l_elt->data);
col_l = NULL;
while (clp) {
cfmt = (fmt_data *) clp->data;
- col_l = g_list_append(col_l, ws_strdup_unescape_underscore(cfmt->title));
+ col_l = g_list_append(col_l, g_strdup(cfmt->title));
if ((strcmp(cfmt->fmt, cust_format) == 0) && (cfmt->custom_field)) {
gchar *fmt = g_strdup_printf("%s:%s", cfmt->fmt, cfmt->custom_field);
col_l = g_list_append(col_l, fmt);
gint col_id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(packet_list), E_MPACKET_LIST_COL_KEY));
GtkWidget *entry = g_object_get_data (G_OBJECT(w), "entry");
const gchar *title = gtk_entry_get_text(GTK_ENTRY(entry));
- gchar *escaped_title = ws_strdup_escape_underscore(title);
gtk_label_set_text (GTK_LABEL(column_lb), title);
- column_prefs_rename(col_id, escaped_title);
- g_free(escaped_title);
+ column_prefs_rename(col_id, title);
if (!prefs.gui_use_pref_save) {
prefs_main_write();
header_field_info *hfi;
GtkTooltips *tooltips = gtk_tooltips_new ();
int i;
- gchar *unescaped_title;
win_style = gtk_widget_get_style(top_level);
ascend_pm = gdk_pixmap_create_from_xpm_d(top_level->window, &ascend_bm,
col_arrows[i].table = gtk_table_new(2, 2, FALSE);
gtk_table_set_col_spacings(GTK_TABLE(col_arrows[i].table), 5);
- unescaped_title = ws_strdup_unescape_underscore(cfile.cinfo.col_title[i]);
- col_arrows[i].label = gtk_label_new(unescaped_title);
- g_free(unescaped_title);
+ col_arrows[i].label = gtk_label_new(cfile.cinfo.col_title[i]);
gtk_table_attach(GTK_TABLE(col_arrows[i].table), col_arrows[i].label, 0, 1, 0, 2,
GTK_SHRINK, GTK_SHRINK, 0, 0);
if (cfile.cinfo.col_fmt[i] == COL_CUSTOM) {
GtkTreeViewColumn *col = g_object_get_data (G_OBJECT(w), "column");
gint col_id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(col), E_MPACKET_LIST_COL_KEY));
GtkWidget *entry = g_object_get_data (G_OBJECT(w), "entry");
- const gchar *title = gtk_entry_get_text(GTK_ENTRY(entry));
- gchar *escaped_title = ws_strdup_escape_underscore(title);
+ const gchar *title = gtk_entry_get_text(GTK_ENTRY(entry));
+ gchar *escaped_title = ws_strdup_escape_underscore(title);
gint col_width;
gtk_tree_view_column_set_title(col, escaped_title);
- column_prefs_rename(col_id, escaped_title);
-
- col_width = get_default_col_size (packetlist->view, escaped_title);
g_free(escaped_title);
+ column_prefs_rename(col_id, title);
+
+ col_width = get_default_col_size (packetlist->view, title);
gtk_tree_view_column_set_min_width(col, col_width);
new_packet_list_resize_column (col_id);
static void
col_title_edit_dlg (GtkTreeViewColumn *col)
{
- const gchar *value = gtk_tree_view_column_get_title(col);
- gchar *unescaped_value = ws_strdup_unescape_underscore(value);
+ const gchar *title = gtk_tree_view_column_get_title(col);
+ gchar *unescaped_title = ws_strdup_unescape_underscore(title);
GtkWidget *win, *main_tb, *main_vb, *bbox, *cancel_bt, *ok_bt;
GtkWidget *entry, *label;
entry = gtk_entry_new();
gtk_table_attach_defaults(GTK_TABLE(main_tb), entry, 1, 2, 1, 2);
- gtk_entry_set_text(GTK_ENTRY(entry), unescaped_value);
- g_free(unescaped_value);
+ gtk_entry_set_text(GTK_ENTRY(entry), unescaped_title);
+ g_free(unescaped_title);
bbox = dlg_button_row_new(GTK_STOCK_CANCEL,GTK_STOCK_OK, NULL);
gtk_box_pack_end(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0);
gchar *tooltip_text;
header_field_info *hfi;
gint col_min_width;
+ gchar *escaped_title;
GtkTooltips *tooltips = gtk_tooltips_new ();
packetlist = new_packet_list_new();
} else {
tooltip_text = g_strdup(col_format_desc(cfile.cinfo.col_fmt[i]));
}
- gtk_tree_view_column_set_title(col, cfile.cinfo.col_title[i]);
+ escaped_title = ws_strdup_escape_underscore(cfile.cinfo.col_title[i]);
+ gtk_tree_view_column_set_title(col, escaped_title);
+ g_free (escaped_title);
gtk_tree_view_column_set_clickable(col, TRUE);
gtk_tree_view_column_set_resizable(col, TRUE);
gtk_tree_view_column_set_sizing(col,GTK_TREE_VIEW_COLUMN_FIXED);
GList *clp;
fmt_data *cfmt;
gint i;
- gchar *fmt, *unescaped_title;
+ gchar *fmt;
gint cur_fmt;
const gchar *column_titles[] = {"Title", "Field type"};
GtkListStore *store;
fmt = g_strdup_printf("%s", col_format_desc(cur_fmt));
}
gtk_list_store_append(store, &iter);
- unescaped_title = ws_strdup_unescape_underscore(cfmt->title);
- gtk_list_store_set(store, &iter, 0, unescaped_title, 1, fmt, 2, clp, -1);
- g_free(unescaped_title);
+ gtk_list_store_set(store, &iter, 0, cfmt->title, 1, fmt, 2, clp, -1);
if (first_row) {
first_iter = iter;
first_row = FALSE;
* is going to be marked as accelerator for this header (i.e. is going to be
* shown underlined), escape it be inserting a second consecutive underscore.
*/
- cfmt->title = ws_strdup_escape_underscore(title);
+ cfmt->title = g_strdup(title);
cfmt->fmt = g_strdup(col_format_to_string(fmt));
cfmt->custom_field = g_strdup(custom_field);
if (clp) {
cfmt = (fmt_data *) clp->data;
g_free(cfmt->title);
- cfmt->title = ws_strdup_escape_underscore(new_title);
+ cfmt->title = g_strdup(new_title);
}
gtk_tree_path_free (path);