cinfo.columns_changed is only used by ui/gtk, move it to cfile structure.
svn path=/trunk/; revision=44750
This commit is contained in:
parent
01b374b714
commit
78019edc99
1
cfile.h
1
cfile.h
|
@ -111,6 +111,7 @@ typedef struct _capture_file {
|
|||
guint32 first_displayed; /* Frame number of first frame displayed */
|
||||
guint32 last_displayed; /* Frame number of last frame displayed */
|
||||
column_info cinfo; /* Column formatting information */
|
||||
gboolean columns_changed; /**< Have the columns been changed in the prefs? */
|
||||
frame_data *current_frame; /* Frame data for current frame */
|
||||
gint current_row; /* Row number for current frame */
|
||||
epan_dissect_t *edt; /* Protocol dissection for currently selected packet */
|
||||
|
|
|
@ -61,7 +61,6 @@ typedef struct _column_info {
|
|||
int *col_fence; /**< Stuff in column buffer before this index is immutable */
|
||||
col_expr_t col_expr; /**< Column expressions and values */
|
||||
gboolean writable; /**< writable or not @todo Are we still writing to the columns? */
|
||||
gboolean columns_changed; /**< Have the columns been changed in the prefs? */
|
||||
} column_info;
|
||||
|
||||
/**
|
||||
|
|
|
@ -899,7 +899,7 @@ void apply_as_custom_column_cb (GtkWidget *widget _U_, gpointer data _U_)
|
|||
if (!prefs.gui_use_pref_save) {
|
||||
prefs_main_write();
|
||||
}
|
||||
cfile.cinfo.columns_changed = FALSE; /* Reset value */
|
||||
cfile.columns_changed = FALSE; /* Reset value */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3973,7 +3973,7 @@ void change_configuration_profile (const gchar *profile_name)
|
|||
|
||||
/* Recreate the packet list according to new preferences */
|
||||
new_packet_list_recreate ();
|
||||
cfile.cinfo.columns_changed = FALSE; /* Reset value */
|
||||
cfile.columns_changed = FALSE; /* Reset value */
|
||||
user_font_apply();
|
||||
|
||||
/* Update menus with new recent values */
|
||||
|
|
|
@ -90,7 +90,7 @@ visible_toggled(GtkCellRendererToggle *cell _U_, gchar *path_str, gpointer data)
|
|||
cfmt->visible = TRUE;
|
||||
|
||||
gtk_list_store_set(GTK_LIST_STORE(model), &iter, VISIBLE_COLUMN, cfmt->visible, -1);
|
||||
cfile.cinfo.columns_changed = TRUE;
|
||||
cfile.columns_changed = TRUE;
|
||||
|
||||
gtk_tree_path_free(path);
|
||||
} /* visible_toggled */
|
||||
|
@ -410,7 +410,7 @@ column_list_new_cb(GtkWidget *w _U_, gpointer data) {
|
|||
gtk_tree_view_set_cursor(column_l, path, title_column, TRUE);
|
||||
gtk_tree_path_free(path);
|
||||
|
||||
cfile.cinfo.columns_changed = TRUE;
|
||||
cfile.columns_changed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -473,7 +473,7 @@ column_list_delete_cb(GtkWidget *w _U_, gpointer data) {
|
|||
|
||||
g_signal_handler_unblock (model, column_row_deleted_handler_id);
|
||||
|
||||
cfile.cinfo.columns_changed = TRUE;
|
||||
cfile.columns_changed = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -498,7 +498,7 @@ column_title_changed_cb(GtkCellRendererText *cell _U_, const gchar *str_path, co
|
|||
}
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
cfile.cinfo.columns_changed = TRUE;
|
||||
cfile.columns_changed = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -645,7 +645,7 @@ column_menu_changed_cb(GtkWidget *w, gpointer data) {
|
|||
gtk_list_store_set(GTK_LIST_STORE(model), &iter, FORMAT_COLUMN, fmt, -1);
|
||||
g_free(fmt);
|
||||
cfmt->fmt = cur_cb_fmt;
|
||||
cfile.cinfo.columns_changed = TRUE;
|
||||
cfile.columns_changed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -691,7 +691,7 @@ column_field_changed_cb(GtkEditable *te, gpointer data) {
|
|||
g_free(fmt);
|
||||
g_free(cfmt->custom_field);
|
||||
cfmt->custom_field = field;
|
||||
cfile.cinfo.columns_changed = TRUE;
|
||||
cfile.columns_changed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -737,7 +737,7 @@ column_occurrence_changed_cb(GtkEditable *te, gpointer data) {
|
|||
gtk_list_store_set(GTK_LIST_STORE(model), &iter, FORMAT_COLUMN, fmt, -1);
|
||||
g_free(fmt);
|
||||
cfmt->custom_occurrence = occurrence;
|
||||
cfile.cinfo.columns_changed = TRUE;
|
||||
cfile.columns_changed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -783,7 +783,7 @@ column_dnd_row_deleted_cb(GtkTreeModel *model, GtkTreePath *path _U_, gpointer d
|
|||
}
|
||||
|
||||
prefs.col_list = new_col_list;
|
||||
cfile.cinfo.columns_changed = TRUE;
|
||||
cfile.columns_changed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -796,9 +796,9 @@ void
|
|||
column_prefs_apply(GtkWidget *w _U_)
|
||||
{
|
||||
/* Redraw the packet list if the columns were changed */
|
||||
if(cfile.cinfo.columns_changed) {
|
||||
if(cfile.columns_changed) {
|
||||
new_packet_list_recreate();
|
||||
cfile.cinfo.columns_changed = FALSE; /* Reset value */
|
||||
cfile.columns_changed = FALSE; /* Reset value */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1685,7 +1685,7 @@ prefs_main_cancel_cb(GtkWidget *cancel_bt _U_, gpointer parent_w)
|
|||
|
||||
/* Free up the current preferences and copy the saved preferences to the
|
||||
current preferences. */
|
||||
cfile.cinfo.columns_changed = FALSE; /* [XXX: "columns_changed" should treally be stored in prefs struct ??] */
|
||||
cfile.columns_changed = FALSE; /* [XXX: "columns_changed" should treally be stored in prefs struct ??] */
|
||||
|
||||
/* Now revert the registered preferences. */
|
||||
prefs_modules_foreach(module_prefs_revert, &must_redissect);
|
||||
|
|
|
@ -199,7 +199,7 @@ gui_prefs_show(void)
|
|||
font_changed = FALSE;
|
||||
|
||||
/* The columns haven't been changed yet */
|
||||
cfile.cinfo.columns_changed = FALSE;
|
||||
cfile.columns_changed = FALSE;
|
||||
|
||||
/* Main vertical box */
|
||||
main_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 7, FALSE);
|
||||
|
|
Loading…
Reference in New Issue